EITData
eitprocessing.datahandling.eitdata
¶
EITData
dataclass
¶
EITData(
path: str | Path | list[Path | str],
nframes: int,
time: ndarray,
sample_frequency: float,
vendor: Vendor,
label: str | None = None,
description: str = "",
name: str | None = None,
suppress_simulated_warning: InitVar[bool] = False,
*,
pixel_impedance: ndarray
)
Container for EIT impedance data.
This class holds the pixel impedance from an EIT measurement, as well as metadata describing the measurement. The class is meant to hold data from (part of) a singular continuous measurement.
This class can't be initialized directly. Instead, use load_eit_data(<path>, vendor=<vendor>)
to load data from
disk.
PARAMETER | DESCRIPTION |
---|---|
path
|
The path of list of paths of the source from which data was derived. |
nframes
|
Number of frames.
TYPE:
|
time
|
The time of each frame (since start measurement).
TYPE:
|
sample_frequency
|
The (average) frequency at which the frames are collected, in Hz.
TYPE:
|
vendor
|
The vendor of the device the data was collected with.
TYPE:
|
label
|
Computer readable label identifying this dataset.
TYPE:
|
name
|
Human readable name for the data.
TYPE:
|
pixel_impedance
|
Impedance values for each pixel at each frame.
TYPE:
|
t
property
¶
t: TimeIndexer
ensure_path_list
staticmethod
¶
Return the path or paths as a list.
The path of any EITData object can be a single str/Path or a list of str/Path objects. This method returns a list of Path objects given either a str/Path or list of str/Paths.
get_summed_impedance
¶
get_summed_impedance(
*, return_label: str | None = None, **return_kwargs
) -> ContinuousData
Return a ContinuousData-object with the same time axis and summed pixel values over time.
PARAMETER | DESCRIPTION |
---|---|
return_label
|
The label of the returned object; defaults to 'summed
TYPE:
|
**return_kwargs
|
Keyword arguments for the creation of the returned object.
DEFAULT:
|
calculate_global_impedance
¶
calculate_global_impedance() -> ndarray
Return the global impedance, i.e. the sum of all included pixels at each frame.
select_by_time
¶
select_by_time(
start_time: float | None = None,
end_time: float | None = None,
start_inclusive: bool = False,
end_inclusive: bool = False,
label: str | None = None,
) -> Self
Get a shortened copy of the object, starting from start_time and ending at end_time.
Given a start and end time stamp (i.e. its value, not its index), return a slice of the original object, which must contain a time axis.
PARAMETER | DESCRIPTION |
---|---|
start_time
|
first time point to include. Defaults to first frame of sequence.
TYPE:
|
end_time
|
last time point. Defaults to last frame of sequence.
TYPE:
|
start_inclusive
|
TYPE:
|
label
|
Description. Defaults to None, which will create a label based on the original object label and the frames by which it is sliced.
TYPE:
|
RAISES | DESCRIPTION |
---|---|
TypeError
|
if |
ValueError
|
if time stamps are not sorted. |
RETURNS | DESCRIPTION |
---|---|
Self
|
A shortened copy of the object. |
select_by_index
¶
select_by_index(
start: int | None = None,
end: int | None = None,
newlabel: str | None = None,
) -> Self
De facto implementation of the __getitem__
function.
This function can also be called directly to add a label to the sliced object. Otherwise a default label describing the slice and original object is attached.
isequivalent
¶
Test whether the data structure between two objects are equivalent.
Equivalence, in this case means that objects are compatible e.g. to be merged. Data content can vary, but e.g. the category of data (e.g. airway pressure, flow, tidal volume) and unit, etc., must match.
PARAMETER | DESCRIPTION |
---|---|
other
|
object that will be compared to self.
TYPE:
|
raise_
|
sets this method's behavior in case of non-equivalence. If
True, an
TYPE:
|
RAISES | DESCRIPTION |
---|---|
EquivalenceError
|
if |
RETURNS | DESCRIPTION |
---|---|
bool
|
bool describing result of equivalence comparison. |
Vendor
¶
Enum indicating the vendor (manufacturer) of the source EIT device.