core_nwb_ophys#

pydantic model ConfiguredBaseModel#

Bases: BaseModel

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field hdf5_path: str | None = None#

The absolute path that this object is stored in an NWB file

pydantic model LinkML_Meta#

Bases: BaseModel

Extra LinkML Metadata stored as a class attribute

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Fields:
field tree_root: bool = False#
pydantic model OnePhotonSeries#

Bases: ImageSeries

Image stack recorded over time from 1-photon microscope.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field binning: int | None = None#

Amount of pixels combined into ‘bins’; could be 1, 2, 4, 8, etc.

field comments: str | None = None#

Human-readable comments about the TimeSeries. This second descriptive field can be used to store additional information, or descriptive information if the primary description field is populated with a computer-readable string.

field control: List[int] | None [Optional]#

Numerical labels that apply to each time point in data for the purpose of querying and slicing data by these values. If present, the length of this array should be the same size as the first dimension of data.

field control_description: List[str] | None [Optional]#

Description of each control value. Must be present if control is present. If present, control_description[0] should describe time points where control == 0.

field data: ImageSeriesData [Required]#

Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.

field description: str | None = None#

Description of the time series.

field dimension: List[int] | None [Optional]#

Number of pixels on x, y, (and z) axes.

field exposure_time: float | None = None#

Exposure time of the sample; often the inverse of the frequency.

field external_file: List[str] | None [Optional]#

Paths to one or more external file(s). The field is only present if format=’external’. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.

field format: str | None = None#

Format of image. If this is ‘external’, then the attribute ‘external_file’ contains the path information to the image files. If this is ‘raw’, then the raw (single-channel) binary data is stored in the ‘data’ dataset. If this attribute is not present, then the default format=’raw’ case is assumed.

field intensity: float | None = None#

Intensity of the excitation in mW/mm^2, if known.

field name: str [Required]#
field pmt_gain: float | None = None#

Photomultiplier gain.

field power: float | None = None#

Power of the excitation in mW, if known.

field scan_line_rate: float | None = None#

Lines imaged per second. This is also stored in /general/optophysiology but is kept here as it is useful information for analysis, and so good to be stored w/ the actual data.

field starting_time: TimeSeriesStartingTime | None = None#

Timestamp of the first sample in seconds. When timestamps are uniformly spaced, the timestamp of the first sample can be specified and all subsequent ones calculated from the sampling rate attribute.

field sync: TimeSeriesSync | None = None#

Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of ‘sync’ are mostly for archival purposes.

field timestamps: List[float] | None [Optional]#

Timestamps for samples stored in data, in seconds, relative to the common experiment master-clock stored in NWBFile.timestamps_reference_time.

linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#
pydantic model TwoPhotonSeries#

Bases: ImageSeries

Image stack recorded over time from 2-photon microscope.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field comments: str | None = None#

Human-readable comments about the TimeSeries. This second descriptive field can be used to store additional information, or descriptive information if the primary description field is populated with a computer-readable string.

field control: List[int] | None [Optional]#

Numerical labels that apply to each time point in data for the purpose of querying and slicing data by these values. If present, the length of this array should be the same size as the first dimension of data.

field control_description: List[str] | None [Optional]#

Description of each control value. Must be present if control is present. If present, control_description[0] should describe time points where control == 0.

field data: ImageSeriesData [Required]#

Binary data representing images across frames. If data are stored in an external file, this should be an empty 3D array.

field description: str | None = None#

Description of the time series.

field dimension: List[int] | None [Optional]#

Number of pixels on x, y, (and z) axes.

field external_file: List[str] | None [Optional]#

Paths to one or more external file(s). The field is only present if format=’external’. This is only relevant if the image series is stored in the file system as one or more image file(s). This field should NOT be used if the image is stored in another NWB file and that file is linked to this file.

field field_of_view: TwoPhotonSeriesFieldOfView | None = None#

Width, height and depth of image, or imaged area, in meters.

field format: str | None = None#

Format of image. If this is ‘external’, then the attribute ‘external_file’ contains the path information to the image files. If this is ‘raw’, then the raw (single-channel) binary data is stored in the ‘data’ dataset. If this attribute is not present, then the default format=’raw’ case is assumed.

field name: str [Required]#
field pmt_gain: float | None = None#

Photomultiplier gain.

field scan_line_rate: float | None = None#

Lines imaged per second. This is also stored in /general/optophysiology but is kept here as it is useful information for analysis, and so good to be stored w/ the actual data.

field starting_time: TimeSeriesStartingTime | None = None#

Timestamp of the first sample in seconds. When timestamps are uniformly spaced, the timestamp of the first sample can be specified and all subsequent ones calculated from the sampling rate attribute.

