poreflow.io.labview¶
load(filename, downsample_to_freq=5000, verbose=False)
¶
Loads data from nanopore LabView .dat files
Loads _events from the nanopore setup that were saved as a .dat file.
Expects a file that starts with an utf-8 encoded text header with
measurements parameters (e.g., sample rate). This _events is then followed by
binary _events of the samples.
After reading the data, it is downsampled by default. This behaviour can be turned off.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
str
|
Path to the |
required |
downsample_to_freq (
|
obj: |
required |
Returns:
| Name | Type | Description |
|---|---|---|
v_data |
ndarray
|
An array containing the voltage data in mV. |
i_data |
ndarray
|
An array containing the current data in pA. |
sfreq |
float
|
(Downsampled) sample rate in Hz |
bdc |
float
|
Bias voltage DC value |
metadata_from_header(s)
¶
Converts header to a dictionary.
Converts a header with _events stored as lines "param_name=param_value;" into a dictionary with param_name as keys and param_value as values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s
|
str
|
A string containing the header text. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
A dictionary of the values in the header text. |
read_digital(filename, verbose=False)
¶
Returns raw data as integers
read_header(f)
¶
read_measurement_dat(filename, downsample_to_freq=5000, bfreq=None, bamp=None, verbose=False)
¶
Reads measurement data the UTube setup and creates a raw data object. The function allows for
optional downsampling of the signal to a specified frequency. It adds bias rate metadata to the raw data if
parameters bfreq and bamp are specified.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
filename
|
PathLike
|
Path to the measurement data file to be loaded. |
required |
downsample_to_freq
|
Optional[float]
|
Target frequency for optional downsampling. Defaults to 5000 Hz. |
5000
|
bfreq
|
Optional[float]
|
Bias voltage frequency in Hz. Defaults to None, which corresponds to a constant voltage measurement. |
None
|
bamp
|
Optional[float]
|
Bias voltage amplitude in mV. Defaults to None, which corresponds to a constant |
None
|
Returns:
| Type | Description |
|---|---|
RawDataFrame
|
poreflow.base.Raw: A Raw object containing the processed voltage and current data. |