core_nwb_file#

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

Bases: NWBData

Any one-off datasets

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

Any notes the user has about the dataset being stored

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

Bases: NWBContainer

An NWB file storing cellular-based neurophysiology data from a single experimental session.

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 acquisition: Dict[str, DynamicTable | NWBDataInterface] | None [Optional]#

Data streams recorded from the system, including ephys, ophys, tracking, etc. This group should be read-only after the experiment is completed and timestamps are corrected to a common timebase. The data stored here may be links to raw data stored in external NWB files. This will allow keeping bulky raw data out of the file while preserving the option of keeping some/all in the file. Acquired data includes tracking and experimental data streams (i.e., everything measured from the system). If bulky data is stored in the /acquisition group, the data can exist in a separate NWB file that is linked to by the file being used for processing and analysis.

field analysis: Dict[str, DynamicTable | NWBContainer] | None [Optional]#

Lab-specific and custom scientific analysis of data. There is no defined format for the content of this group - the format is up to the individual user/lab. To facilitate sharing analysis data between labs, the contents here should be stored in standard types (e.g., neurodata_types) and appropriately documented. The file can store lab-specific and custom data analysis without restriction on its form or schema, reducing data formatting restrictions on end users. Such data should be placed in the analysis group. The analysis data should be documented so that it could be shared with other labs.

field file_create_date: List[datetime] [Optional]#

A record of the date the file was created and of subsequent modifications. The date is stored in UTC with local timezone offset as ISO 8601 extended formatted strings: 2018-09-28T14:43:54.123+02:00. Dates stored in UTC end in “Z” with no timezone offset. Date accuracy is up to milliseconds. The file can be created after the experiment was run, so this may differ from the experiment start time. Each modification to the nwb file adds a new entry to the array.

field general: NWBFileGeneral [Required]#

Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under ‘general’. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within them.

field identifier: str [Required]#

A unique text identifier for the file. For example, concatenated lab name, file creation date/time and experimentalist, or a hash of these and/or other values. The goal is that the string should be unique to all other files.

field intervals: NWBFileIntervals | None = None#

Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.

field name: Literal['root'] = 'root'#
field nwb_version: str | None = None#

File version string. Use semantic versioning, e.g. 1.2.1. This will be the name of the format with trailing major, minor and patch numbers.

field processing: Dict[str, ProcessingModule] | None [Optional]#

The home for ProcessingModules. These modules perform intermediate analysis of data that is necessary to perform before scientific analysis. Examples include spike clustering, extracting position from tracking data, stitching together image slices. ProcessingModules can be large and express many data sets from relatively complex analysis (e.g., spike detection and clustering) or small, representing extraction of position information from tracking video, or even binary lick/no-lick decisions. Common software tools (e.g., klustakwik, MClust) are expected to read/write data here. ‘Processing’ refers to intermediate analysis of the acquired data to make it more amenable to scientific analysis.

field scratch: Dict[str, DynamicTable | NWBContainer] | None [Optional]#

A place to store one-off analysis results. Data placed here is not intended for sharing. By placing data here, users acknowledge that there is no guarantee that their data meets any standard.

field session_description: str [Required]#

A description of the experimental session and data in the file.

field session_start_time: datetime [Required]#

Date and time of the experiment/session start. The date is stored in UTC with local timezone offset as ISO 8601 extended formatted string: 2018-09-28T14:43:54.123+02:00. Dates stored in UTC end in “Z” with no timezone offset. Date accuracy is up to milliseconds.

field stimulus: NWBFileStimulus [Required]#

Data pushed into the system (eg, video stimulus, sound, voltage, etc) and secondary representations of that data (eg, measurements of something used as a stimulus). This group should be made read-only after experiment complete and timestamps are corrected to common timebase. Stores both presented stimuli and stimulus templates, the latter in case the same stimulus is presented multiple times, or is pulled from an external stimulus library. Stimuli are here defined as any signal that is pushed into the system as part of the experiment (eg, sound, video, voltage, etc). Many different experiments can use the same stimuli, and stimuli can be re-used during an experiment. The stimulus group is organized so that one version of template stimuli can be stored and these be used multiple times. These templates can exist in the present file or can be linked to a remote library file.

field timestamps_reference_time: datetime [Required]#

Date and time corresponding to time zero of all timestamps. The date is stored in UTC with local timezone offset as ISO 8601 extended formatted string: 2018-09-28T14:43:54.123+02:00. Dates stored in UTC end in “Z” with no timezone offset. Date accuracy is up to milliseconds. All times stored in the file use this time as reference (i.e., time zero).

field units: Units | None = None#

Data about sorted spike units.

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

Bases: ConfiguredBaseModel

