core_nwb_ecephys#

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

Bases: TimeSeries

A time series of acquired voltage data from extracellular recordings. The data field is an int or float array storing data in volts. The first dimension should always represent time. The second dimension, if present, should represent channels.

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 channel_conversion: List[float] | None [Optional]#

Channel-specific conversion factor. Multiply the data in the ‘data’ dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the ‘conversion’ attribute of ‘data’ to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.

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

Recorded voltage data.

field description: str | None = None#

Description of the time series.

field electrodes: ElectricalSeriesElectrodes [Required]#

DynamicTableRegion pointer to the electrodes that this time series was generated from.

field filtering: str | None = None#

Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be “High-pass 4-pole Bessel filter at 500 Hz”. If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be “Low-pass filter at 300 Hz”. If a non-standard filter type is used, provide as much detail about the filter properties as possible.

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

Bases: ConfiguredBaseModel

Recorded voltage 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 array: NDArray[Shape['* num_times'], Number] | NDArray[Shape['* num_times, * num_channels'], Number] | NDArray[Shape['* num_times, * num_channels, * num_samples'], Number] | None = None#
field name: Literal['data'] = 'data'#
field unit: str | None = None#

Base unit of measurement for working with the data. This value is fixed to ‘volts’. Actual stored values are not necessarily stored in these units. To access the data in these units, multiply ‘data’ by ‘conversion’, followed by ‘channel_conversion’ (if present), and then add ‘offset’.

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

Bases: DynamicTableRegion

DynamicTableRegion pointer to the electrodes that this time series was generated from.

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['electrodes'] = 'electrodes'#
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 SpikeEventSeries#

Bases: ElectricalSeries

Stores snapshots/snippets of recorded spike events (i.e., threshold crossings). This may also be raw data, as reported by ephys hardware. If so, the TimeSeries::description field should describe how events were detected. All SpikeEventSeries should reside in a module (under EventWaveform interface) even if the spikes were reported and stored by hardware. All events span the same recording channels and store snapshots of equal duration. TimeSeries::data array structure: [num events] [num channels] [num samples] (or [num events] [num samples] for single electrode).

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 channel_conversion: List[float] | None [Optional]#

Channel-specific conversion factor. Multiply the data in the ‘data’ dataset by these values along the channel axis (as indicated by axis attribute) AND by the global conversion factor in the ‘conversion’ attribute of ‘data’ to get the data values in Volts, i.e, data in Volts = data * data.conversion * channel_conversion. This approach allows for both global and per-channel data conversion factors needed to support the storage of electrical recordings as native values generated by data acquisition systems. If this dataset is not present, then there is no channel-specific conversion factor, i.e. it is 1 for all channels.

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

Spike waveforms.

field description: str | None = None#

Description of the time series.

field electrodes: ElectricalSeriesElectrodes [Required]#

DynamicTableRegion pointer to the electrodes that this time series was generated from.

field filtering: str | None = None#

Filtering applied to all channels of the data. For example, if this ElectricalSeries represents high-pass-filtered data (also known as AP Band), then this value could be “High-pass 4-pole Bessel filter at 500 Hz”. If this ElectricalSeries represents low-pass-filtered LFP data and the type of filter is unknown, then this value could be “Low-pass filter at 300 Hz”. If a non-standard filter type is used, provide as much detail about the filter properties as possible.

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

Timestamps for samples stored in data, in seconds, relative to the common experiment master-clock stored in NWBFile.timestamps_reference_time. Timestamps are required for the events. Unlike for TimeSeries, timestamps are required for SpikeEventSeries and are thus re-specified here.

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

Bases: ConfiguredBaseModel

Spike waveforms.

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_events, * num_samples'], Number] | NDArray[Shape['* num_events, * num_samples, * num_channels'], Number] | None = None#
field name: Literal['data'] = 'data'#
field unit: str | None = None#

Unit of measurement for waveforms, which is fixed to ‘volts’.

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

Bases: NWBDataInterface

Features, such as PC1 and PC2, that are extracted from signals stored in a SpikeEventSeries or other source.

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

Description of features (eg, ‘’PC1’’) for each of the extracted features.

field electrodes: FeatureExtractionElectrodes [Required]#

DynamicTableRegion pointer to the electrodes that this time series was generated from.

field features: FeatureExtractionFeatures [Required]#

Multi-dimensional array of features extracted from each event.

field name: str [Required]#
field times: List[float] [Optional]#

Times of events that features correspond to (can be a link).

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

Bases: ConfiguredBaseModel

Multi-dimensional array of features extracted from each event.

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_events, * num_channels, * num_features'], Float32] | None = None#
field name: Literal['features'] = 'features'#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=False), frozen=True)#
pydantic model FeatureExtractionElectrodes#

