core_nwb_image#

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 GrayscaleImage#

Bases: Image

A grayscale image.

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['* x, * y'], Number] | None = None#
field description: str | None = None#

Description of the image.

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

Pixel resolution of the image, in pixels per centimeter.

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

Bases: Image

A color image.

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['* x, * y, 3 r_g_b'], Number] | None = None#
field description: str | None = None#

Description of the image.

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

Pixel resolution of the image, in pixels per centimeter.

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

Bases: Image

A color image with transparency.

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['* x, * y, 4 r_g_b_a'], Number] | None = None#
field description: str | None = None#

Description of the image.

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

Pixel resolution of the image, in pixels per centimeter.

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

Bases: TimeSeries

General image data that is common between acquisition and stimulus time series. Sometimes the image data is stored in the file in a raw format while other times it will be stored as a series of external image files in the host file system. The data field will either be binary data, if the data is stored in the NWB file, or empty, if the data is stored in an external image stack. [frame][x][y] or [frame][x][y][z].

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 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 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 ImageSeriesData#

Bases: ConfiguredBaseModel

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

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['* frame, * x, * y'], Number] | NDArray[Shape['* frame, * x, * y, * z'], 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 ImageMaskSeries#

Bases: ImageSeries

An alpha mask that is applied to a presented visual stimulus. The ‘data’ array contains an array of mask values that are applied to the displayed image. Mask values are stored as RGBA. Mask can vary with time. The timestamps array indicates the starting time of a mask, and that mask pattern continues until it’s explicitly changed.

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 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 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 OpticalSeries#

Bases: ImageSeries

Image data that is presented or recorded. A stimulus template movie will be stored only as an image. When the image is presented as stimulus, additional data is required, such as field of view (e.g., how much of the visual field the image covers, or how what is the area of the target being imaged). If the OpticalSeries represents acquired imaging data, orientation is also important.

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: OpticalSeriesData [Required]#

Images presented to subject, either grayscale or RGB

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 distance: float | None = None#

Distance from camera/monitor to target/eye.

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: OpticalSeriesFieldOfView | 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 orientation: str | None = None#

Description of image relative to some reference frame (e.g., which way is up). Must also specify frame of reference.

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 OpticalSeriesFieldOfView#

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 OpticalSeriesData#

Bases: ConfiguredBaseModel

Images presented to subject, either grayscale or RGB

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['* frame, * x, * y'], Number] | NDArray[Shape['* frame, * x, * y, 3 r_g_b'], 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 IndexSeries#

Bases: TimeSeries

Stores indices to image frames stored in an ImageSeries. The purpose of the IndexSeries is to allow a static image stack to be stored in an Images object, and the images in the stack to be referenced out-of-order. This can be for the display of individual images, or of movie segments (as a movie is simply a series of images). The data field stores the index of the frame in the referenced Images object, and the timestamps array indicates when that image was displayed.

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: List[int] [Optional]#

Index of the image (using zero-indexing) in the linked Images object.

field description: str | None = None#

Description of the time series.

field name: str [Required]#
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)#