field sync: TimeSeriesSync | None = None#

Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of ‘sync’ are mostly for archival purposes.

field timestamps: List[float] | None [Optional]#

Timestamps for samples stored in data, in seconds, relative to the common experiment master-clock stored in NWBFile.timestamps_reference_time.

linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#
pydantic model TwoPhotonSeriesFieldOfView#

Bases: ConfiguredBaseModel

Width, height and depth of image, or imaged area, in meters.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field array: NDArray[Shape['2 width_height'], Float32] | NDArray[Shape['2 width_height, 3 width_height_depth'], Float32] | None = None#
field name: Literal['field_of_view'] = 'field_of_view'#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=False), frozen=True)#
pydantic model RoiResponseSeries#

Bases: TimeSeries

ROI responses over an imaging plane. The first dimension represents time. The second dimension, if present, represents ROIs.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field comments: str | None = None#

Human-readable comments about the TimeSeries. This second descriptive field can be used to store additional information, or descriptive information if the primary description field is populated with a computer-readable string.

field control: List[int] | None [Optional]#

Numerical labels that apply to each time point in data for the purpose of querying and slicing data by these values. If present, the length of this array should be the same size as the first dimension of data.

field control_description: List[str] | None [Optional]#

Description of each control value. Must be present if control is present. If present, control_description[0] should describe time points where control == 0.

field data: RoiResponseSeriesData [Required]#

Signals from ROIs.

field description: str | None = None#

Description of the time series.

field name: str [Required]#
field rois: RoiResponseSeriesRois [Required]#

DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.

field starting_time: TimeSeriesStartingTime | None = None#

Timestamp of the first sample in seconds. When timestamps are uniformly spaced, the timestamp of the first sample can be specified and all subsequent ones calculated from the sampling rate attribute.

field sync: TimeSeriesSync | None = None#

Lab-specific time and sync information as provided directly from hardware devices and that is necessary for aligning all acquired time information to a common timebase. The timestamp array stores time in the common timebase. This group will usually only be populated in TimeSeries that are stored external to the NWB file, in files storing raw data. Once timestamp data is calculated, the contents of ‘sync’ are mostly for archival purposes.

field timestamps: List[float] | None [Optional]#

Timestamps for samples stored in data, in seconds, relative to the common experiment master-clock stored in NWBFile.timestamps_reference_time.

linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#
pydantic model RoiResponseSeriesData#

Bases: ConfiguredBaseModel

Signals from ROIs.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field array: NDArray[Shape['* num_times'], Number] | NDArray[Shape['* num_times, * num_ROIs'], Number] | None = None#
field name: Literal['data'] = 'data'#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=False), frozen=True)#
pydantic model RoiResponseSeriesRois#

Bases: DynamicTableRegion

DynamicTableRegion referencing into an ROITable containing information on the ROIs stored in this timeseries.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field array: NDArray[Shape['* dim0'], Any] | NDArray[Shape['* dim0, * dim1'], Any] | NDArray[Shape['* dim0, * dim1, * dim2'], Any] | NDArray[Shape['* dim0, * dim1, * dim2, * dim3'], Any] | None = None#
field description: str | None = None#

Description of what this table region points to.

field name: Literal['rois'] = 'rois'#
field table: DynamicTable | None = None#

Reference to the DynamicTable object that this region applies to.

linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=False), frozen=True)#
pydantic model DfOverF#

Bases: NWBDataInterface

dF/F information about a region of interest (ROI). Storage hierarchy of dF/F should be the same as for segmentation (i.e., same names for ROIs and for image planes).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field children: Dict[str, RoiResponseSeries] | None [Optional]#
field name: str [Required]#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#
pydantic model Fluorescence#

Bases: NWBDataInterface

Fluorescence information about a region of interest (ROI). Storage hierarchy of fluorescence should be the same as for segmentation (ie, same names for ROIs and for image planes).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field children: Dict[str, RoiResponseSeries] | None [Optional]#
field name: str [Required]#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#
pydantic model ImageSegmentation#

Bases: NWBDataInterface

Stores pixels in an image that represent different regions of interest (ROIs) or masks. All segmentation for a given imaging plane is stored together, with storage for multiple imaging planes (masks) supported. Each ROI is stored in its own subgroup, with the ROI group containing both a 2D mask and a list of pixels that make up this mask. Segments can also be used for masking neuropil. If segmentation is allowed to change with time, a new imaging plane (or module) is required and ROI names should remain consistent between them.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field children: Dict[str, PlaneSegmentation] | None [Optional]#
field name: str [Required]#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#
pydantic model PlaneSegmentation#

Bases: DynamicTable

Results from image segmentation of a specific imaging plane.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field colnames: str | None = None#