Bases: DynamicTableRegion

DynamicTableRegion pointer to the electrodes that this time series was generated from.

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['electrodes'] = 'electrodes'#
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 EventDetection#

Bases: NWBDataInterface

Detected spike events from voltage trace(s).

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

Description of how events were detected, such as voltage threshold, or dV/dT threshold, as well as relevant values.

field name: str [Required]#
field source_idx: List[int] [Optional]#

Indices (zero-based) into source ElectricalSeries::data array corresponding to time of event. ‘’description’’ should define what is meant by time of event (e.g., .25 ms before action potential peak, zero-crossing time, etc). The index points to each event from the raw data.

field times: List[float] [Optional]#

Timestamps of events, in seconds.

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

Bases: NWBDataInterface

Represents either the waveforms of detected events, as extracted from a raw data trace in /acquisition, or the event waveforms that were stored during experiment acquisition.

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, SpikeEventSeries] | 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 FilteredEphys#

Bases: NWBDataInterface

Electrophysiology data from one or more channels that has been subjected to filtering. Examples of filtered data include Theta and Gamma (LFP has its own interface). FilteredEphys modules publish an ElectricalSeries for each filtered channel or set of channels. The name of each ElectricalSeries is arbitrary but should be informative. The source of the filtered data, whether this is from analysis of another time series or as acquired by hardware, should be noted in each’s TimeSeries::description field. There is no assumed 1::1 correspondence between filtered ephys signals and electrodes, as a single signal can apply to many nearby electrodes, and one electrode may have different filtered (e.g., theta and/or gamma) signals represented. Filter properties should be noted in the ElectricalSeries ‘filtering’ 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.

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, ElectricalSeries] | 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 LFP#

Bases: NWBDataInterface

LFP data from one or more channels. The electrode map in each published ElectricalSeries will identify which channels are providing LFP data. Filter properties should be noted in the ElectricalSeries ‘filtering’ 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.

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, ElectricalSeries] | 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 ElectrodeGroup#

Bases: NWBContainer

A physical grouping of electrodes, e.g. a shank of an 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 description: str | None = None#

Description of this electrode group.

field location: str | None = None#

Location of electrode group. Specify the area, layer, comments on estimation of area/layer, etc. Use standard atlas names for anatomical regions when possible.

field name: str [Required]#
field position: Any | None = None#

stereotaxic or common framework coordinates

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

Bases: NWBDataInterface

DEPRECATED The mean waveform shape, including standard deviation, of the different clusters. Ideally, the waveform analysis should be performed on data that is only high-pass filtered. This is a separate module because it is expected to require updating. For example, IMEC probes may require different storage requirements to store/display mean waveforms, requiring a new interface or an extension of this one.

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

Filtering applied to data before generating mean/sd

field waveform_mean: ClusterWaveformsWaveformMean [Required]#

The mean waveform for each cluster, using the same indices for each wave as cluster numbers in the associated Clustering module (i.e, cluster 3 is in array slot [3]). Waveforms corresponding to gaps in cluster sequence should be empty (e.g., zero- filled)

field waveform_sd: ClusterWaveformsWaveformSd [Required]#

Stdev of waveforms for each cluster, using the same indices as in mean

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

Bases: ConfiguredBaseModel

The mean waveform for each cluster, using the same indices for each wave as cluster numbers in the associated Clustering module (i.e, cluster 3 is in array slot [3]). Waveforms corresponding to gaps in cluster sequence should be empty (e.g., zero- filled)

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_clusters, * num_samples'], Float32] | None = None#
field name: Literal['waveform_mean'] = 'waveform_mean'#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=False), frozen=True)#
pydantic model ClusterWaveformsWaveformSd#

Bases: ConfiguredBaseModel

Stdev of waveforms for each cluster, using the same indices as in mean

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_clusters, * num_samples'], Float32] | None = None#
field name: Literal['waveform_sd'] = 'waveform_sd'#
linkml_meta: ClassVar[LinkML_Meta] = FieldInfo(annotation=NoneType, required=False, default=LinkML_Meta(tree_root=False), frozen=True)#
pydantic model Clustering#

Bases: NWBDataInterface

DEPRECATED Clustered spike data, whether from automatic clustering tools (e.g., klustakwik) or as a result of manual sorting.

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 of clusters or clustering, (e.g. cluster 0 is noise, clusters curated using Klusters, etc)

field name: str [Required]#
field num: List[int] [Optional]#

Cluster number of each event

field peak_over_rms: List[float] [Optional]#

Maximum ratio of waveform peak to RMS on any channel in the cluster (provides a basic clustering metric).

field times: List[float] [Optional]#

Times of clustered events, in seconds. This may be a link to times field in associated FeatureExtraction module.

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