allensdk.brain_observatory.behavior.session_apis.data_io.behavior_lims_api module¶
-
class
allensdk.brain_observatory.behavior.session_apis.data_io.behavior_lims_api.
BehaviorLimsApi
(behavior_session_id: Optional[int] = None, lims_credentials: Optional[allensdk.core.authentication.DbCredentials] = None, mtrain_credentials: Optional[allensdk.core.authentication.DbCredentials] = None, extractor: Optional[allensdk.brain_observatory.behavior.session_apis.abcs.data_extractor_base.behavior_data_extractor_base.BehaviorDataExtractorBase] = None)[source]¶ Bases:
allensdk.brain_observatory.behavior.session_apis.data_transforms.behavior_data_transforms.BehaviorDataTransforms
,allensdk.core.cache_method_utilities.CachedInstanceMethodMixin
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_lims_api.
BehaviorLimsExtractor
(behavior_session_id: int, lims_credentials: Optional[allensdk.core.authentication.DbCredentials] = None, mtrain_credentials: Optional[allensdk.core.authentication.DbCredentials] = None)[source]¶ -
A data fetching class that serves as an API for fetching ‘raw’ data from LIMS necessary (but not sufficient) for filling a ‘BehaviorSession’.
Most ‘raw’ data provided by this API needs to be processed by BehaviorDataTransforms methods in order to usable by ‘BehaviorSession’s
-
classmethod
from_foraging_id
(foraging_id: Union[str, uuid.UUID, int], lims_credentials: Union[allensdk.core.authentication.DbCredentials, NoneType] = None) → 'BehaviorLimsApi'[source]¶ Create a BehaviorLimsAPI instance from a foraging_id instead of a behavior_session_id.
- NOTE: ‘foraging_id’ in the LIMS behavior_session table should be
- the same as the ‘behavior_session_uuid’ in mtrain which should also be the same as the ‘session_uuid’ field in the .pkl returned by ‘get_behavior_stimulus_file()’.
-
get_behavior_stimulus_file
(self) → str[source]¶ Return the path to the StimulusPickle file for a session. :rtype: str
-
get_birth_date
(self) → datetime.datetime[source]¶ Returns the birth date of the animal. :rtype: datetime.date
-
get_date_of_acquisition
(self) → datetime.datetime[source]¶ Get the acquisition date of a behavior_session in UTC :rtype: datetime
-
get_driver_line
(self) → List[str][source]¶ Returns the genotype name(s) of the driver line(s). :rtype: list
-
classmethod