allensdk.brain_observatory.behavior.data_files.demix_file module

class allensdk.brain_observatory.behavior.data_files.demix_file.DemixFile(filepath: str | Path)[source]

Bases: DataFile

A DataFile which contains methods for accessing and loading demixed traces.

classmethod from_json(dict_repr: dict) DemixFile[source]

Populates a DataFile from a JSON compatible dict (likely parsed by argschema)

Returns:
DataFile:

An instantiated DataFile which has data and filepath properties

classmethod from_lims(db: PostgresQueryMixin, ophys_experiment_id: int | str) DemixFile[source]

Populate a DataFile from an internal database (likely LIMS)

Returns:
DataFile:

An instantiated DataFile which has data and filepath properties

static load_data(filepath: str | Path, **kwargs) DataFrame[source]

Given a filepath (that is meant to by read by the DataFile type), load the contents of the file into a Python type. (dict, DataFrame, list, etc…)

Parameters:
filepathUnion[str, Path]

The filepath that the DataFile class should load.

Returns:
Any

A Python data type that has been parsed/loaded from the provided filepath.

allensdk.brain_observatory.behavior.data_files.demix_file.from_json_cache_key(cls, dict_repr: dict)[source]
allensdk.brain_observatory.behavior.data_files.demix_file.from_lims_cache_key(cls, db, ophys_experiment_id: int)[source]