neuralset.events.etypes.Spikes

pydantic model neuralset.events.etypes.Spikes[source][source]

Spikes recording event (NWB/HDF5 or pre-binned MNE data).

By default, read() opens an NWB-style HDF5 file (h5py.File). With a SpecialLoader, it may return an mne.io.RawArray of pre-binned spike counts for use with SpikesExtractor.

Parameters:
  • subject (str) – Subject identifier (required, cannot be empty)

  • filepath (str) – Path to the HDF5 file, or a SpecialLoader JSON URI (required)

Notes

  • Subject ID is cast to string to handle numeric IDs from dataframes

Examples

spikes = Spikes(start=0, timeline="scan1", filepath="data_raw.nwb",
         subject="sub-01", frequency=1000.0, duration=10.0)
h5py_file = spikes.read()  # NWB/HDF5: returns h5py.File
Fields:
field subject: Annotated[str, BeforeValidator(func=_int_cast, json_schema_input_type=PydanticUndefined)] = ''[source]
requirements: tp.ClassVar[tuple[str, ...]] = ()[source]
type: tp.ClassVar[str] = 'Spikes'[source]