-
Notifications
You must be signed in to change notification settings - Fork 6
Classes and code organization
IFCB bins are represented as classes that provide dict-like behavior and encapsulate access to IFCB data regardless of how the data is represented or where it was read from.
All bin classes are derived from ifcb.data.bins.BaseBin
, which extends ifcb.data.utils.BaseDictlike
.
Note: Python's UserDict
is not used because it copies all data; BaseDictlike
is implemented instead to provide reasonable default behavior for most dict operations as long as iteration and item fetching is supported.
PID and filename parsing is provided by the ifcb.data.identifiers.Pid
class. Parsing is performed lazily and access to selected parsed fields is performed through attributes of the Pid
class. A lower-level function that just performs basic parsing of PIDs is provided in ifcb.data.identifiers
Raw filesets are accessed using the ifcb.data.files.FilesetBin
class. This encapsulates a Fileset
object describing the raw data files (and providing access to existence checks, file sizes, etc.) along with AdcFile
and RoiFile
objects holding the ADC and ROI data.
Other bin classes and associated functions are provided for translating IFCB data to and from non-native formats, and these are provided in the following packages:
-
ifcb.data.matlab
- MATLAB format support -
ifcb.data.zip
- Zip format support -
ifcb.data.hdf
- HDF5 support
Selected classes and functions from the ifcb.data
package are exported to the top-level ifcb
package. See ifcb/__init__.py
for details.