allensdk.brain_observatory.ecephys.stimulus_analysis.flashes module¶
- class allensdk.brain_observatory.ecephys.stimulus_analysis.flashes.Flashes(ecephys_session, col_color='color', trial_duration=0.25, **kwargs)[source]¶
Bases:
StimulusAnalysisA class for computing single-unit metrics from the full-field flash stimulus of an ecephys session NWB file.
- To use, pass in a EcephysSession object::
session = EcephysSession.from_nwb_path(‘/path/to/my.nwb’) fl_analysis = Flashes(session)
- or, alternatively, pass in the file path::
fl_analysis = Flashes(‘/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:
fl_analysis = Flashes(session, filter={'location': 'probeC', 'ecephys_structure_acronym': 'VISp'})
- To get a table of the individual unit metrics ranked by unit ID::
metrics_table_df = fl_analysis.metrics()
- property METRICS_COLUMNS¶
- property colors¶
Array of ‘color’ conditions (black vs. white flash)
- 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.
- property metrics¶
Returns a pandas DataFrame of the stimulus response metrics for each unit.
- property name¶
Return the stimulus name.
- property null_condition¶
Stimulus condition ID for null stimulus (not used, so set to -1)
- property number_colors¶
Number of ‘color’ conditions (black vs. white flash)