allensdk.brain_observatory.ecephys.stimulus_analysis.dot_motion module¶
-
class
allensdk.brain_observatory.ecephys.stimulus_analysis.dot_motion.
DotMotion
(ecephys_session, col_dir='Dir', col_speeds='Speed', trial_duration=1.0, **kwargs)[source]¶ Bases:
allensdk.brain_observatory.ecephys.stimulus_analysis.stimulus_analysis.StimulusAnalysis
A class for computing single-unit metrics from the dot motion stimulus of an ecephys session NWB file.
- To use, pass in a EcephysSession object::
- session = EcephysSession.from_nwb_path(‘/path/to/my.nwb’) dm_analysis = DotMotion(session)
- or, alternatively, pass in the file path::
- dm_analysis = DotMotion(‘/path/to/my.nwb’)
You can also pass in a unit filter dictionary which will only select units with certain properties. For example to get only those units which are on probe C and found in the VISp area:
dm_analysis = DotMotion(session, filter={'location': 'probeC', 'ecephys_structure_acronym': 'VISp'})
- or a list of unit_ids:
- dm_analysis = DotMotion(session, filter=[914580630, 914580280, 914580278])
- To get a table of the individual unit metrics ranked by unit ID::
- metrics_table_df = dm_analysis.metrics()
-
METRICS_COLUMNS
¶
-
directions
¶
-
known_spontaneous_keys
¶
-
classmethod
known_stimulus_keys
()[source]¶ Used for discovering the correct stimulus_name key for a given StimulusAnalysis subclass (when stimulus_key is not explicity set). Should return a list of “stimulus_name” strings.
-
metrics
¶ Returns a pandas DataFrame of the stimulus response metrics for each unit.
-
name
¶ Return the stimulus name.
-
null_condition
¶ Stimulus condition ID for null stimulus (not used, so set to -1)
-
number_directions
¶
-
number_speeds
¶
-
speeds
¶