register#
Base classes for loading datakit sources.
- class mesofield.datakit.sources.register.LoadContext[source]#
Bases:
objectContext object passed to every
DataSource.loadcall.Carries identity (subject/session/task), the inventory row for that cell (so sources can locate sibling files via
path_for()), and any upstream sources that were loaded for the same cell as declared onDataSource.requires.For backward parity with previous releases, when
"dataqueue"is present independencies, the convenience attributesdataqueue_frame,dataqueue_meta,master_timeline, andexperiment_windoware populated from it. New sources should prefer reading fromdependenciesdirectly.- require_path(tag)[source]#
Like
path_for()but raisesFileNotFoundErrorwhen missing.
- get_dependency(tag)[source]#
Return a previously-loaded dependency stream, or None if unavailable.
- Parameters:
tag (str)
- Return type:
LoadedStream | None
- require_dependency(tag)[source]#
Like
get_dependency()but raises if the dependency is missing.- Parameters:
tag (str)
- Return type:
- __init__(subject, session, task, inventory_row, dependencies=<factory>, master_timeline=None, experiment_window=None, dataqueue_frame=None, dataqueue_meta=None)#
- Parameters:
- Return type:
None
- class mesofield.datakit.sources.register.DataSource[source]#
Bases:
objectBase class for a file-backed data source.
- requires: ClassVar[Tuple[str, ...]] = ()#
Tag names of upstream sources whose loaded streams should be made available via
LoadContext.dependencies. Soft contract: a missing or failed dependency yieldsNoneindependencies[tag]; sources are responsible for either degrading gracefully or raising.
- load(path, *, context=None)[source]#
Load data from the given path.
- Parameters:
path (Path)
context (LoadContext | None)
- Return type:
- class mesofield.datakit.sources.register.TimeseriesSource[source]#
Bases:
DataSourceBase class for time-indexed sources.
- load(path, *, context=None)[source]#
Load data from the given path.
- Parameters:
path (Path)
context (LoadContext | None)
- Return type:
- class mesofield.datakit.sources.register.TableSource[source]#
Bases:
DataSourceBase class for static table sources.
- load(path, *, context=None)[source]#
Load data from the given path.
- Parameters:
path (Path)
context (LoadContext | None)
- Return type:
- class mesofield.datakit.sources.register.IntervalSeriesSource[source]#
Bases:
DataSourceBase class for interval-based sources.
- build_intervals(path, *, context=None)[source]#
Return an intervals table with start/stop columns and meta.
- load(path, *, context=None)[source]#
Load data from the given path.
- Parameters:
path (Path)
context (LoadContext | None)
- Return type: