poreflow.RawDataFrame¶
Bases: BaseDataFrame
i_loc
property
¶
Get column index for current data.
Returns:
| Name | Type | Description |
|---|---|---|
int |
Column index of the current data column. |
v_loc
property
¶
Get column index for voltage data.
Returns:
| Name | Type | Description |
|---|---|---|
int |
Column index of the voltage data column. |
as_dataframe()
¶
Converts the BaseDataFrame to a regular pandas DataFrame.
Returns:
| Type | Description |
|---|---|
|
pd.DataFrame: Regular pandas DataFrame without poreflow metadata. |
from_labview(filename, sfreq=5000, bfreq=None, bamp=None, verbose=False)
classmethod
¶
Reads measurement data from a LabView .dat file and creates a Raw data object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
verbose
|
bool
|
|
False
|
filename
|
PathLike
|
Path to the measurement data file to be loaded. |
required |
sfreq
|
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 voltage measurement. |
None
|
Returns:
| Type | Description |
|---|---|
RawDataFrame
|
poreflow.base.RawDataFrame: A RawDataFrame object containing the processed voltage and current data. |
get_nyquist()
¶
Calculates the Nyquist frequency.
The Nyquist frequency is half the sampling frequency and represents the highest frequency that can be accurately represented in the signal.
Returns:
| Name | Type | Description |
|---|---|---|
float |
Nyquist frequency in Hz. |
get_t(absolute=False, n=None)
¶
Get time array
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
absolute
|
bool
|
Whether to return absolute time (start from start time). Defaults to False. |
False
|
n
|
int
|
Number of time points to return. Defaults to None, in which case an number of time points is equal to the current data is returned |
None
|
Returns:
has_state()
¶
Checks if the DataFrame has a state column.
Returns:
| Name | Type | Description |
|---|---|---|
bool |
True if the DataFrame contains a state column. |
is_varv()
¶
Checks if the measurement uses variable voltage
Returns:
| Name | Type | Description |
|---|---|---|
bool |
True if bias frequency (bfreq) is not None, indicating a variable voltage measurement. |
load(path)
classmethod
¶
plot(y='i', x='abs', ax=None, ms=False, stats=True, ios=True, max_points=0, hue=None, events=None, **kwargs)
¶
reset_indices()
¶
Resets indices of data.
Resets the start_idx to the first index and resets the DataFrame index to start from 0.
Returns:
| Type | Description |
|---|---|
|
None |
reset_states()
¶
Resets all states to the good state value.
Returns:
| Type | Description |
|---|---|
|
None |