allensdk.brain_observatory.behavior.session_apis.data_io.behavior_json_api module

class allensdk.brain_observatory.behavior.session_apis.data_io.behavior_json_api.BehaviorJsonApi(data)[source]

Bases: allensdk.brain_observatory.behavior.session_apis.data_transforms.behavior_data_transforms.BehaviorDataTransforms

A data fetching and processing class that serves processed data from a specified raw data source (extractor). Contains all methods needed to fill a BehaviorSession.

class allensdk.brain_observatory.behavior.session_apis.data_io.behavior_json_api.BehaviorJsonExtractor(data)[source]

Bases: allensdk.brain_observatory.behavior.session_apis.abcs.data_extractor_base.behavior_data_extractor_base.BehaviorDataExtractorBase

A class which ‘extracts’ data from a json file. The extracted data is necessary (but not sufficient) for populating a ‘BehaviorSession’.

Most data provided by this extractor needs to be processed by BehaviorDataTransforms methods in order to usable by ‘BehaviorSession’s.

This class is used by the write_nwb module for behavior sessions.

get_age(self) → str[source]

Get the age code of the subject (ie P123)

get_behavior_session_id(self) → int[source]

Get the ID of the behavior session

get_behavior_stimulus_file(self) → str[source]

Get the filepath to the StimulusPickle file for the session

get_date_of_acquisition(self) → datetime.datetime[source]

Get the acquisition date of an experiment (in UTC)

NOTE: LIMS writes to JSON in local time. Needs to be converted to UTC

get_driver_line(self) → str[source]

Get the (gene) driver line for the subject associated with an experiment

get_equipment_name(self) → str[source]

Get the name of the experiment rig (ex: CAM2P.3)

get_foraging_id(self) → int[source]

Get the foraging ID for the behavior session

get_full_genotype(self) → str[source]

Get the full genotype of the subject associated with an experiment

get_mouse_id(self) → int[source]

Get the external specimen id (LabTracks ID) for the subject associated with a behavior experiment

get_reporter_line(self) → str[source]

Get the (gene) reporter line for the subject associated with an experiment

get_sex(self) → str[source]

Get the sex of the subject (ex: ‘M’, ‘F’, or ‘unknown’)