Data pushed into the system (eg, video stimulus, sound, voltage, etc) and secondary representations of that data (eg, measurements of something used as a stimulus). This group should be made read-only after experiment complete and timestamps are corrected to common timebase. Stores both presented stimuli and stimulus templates, the latter in case the same stimulus is presented multiple times, or is pulled from an external stimulus library. Stimuli are here defined as any signal that is pushed into the system as part of the experiment (eg, sound, video, voltage, etc). Many different experiments can use the same stimuli, and stimuli can be re-used during an experiment. The stimulus group is organized so that one version of template stimuli can be stored and these be used multiple times. These templates can exist in the present file or can be linked to a remote library file.

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 name: Literal['stimulus'] = 'stimulus'#
field presentation: Dict[str, TimeSeries] | None [Optional]#

Stimuli presented during the experiment.

field templates: Dict[str, Images | TimeSeries] | None [Optional]#

Template stimuli. Timestamps in templates are based on stimulus design and are relative to the beginning of the stimulus. When templates are used, the stimulus instances must convert presentation times to the experiment`s time reference frame.

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

Bases: ConfiguredBaseModel

Experimental metadata, including protocol, notes and description of hardware device(s). The metadata stored in this section should be used to describe the experiment. Metadata necessary for interpreting the data is stored with the data. General experimental metadata, including animal strain, experimental protocols, experimenter, devices, etc, are stored under ‘general’. Core metadata (e.g., that required to interpret data fields) is stored with the data itself, and implicitly defined by the file specification (e.g., time is in seconds). The strategy used here for storing non-core metadata is to use free-form text fields, such as would appear in sentences or paragraphs from a Methods section. Metadata fields are text to enable them to be more general, for example to represent ranges instead of numerical values. Machine-readable metadata is stored as attributes to these free-form datasets. All entries in the below table are to be included when data is present. Unused groups (e.g., intracellular_ephys in an optophysiology experiment) should not be created unless there is data to store within 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 data_collection: str | None = None#

Notes about data collection and analysis.

field devices: Dict[str, Device] | None [Optional]#

Description of hardware devices used during experiment, e.g., monitors, ADC boards, microscopes, etc.

field experiment_description: str | None = None#

General description of the experiment.

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

Name of person(s) who performed the experiment. Can also specify roles of different people involved.

field extracellular_ephys: NWBFileGeneralExtracellularEphys | None = None#

Metadata related to extracellular electrophysiology.

field institution: str | None = None#

Institution(s) where experiment was performed.

field intracellular_ephys: NWBFileGeneralIntracellularEphys | None = None#

Metadata related to intracellular electrophysiology.

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

Terms to search over.

field lab: str | None = None#

Laboratory where experiment was performed.

field lab_meta_data: List[LabMetaData] | None [Optional]#

Place-holder than can be extended so that lab-specific meta-data can be placed in /general.

field name: Literal['general'] = 'general'#
field notes: str | None = None#

Notes about the experiment.

field optogenetics: Dict[str, OptogeneticStimulusSite] | None [Optional]#

Metadata describing optogenetic stimuluation.

field optophysiology: Dict[str, ImagingPlane] | None [Optional]#

Metadata related to optophysiology.

field pharmacology: str | None = None#

Description of drugs used, including how and when they were administered. Anesthesia(s), painkiller(s), etc., plus dosage, concentration, etc.

field protocol: str | None = None#

Experimental protocol, if applicable. e.g., include IACUC protocol number.

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

Publication information. PMID, DOI, URL, etc.

field session_id: str | None = None#

Lab-specific ID for the session.

field slices: str | None = None#

Description of slices, including information about preparation thickness, orientation, temperature, and bath solution.

field source_script: NWBFileGeneralSourceScript | None = None#

Script file or link to public source code used to create this NWB file.

field stimulus: str | None = None#

Notes about stimuli, such as how and where they were presented.

field subject: Subject | None = None#

Information about the animal or person from which the data was measured.

field surgery: str | None = None#

Narrative description about surgery/surgeries, including date(s) and who performed surgery.

field virus: str | None = None#

Information about virus(es) used in experiments, including virus ID, source, date made, injection location, volume, etc.

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

Bases: ConfiguredBaseModel

Script file or link to public source code used to create this NWB file.

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

Name of script file.

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

Bases: ConfiguredBaseModel

Metadata related to extracellular electrophysiology.

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 electrode_group: List[ElectrodeGroup] | None [Optional]#

Physical group of electrodes.

field electrodes: NWBFileGeneralExtracellularEphysElectrodes | None = None#

A table of all electrodes (i.e. channels) used for recording.

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

Bases: DynamicTable

A table of all electrodes (i.e. channels) used for recording.

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 filtering: List[str] | None [Optional]#

Description of hardware filtering, including the filter name and frequency cutoffs.

field group: List[ElectrodeGroup] | None [Optional]#

Reference to the ElectrodeGroup this electrode is a part of.

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

Name of the ElectrodeGroup this electrode is a part of.

field id: List[int] [Optional]#

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

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

Impedance of the channel, in ohms.

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

Location of the electrode (channel). Specify the area, layer, comments on estimation of area/layer, stereotaxic coordinates if in vivo, etc. Use standard atlas names for anatomical regions when possible.

field name: Literal['electrodes'] = 'electrodes'#
field reference: List[str] | None [Optional]#

Description of the reference electrode and/or reference scheme used for this electrode, e.g., “stainless steel skull screw” or “online common average referencing”.

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

x coordinate in electrode group

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

y coordinate in electrode group

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

z coordinate in electrode group

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

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

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

x coordinate of the channel location in the brain (+x is posterior).

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

y coordinate of the channel location in the brain (+y is inferior).

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

z coordinate of the channel location in the brain (+z is right).

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

Bases: ConfiguredBaseModel

Metadata related to intracellular electrophysiology.

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 experimental_conditions: ExperimentalConditionsTable | None = None#

A table for grouping different intracellular recording repetitions together that belong to the same experimental experimental_conditions.

field filtering: str | None = None#

[DEPRECATED] Use IntracellularElectrode.filtering instead. Description of filtering used. Includes filtering type and parameters, frequency fall-off, etc. If this changes between TimeSeries, filter description should be stored as a text attribute for each TimeSeries.

field intracellular_electrode: List[IntracellularElectrode] | None [Optional]#

An intracellular electrode.

field intracellular_recordings: IntracellularRecordingsTable | None = None#

A table to group together a stimulus and response from a single electrode and a single simultaneous recording. Each row in the table represents a single recording consisting typically of a stimulus and a corresponding response. In some cases, however, only a stimulus or a response are recorded as as part of an experiment. In this case both, the stimulus and response will point to the same TimeSeries while the idx_start and count of the invalid column will be set to -1, thus, indicating that no values have been recorded for the stimulus or response, respectively. Note, a recording MUST contain at least a stimulus or a response. Typically the stimulus and response are PatchClampSeries. However, the use of AD/DA channels that are not associated to an electrode is also common in intracellular electrophysiology, in which case other TimeSeries may be used.

field name: Literal['intracellular_ephys'] = 'intracellular_ephys'#
field repetitions: RepetitionsTable | None = None#

A table for grouping different sequential intracellular recordings together. With each SequentialRecording typically representing a particular type of stimulus, the RepetitionsTable table is typically used to group sets of stimuli applied in sequence.

field sequential_recordings: SequentialRecordingsTable | None = None#

A table for grouping different sequential recordings from the SimultaneousRecordingsTable table together. This is typically used to group together sequential recordings where the a sequence of stimuli of the same type with varying parameters have been presented in a sequence.

field simultaneous_recordings: SimultaneousRecordingsTable | None = None#

A table for grouping different intracellular recordings from the IntracellularRecordingsTable table together that were recorded simultaneously from different electrodes

field sweep_table: SweepTable | None = None#

[DEPRECATED] Table used to group different PatchClampSeries. SweepTable is being replaced by IntracellularRecordingsTable and SimultaneousRecordingsTable tabels. Additional SequentialRecordingsTable, RepetitionsTable and ExperimentalConditions tables provide enhanced support for experiment metadata.

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

Bases: ConfiguredBaseModel

Experimental intervals, whether that be logically distinct sub-experiments having a particular scientific goal, trials (see trials subgroup) during an experiment, or epochs (see epochs subgroup) deriving from analysis of data.

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 epochs: TimeIntervals | None = None#

Divisions in time marking experimental stages or sub-divisions of a single recording session.

field invalid_times: TimeIntervals | None = None#

Time intervals that should be removed from analysis.

field name: Literal['intervals'] = 'intervals'#
field time_intervals: List[TimeIntervals] | None [Optional]#

Optional additional table(s) for describing other experimental time intervals.

field trials: TimeIntervals | None = None#

Repeated experimental events that have a logical grouping.

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

Bases: NWBContainer

Lab-specific meta-data.

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 name: str [Required]#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=True), frozen=True)#
pydantic model Subject#

Bases: NWBContainer

Information about the animal or person from which the data was measured.

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 age: SubjectAge | None = None#

Age of subject. Can be supplied instead of ‘date_of_birth’.

field date_of_birth: datetime | None = None#

Date of birth of subject. Can be supplied instead of ‘age’.

field description: str | None = None#

Description of subject and where subject came from (e.g., breeder, if animal).

field genotype: str | None = None#

Genetic strain. If absent, assume Wild Type (WT).

field name: str [Required]#
field sex: str | None = None#

Gender of subject.

field species: str | None = None#

Species of subject.

field strain: str | None = None#

Strain of subject.

field subject_id: str | None = None#

ID of animal/person used/participating in experiment (lab convention).

field weight: str | None = None#

Weight at time of experiment, at time of surgery and at other important times.

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

Bases: ConfiguredBaseModel

Age of subject. Can be supplied instead of ‘date_of_birth’.

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 name: Literal['age'] = 'age'#
field reference: str | None = None#

Age is with reference to this event. Can be ‘birth’ or ‘gestational’. If reference is omitted, ‘birth’ is implied.

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