The names of the columns in this table. This should be used to specify an order to the columns.

field description: str | None = None#

Description of what is in this dynamic table.

field id: List[int] [Optional]#

Array of unique identifiers for the rows of this dynamic table.

field image_mask: PlaneSegmentationImageMask | None = None#

ROI masks for each ROI. Each image mask is the size of the original imaging plane (or volume) and members of the ROI are finite non-zero.

field name: str [Required]#
field pixel_mask: List[Any] | None [Optional]#

Pixel masks for each ROI: a list of indices and weights for the ROI. Pixel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation

field pixel_mask_index: PlaneSegmentationPixelMaskIndex | None = None#

Index into pixel_mask.

field reference_images: Dict[str, ImageSeries] | None [Optional]#

Image stacks that the segmentation masks apply to.

field vector_data: List[VectorData] | None [Optional]#

Vector columns, including index columns, of this dynamic table.

field voxel_mask: List[Any] | None [Optional]#

Voxel masks for each ROI: a list of indices and weights for the ROI. Voxel masks are concatenated and parsing of this dataset is maintained by the PlaneSegmentation

field voxel_mask_index: PlaneSegmentationVoxelMaskIndex | None = None#

Index into voxel_mask.

linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#
pydantic model PlaneSegmentationImageMask#

Bases: VectorData

ROI masks for each ROI. Each image mask is the size of the original imaging plane (or volume) and members of the ROI are finite non-zero.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field array: NDArray[Shape['* dim0'], Any] | NDArray[Shape['* dim0, * dim1'], Any] | NDArray[Shape['* dim0, * dim1, * dim2'], Any] | NDArray[Shape['* dim0, * dim1, * dim2, * dim3'], Any] | None = None#
field description: str | None = None#

Description of what these vectors represent.

field name: Literal['image_mask'] = 'image_mask'#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=False), frozen=True)#
pydantic model PlaneSegmentationPixelMaskIndex#

Bases: VectorIndex

Index into pixel_mask.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field array: NDArray[Shape['* dim0'], Any] | NDArray[Shape['* dim0, * dim1'], Any] | NDArray[Shape['* dim0, * dim1, * dim2'], Any] | NDArray[Shape['* dim0, * dim1, * dim2, * dim3'], Any] | None = None#
field description: str | None = None#

Description of what these vectors represent.

field name: Literal['pixel_mask_index'] = 'pixel_mask_index'#
field target: VectorData | None = None#

Reference to the target dataset that this index applies to.

linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=False), frozen=True)#
pydantic model PlaneSegmentationVoxelMaskIndex#

Bases: VectorIndex

Index into voxel_mask.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field array: NDArray[Shape['* dim0'], Any] | NDArray[Shape['* dim0, * dim1'], Any] | NDArray[Shape['* dim0, * dim1, * dim2'], Any] | NDArray[Shape['* dim0, * dim1, * dim2, * dim3'], Any] | None = None#
field description: str | None = None#

Description of what these vectors represent.

field name: Literal['voxel_mask_index'] = 'voxel_mask_index'#
field target: VectorData | None = None#

Reference to the target dataset that this index applies to.

linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=False), frozen=True)#
pydantic model ImagingPlane#

Bases: NWBContainer

An imaging plane and its metadata.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field children: Dict[str, OpticalChannel] | None [Optional]#
field name: str [Required]#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#
pydantic model OpticalChannel#

Bases: NWBContainer

An optical channel used to record from an imaging plane.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field description: str [Required]#

Description or other notes about the channel.

field emission_lambda: float [Required]#

Emission wavelength for channel, in nm.

field name: str [Required]#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#
pydantic model MotionCorrection#

Bases: NWBDataInterface

An image stack where all frames are shifted (registered) to a common coordinate system, to account for movement and drift between frames. Note: each frame at each point in time is assumed to be 2-D (has only x & y dimensions).

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field children: Dict[str, CorrectedImageStack] | None [Optional]#
field name: str [Required]#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#
pydantic model CorrectedImageStack#

Bases: NWBDataInterface

Reuslts from motion correction of an image stack.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

__init__ uses __pydantic_self__ instead of the more common self for the first arg to allow self as a field name.

Config:
  • validate_assignment: bool = True

  • validate_default: bool = True

  • extra: str = forbid

  • arbitrary_types_allowed: bool = True

  • use_enum_values: bool = True

Fields:
field corrected: ImageSeries [Required]#

Image stack with frames shifted to the common coordinates.

field name: str [Required]#
field xy_translation: TimeSeries [Required]#

Stores the x,y delta necessary to align each frame to the common coordinates, for example, to align each frame to a reference image.

linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#