simuran.recording module

This module holds single experiment related information.

class simuran.recording.Recording(attrs: Union[dict, ParamHandler] = <factory>, datetime: datetime = <factory>, tag: Optional[str] = None, loader: Optional[BaseLoader] = None, source_file: Union[str, Path, None] = None, available_data: list = <factory>)

Bases: simuran.core.base_class.BaseSimuran

Describe a full recording session and holds data.

This holds single unit information, spatial information, EEG information, stimulation information, and event information.

Note that anything you want to store on this object that has not been accounted for in attributes, then this can be stored on self.info

attrs

Fixed information about this object, e.g. model or session type.

Type:dict or ParamHandler
datetime

The date associated with this object, e.g. recording date.

Type:datetime.datetime
tag

An optional tag to describe the object. Default “untagged”

Type:str
loader

A loader object that is used to load this object. The relationship between the loader and this object is established in self.load()

Type:simuran.loader.BaseLoader
source_file

The path to the source file for this object. For instance, an NWB file or an online URL.

Type:str
last_loaded_source

The path to the last file this object was loaded from.

Type:str
data

When this object is loaded, complex variables can be stored in data. For instance, an xarray object could be set as the data. Generally speaking it is where the large (in terms of memory) objects are stored after loading.

Type:Any
results

A dictionary of results.

Type:dict
available_data

A list of the available data on this recording as a string description. E.g. [“spatial:running_speed”, “ophys:deltaf/f”, “behaviour:lick_times”] This can be used in functions explicitly by following types, such as those in pynwb, or simply as a helpful flag when debugging/analysing etc.

Type:list[str]

See also

simuran.base_class.BaseSimuran

get_name_for_save(rel_dir=None)

Get the name of the recording for saving purposes.

This is very useful when plotting. For example, if the recording is in foo/bar/foo/pie.py Then passing rel_dir as foo, would return the name as bar–foo–pie

Parameters:str, optional (rel_dir,) – The directory to take the path relative to, default is None. If None, it returns the full path with os.sep replaced by – and with no extension.
Returns:The name for saving, it has no extension and os.sep replaced by –
Return type:str
load()

Load each available attribute.

parse_metadata()

Parse the metadata.

parse_table_row(table, index)

Parse the table row.

summarise() → str