allensdk.brain_observatory.behavior.session_apis.abcs.session_base.behavior_ophys_base module¶
-
class
allensdk.brain_observatory.behavior.session_apis.abcs.session_base.behavior_ophys_base.
BehaviorOphysBase
[source]¶ Bases:
allensdk.brain_observatory.behavior.session_apis.abcs.session_base.behavior_base.BehaviorBase
Abstract base class implementing required methods for interacting with behavior + ophys session data.
Child classes should be instantiated with a fetch API that implements these methods.
-
get_average_projection
(self) → allensdk.brain_observatory.behavior.image_api.Image[source]¶ Get an image whose values are the average obtained values at each pixel of the ophys movie over time.
Returns: - allensdk.brain_observatory.behavior.image_api.Image:
Array-like interface to avg projection image data and metadata.
-
get_cell_specimen_table
(self) → pandas.core.frame.DataFrame[source]¶ Get a cell specimen dataframe containing ROI information about cells identified in an ophys experiment.
Returns: - pd.DataFrame
Cell ROI information organized into a dataframe. Index is the cell ROI IDs.
-
get_corrected_fluorescence_traces
(self) → pandas.core.frame.DataFrame[source]¶ Get motion-corrected fluorescence traces.
Returns: - pd.DataFrame
Motion-corrected fluorescence traces organized into a dataframe. Index is the cell ROI IDs.
-
get_dff_traces
(self) → pandas.core.frame.DataFrame[source]¶ Get a table of delta fluorescence over fluorescence traces.
Returns: - pd.DataFrame
The traces of dff (normalized fluorescence) organized into a dataframe. Index is the cell ROI IDs.
-
get_events
(self) → pandas.core.frame.DataFrame[source]¶ Get event detection data
Returns: - pd.DataFrame
- index:
cell_specimen_id: int
cell_roi_id: int events: np.array filtered_events: np.array lambdas: float64 noise_stds: float64
-
get_eye_tracking
(self) → Union[pandas.core.frame.DataFrame, NoneType][source]¶ Get eye tracking data from behavior + ophys session.
Returns: - pd.DataFrame
A refined eye tracking dataframe that contains information about eye tracking ellipse fits, frame times, eye areas, pupil areas, and frames with likely blinks/outliers.
-
get_eye_tracking_rig_geometry
(self) → dict[source]¶ Get eye tracking rig metadata from behavior + ophys session.
Returns: - dict
Includes geometry of monitor, camera, LED
-
get_max_projection
(self) → allensdk.brain_observatory.behavior.image_api.Image[source]¶ Get an image whose values are the maximum obtained values at each pixel of the ophys movie over time.
Returns: - allensdk.brain_observatory.behavior.image_api.Image:
Array-like interface to max projection image data and metadata.
-
get_metadata
(self) → Union[allensdk.brain_observatory.behavior.metadata.behavior_ophys_metadata.BehaviorOphysMetadata, dict][source]¶ Get behavior+ophys session metadata.
Returns: - dict if NWB
- BehaviorOphysMetadata otherwise
-
get_motion_correction
(self) → pandas.core.frame.DataFrame[source]¶ Get motion correction trace data.
Returns: - pd.DataFrame
A dataframe containing trace data used during motion correction computation.
-
get_ophys_experiment_id
(self) → Union[int, NoneType][source]¶ Returns the ophys_experiment_id for the instantiated BehaviorOphys Session (or BehaviorOphys data fetcher) if applicable.
-
get_ophys_session_id
(self) → Union[int, NoneType][source]¶ Returns the behavior + ophys_session_id associated with this experiment, if applicable.
-
get_ophys_timestamps
(self) → numpy.ndarray[source]¶ Get optical physiology frame timestamps.
Returns: - np.ndarray
Timestamps associated with frames captured by the microscope.
-
get_stimulus_presentations
(self) → pandas.core.frame.DataFrame[source]¶ Get stimulus presentation data.
NOTE: Uses monitor delay corrected stimulus timestamps.
Returns: - pd.DataFrame
Table whose rows are stimulus presentations (i.e. a given image, for a given duration, typically 250 ms) and whose columns are presentation characteristics.
-