allensdk.brain_observatory.behavior.data_objects.timestamps.ophys_timestamps module

class allensdk.brain_observatory.behavior.data_objects.timestamps.ophys_timestamps.OphysTimestamps(timestamps: ndarray)[source]

Bases: DataObject, SyncFileReadableInterface, NwbReadableInterface

classmethod from_nwb(nwbfile: NWBFile) OphysTimestamps[source]

Populate a DataObject from a pyNWB file object.

Parameters:
nwbfile:

The file object (NWBFile) of a pynwb dataset file.

Returns:
DataObject:

An instantiated DataObject which has name and value properties

classmethod from_sync_file(sync_file: SyncFile) OphysTimestamps[source]

Populate a DataObject from the sync file

Returns:
DataObject:

An instantiated DataObject which has name and value properties

validate(number_of_frames: int) OphysTimestamps[source]

Validates that number of ophys timestamps do not exceed number of dff traces. If so, truncates number of ophys timestamps to the same length as dff traces

:param number_of_frames

number of frames in the movie

Notes

Modifies self._value if ophys timestamps exceed length of number_of_frames

class allensdk.brain_observatory.behavior.data_objects.timestamps.ophys_timestamps.OphysTimestampsMultiplane(timestamps: ndarray)[source]

Bases: OphysTimestamps

classmethod from_sync_file(sync_file: SyncFile, group_count: int, plane_group: int) OphysTimestampsMultiplane[source]

Populate a DataObject from the sync file

Returns:
DataObject:

An instantiated DataObject which has name and value properties

validate(number_of_frames: int) OphysTimestampsMultiplane[source]

Raises error if length of timestamps and number of frames are not equal :param number_of_frames

See super().validate