allensdk.brain_observatory.behavior.data_objects.task_parameters module

class allensdk.brain_observatory.behavior.data_objects.task_parameters.BehaviorStimulusType(*values)[source]

Bases: Enum

GRATING = 'grating'
IMAGES = 'images'
class allensdk.brain_observatory.behavior.data_objects.task_parameters.StimulusDistribution(*values)[source]

Bases: Enum

EXPONENTIAL = 'exponential'
GEOMETRIC = 'geometric'
class allensdk.brain_observatory.behavior.data_objects.task_parameters.TaskParameters(blank_duration_sec: List[float], stimulus_duration_sec: float, omitted_flash_fraction: float, response_window_sec: List[float], reward_volume: float, auto_reward_volume: float, session_type: str, stimulus: str, stimulus_distribution: StimulusDistribution, task_type: TaskType, n_stimulus_frames: int, stimulus_name: str | None = None)[source]

Bases: DataObject, StimulusFileReadableInterface, NwbReadableInterface, NwbWritableInterface

property auto_reward_volume: float
property blank_duration_sec: List[float]
classmethod from_nwb(nwbfile: NWBFile) TaskParameters[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_stimulus_file(stimulus_file: BehaviorStimulusFile) TaskParameters[source]

Populate a DataObject from the stimulus file

Returns:
DataObject:

An instantiated DataObject which has name and value properties

property image_set: str
property n_stimulus_frames: int
property omitted_flash_fraction: float
property response_window_sec: List[float]
property reward_volume: float
property session_type: str
property stimulus: str
property stimulus_distribution: float
property stimulus_duration_sec: float
property stimulus_name: str | None
property task: TaskType
to_nwb(nwbfile: NWBFile) NWBFile[source]

Given an already populated DataObject, return an pyNWB file object that had had DataObject data added.

Parameters:
nwbfileNWBFile

An NWB file object

Returns:
NWBFile

An NWB file object that has had data from the DataObject added to it.

class allensdk.brain_observatory.behavior.data_objects.task_parameters.TaskType(*values)[source]

Bases: Enum

CHANGE_DETECTION = 'change detection'