diff --git a/mkdocs.yml b/mkdocs.yml
index 794e2b3002..99d8512c99 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -24,6 +24,7 @@ nav:
- Near-Infrared Spectroscopy: modality-specific-files/near-infrared-spectroscopy.md
- Motion: modality-specific-files/motion.md
- Magnetic Resonance Spectroscopy: modality-specific-files/magnetic-resonance-spectroscopy.md
+ - Microelectrode Electrophysiology: modality-specific-files/microelectrode-electrophysiology.md
- Electromyography: modality-specific-files/electromyography.md
- Derivatives:
- BIDS Derivatives: derivatives/introduction.md
@@ -44,6 +45,7 @@ nav:
- MEG file formats: appendices/meg-file-formats.md
- MEG systems: appendices/meg-systems.md
- Coordinate systems: appendices/coordinate-systems.md
+ - Microelectrode surgical coordinates: appendices/microelectrode-surgical-coordinates.md
- Quantitative MRI: appendices/qmri.md
- Arterial Spin Labeling: appendices/arterial-spin-labeling.md
- Cross modality correspondence: appendices/cross-modality-correspondence.md
diff --git a/src/appendices/coordinate-systems.md b/src/appendices/coordinate-systems.md
index 8cf00dc6b7..5f546b5f35 100644
--- a/src/appendices/coordinate-systems.md
+++ b/src/appendices/coordinate-systems.md
@@ -248,6 +248,29 @@ Please note that `space-scanner` SHOULD NOT be used, it is mentioned in this spe
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| scanner | The intrinsic coordinate system of the original image (the first entry of `RawSources`) after reconstruction and conversion to NIfTI or equivalent for the case of surfaces and dual volume/surface files. |
+## Microelectrode Electrophysiology Specific Coordinate Systems
+
+Restricted keywords for the `MicroephysCoordinateSystem` field in the
+`coordsystem.json` file for microelectrode electrophysiology datasets (both `icephys` and `ecephys`):
+
+| **Coordinate System** | **Description** | **Reference** |
+| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
+| Pixels | If electrodes are localized in 2D space (only x and y are specified and z is `n/a`), then the positions in this file must correspond to the locations expressed in pixels on the photo/drawing/rendering of the electrodes on the brain. In this case, coordinates must be (row,column) pairs, with (0,0) corresponding to the upper left pixel and (N,0) corresponding to the lower left pixel. | |
+| Stereotaxic | A generic stereotaxic coordinate system commonly used in animal neuroscience for surgical targeting and electrode localization. The origin is at bregma, a skull landmark defined as the intersection of the coronal and sagittal sutures. The x-axis corresponds to the anterior-posterior (AP) axis with posterior being positive. The y-axis corresponds to the dorsal-ventral (DV) or superior-inferior (SI) axis with ventral/inferior being positive. The z-axis corresponds to the medial-lateral (ML) axis with right being positive. Units are typically in millimeters or micrometers. | |
+| AllenCCFv3 | Allen Common Coordinate Framework version 3 ([RRID:SCR_020999](https://scicrunch.org/resolver/RRID:SCR_020999)), a 3D reference space for the mouse brain based on average anatomy. The framework provides a systematic way to map and compare data across different experiments and labs. Origin and orientation follow the Allen Institute conventions. | [doi:10.1016/j.cell.2020.04.007](https://doi.org/10.1016/j.cell.2020.04.007) |
+| WaxholmSpace | A standardized 3D coordinate system for the rat brain ([RRID:SCR_001592](https://scicrunch.org/resolver/RRID:SCR_001592)) based on high-resolution imaging data. Part of the Waxholm Space atlas of the Sprague Dawley rat brain. | [doi:10.1371/journal.pcbi.1001065](https://doi.org/10.1371/journal.pcbi.1001065) |
+| WistarRatAtlas | A multidimensional magnetic resonance histology atlas of the adult Wistar rat brain ([RRID:SCR_006288](https://scicrunch.org/resolver/RRID:SCR_006288)). This atlas provides high-resolution anatomical reference for rat brain studies. | [doi:10.1016/j.neuroimage.2012.05.041](https://doi.org/10.1016/j.neuroimage.2012.05.041) |
+| individual | Subject-specific anatomical coordinate system derived from the individual subject's anatomy. The origin and orientation should be specified in `MicroephysCoordinateSystemDescription`. This coordinate system requires specifying an additional, subject-specific file to be fully defined. | |
+| Other | Use this for other coordinate systems and specify all required details in the `MicroephysCoordinateSystemDescription` field. | |
+
+If you believe a specific coordinate system should be added to the list
+of restricted keywords for microelectrode electrophysiology, please open a new issue on the
+[bids-standard/bids-specification GitHub repository](https://github.com/bids-standard/bids-specification/issues/new/choose).
+
+For detailed information about coordinate systems in microelectrode electrophysiology,
+including probe angles and anatomical reference points, see the
+[Microelectrode Electrophysiology specification](../modality-specific-files/microelectrode-electrophysiology.md#coordinate-system-json-_coordsystemjson).
+
[common file level metadata fields]: ../derivatives/common-data-types.md#common-file-level-metadata-fields
diff --git a/src/appendices/microelectrode-surgical-coordinates.md b/src/appendices/microelectrode-surgical-coordinates.md
new file mode 100644
index 0000000000..9c1a3eab84
--- /dev/null
+++ b/src/appendices/microelectrode-surgical-coordinates.md
@@ -0,0 +1,61 @@
+# Microelectrode Surgical Coordinates
+
+The surgical coordinates system provides a standard way to describe the placement of an intracranial probe implantation during surgery.
+
+## Anatomical Reference Points
+
+In neurosurgery and research, it can be important to define coordinates for where in the brain a surgical intervention will take place.
+These coordinates rely on anatomical markers that are uniform across individuals.
+There are two major anatomical markers on the dorsal surface of the brain that are formed when the plates of the skull fuse during development, and these markers are often used to identify the location of various anatomical structures of the brain.
+
+
+
+**Bregma**: the anatomical point on the skull at which the coronal suture (between frontal and parietal bones) is intersected perpendicularly by the sagittal suture (between left and right parietal bones).
+
+**Lambda**: the meeting point of the sagittal suture (between left and right parietal bones) and the lambdoid suture (between parietal and occipital bones).
+
+Both points serve as standard reference points for stereotaxic coordinates in neuroscience research. `(0,0,0)` is assumed to be Bregma when working with rodents. It may optionally be defined differently using `anatomical_reference_point`, and MUST be defined for other species.
+
+## Stereotaxic Coordinate System Conventions
+
+All stereotaxic coordinate systems follow a right-handed coordinate system with the following conventions:
+
+
+
+- **AP (Anterior-Posterior) axis:** Positive values are anterior to reference point
+- **ML (Medial-Lateral) axis:** Positive values are to the right (as seen from behind)
+- **DV (Dorsal-Ventral) axis:** Positive values are ventral (following right-hand rule). For humans, this is the superior-inferior axis, and positive values point to inferior.
+
+Proper understanding and application of these angles is critical for accurate probe placement and experimental reproducibility. All stereotaxic measurements use three angles to specify orientation:
+
+### AP angle (Anterior-Posterior rotation)
+
+
+
+- Measured as rotation from the vertical axis in the sagittal plane
+- 0° represents vertical along DV axis
+- Range: -180° to +180°
+- Positive values indicate anterior rotation
+- Example: +15° indicates probe tilted 15° anteriorly from vertical
+
+### ML angle (Medial-Lateral rotation)
+
+
+
+- Measured as rotation from the vertical axis in the coronal plane
+- 0° represents vertical along DV axis
+- Range: -180° to +180°
+- Positive values indicate rightward/clockwise rotation (as seen from behind)
+- Example: +20° indicates probe tilted 20° to the right from vertical
+
+### Rotation angle (around probe axis)
+
+
+
+- 0° when probe features align with the coronal plane
+- Range: -180° to +180° (or 0° to 360°)
+- Positive rotation is clockwise when viewed from above
+
+!!! note "Source Attribution"
+
+ The coordinate system conventions and angle definitions presented in this section are adapted from the [BrainSTEM documentation](https://support.brainstem.org/datamodel/schemas/coordinates/).
diff --git a/src/modality-specific-files/images/AP_ML_DV.png b/src/modality-specific-files/images/AP_ML_DV.png
new file mode 100644
index 0000000000..442ea21556
Binary files /dev/null and b/src/modality-specific-files/images/AP_ML_DV.png differ
diff --git a/src/modality-specific-files/images/AP_angle.png b/src/modality-specific-files/images/AP_angle.png
new file mode 100644
index 0000000000..bd5194a37b
Binary files /dev/null and b/src/modality-specific-files/images/AP_angle.png differ
diff --git a/src/modality-specific-files/images/ML_angle.png b/src/modality-specific-files/images/ML_angle.png
new file mode 100644
index 0000000000..765d43f3c0
Binary files /dev/null and b/src/modality-specific-files/images/ML_angle.png differ
diff --git a/src/modality-specific-files/images/bregma_and_lambda.png b/src/modality-specific-files/images/bregma_and_lambda.png
new file mode 100644
index 0000000000..b995027c4a
Binary files /dev/null and b/src/modality-specific-files/images/bregma_and_lambda.png differ
diff --git a/src/modality-specific-files/images/coordinates.png b/src/modality-specific-files/images/coordinates.png
new file mode 100644
index 0000000000..ef0527e384
Binary files /dev/null and b/src/modality-specific-files/images/coordinates.png differ
diff --git a/src/modality-specific-files/images/rotation_angle.png b/src/modality-specific-files/images/rotation_angle.png
new file mode 100644
index 0000000000..e09e03b6ec
Binary files /dev/null and b/src/modality-specific-files/images/rotation_angle.png differ
diff --git a/src/modality-specific-files/microelectrode-electrophysiology.md b/src/modality-specific-files/microelectrode-electrophysiology.md
new file mode 100644
index 0000000000..8ee92fac73
--- /dev/null
+++ b/src/modality-specific-files/microelectrode-electrophysiology.md
@@ -0,0 +1,908 @@
+# Microelectrode Electrophysiology
+
+Support for Microelectrode Electrophysiology was developed as a [BIDS Extension Proposal](../extensions.md#bids-extension-proposals) [BEP032: Animal electrophysiology (ephys)](https://bids.neuroimaging.io/bep032).
+Please see [Citing BIDS](../introduction.md#citing-bids) on how to appropriately credit this extension
+when referring to it in the context of the academic literature.
+
+This BEP was initiated by members of the INCF Working Group on Standardized Data Structures in 2020
+to develop specifications and tools for standardizing experimental data recorded with animal models
+in neuroscience and its associated metadata.
+
+!!! example "Example datasets"
+
+ Several [example microelectrode electrophysiology datasets](https://bids-standard.github.io/bids-examples/#microephys)
+ have been formatted using this specification
+ and can be used for practical guidance when curating a new dataset.
+
+## Terminology: Modality and Datatypes
+
+The Microelectrode Electrophysiology modality encompasses recordings made with micrometer-scale electrodes,
+distinguishing it from related BIDS modalities (EEG, MEG, iEEG) that use larger electrodes.
+This modality is primarily used in animal research.
+
+Within this modality, BIDS defines two datatypes based on fundamentally different recording techniques (see [Issue #1800](https://github.com/bids-standard/bids-specification/issues/1800)):
+
+- **`ecephys`** (Extracellular Electrophysiology): Electrodes remain in the extracellular space,
+ measuring field potentials (μV) from nearby neurons without membrane penetration.
+ Examples: Neuropixels probes, tetrodes, multi-electrode arrays.
+
+- **`icephys`** (Intracellular Electrophysiology): Electrodes penetrate or attach to cell membranes to directly measure
+ intracellular potentials (mV) and cellular dynamics.
+ Examples: cell-attached patch clamp, whole-cell patch clamp, sharp electrode recordings.
+
+These datatypes differ in recording technique, signal amplitude, required metadata
+(for example, `pipette_solution` and `recording_mode` for icephys; probe geometry for ecephys),
+and analysis pipelines. The terms are established and used in [Neurodata Without Borders (NWB)](https://www.nwb.org).
+
+Both datatypes share a unified BIDS structure (probes, electrodes, channels) with technique-specific optional metadata fields.
+Files are organized into `ecephys/` or `icephys/` subdirectories with corresponding file suffixes.
+
+## Primary Data File Formats
+
+Microelectrode electrophysiology data (of `icephys` or `ecephys` datatypes) MUST be stored in an [open file format](https://en.wikipedia.org/wiki/Open_format),
+while the native format, if different, can be stored in an optional `sourcedata/` directory.
+The native file format is used in case conversion elicits the loss of crucial metadata specific to manufacturers and specific acquisition systems.
+Metadata should be included alongside the data in the `.json` and `.tsv` files.
+The current list of allowed data file formats:
+
+| **Format** | **Extension(s)** | **Description** |
+| ------------------------------------------------------------------------------------ | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [Neuroscience Information Exchange Format](https://nixio.readthedocs.io/en/latest/) | `.nix` | A generic and open framework with an hdf5 backend and a defined interface to many microephys formats via the [Neo library](https://neo.readthedocs.io/en/latest/). The `.nix` file has to contain a valid Neo structure. |
+| [Neurodata Without Borders](https://www.nwb.org) | `.nwb` | An open data standard for neurophysiology, including data from intracellular and extracellular electrophysiology experiments. |
+
+Both of these formats can also store essential metadata of the datasets.
+Some of this metadata needs to be duplicated in BIDS `.tsv` and `.json` sidecar files.
+Even though the duplication requires additional effort to ensure the consistency of the data, it provides several advantages:
+
+- It makes the dataset easier for humans to scan, as essential information is easily accessible without loading the data files.
+- The dataset adheres to the BIDS standard and can benefit from tools built on top of this standard, such as [bids-validator](https://github.com/bids-standard/bids-validator).
+- It simplifies the separation of data and basic metadata, enabling, for example, the publication of a dataset in a lightweight fashion with access to the data files on request (as implemented by [DataLad](https://www.datalad.org)).
+
+
+
+
+
+### icephys
+
+{{ MACROS___make_filename_template(
+"raw",
+datatypes=["icephys"],
+suffixes=["icephys", "events", "channels", "electrodes","scans","probes","coordsystem"]
+)
+}}
+
+### ecephys
+
+{{ MACROS___make_filename_template(
+"raw",
+datatypes=["ecephys"],
+suffixes=["ecephys", "events", "channels", "electrodes","scans","probes","coordsystem"]
+)
+}}
+
+## Sidecar JSON (`*_icephys.json` and `*_ecephys.json`)
+
+We propose to store all metadata that is not directly related to one of the other metadata files (probe/electrode/channel information) into a single JSON file corresponding to the datatype: `_icephys.json` or `_ecephys.json` for intracellular and extracellular correspondingly.
+
+There should be one such JSON file for each data file.
+
+The `*_ephys.json` file can be used to store any microephys-specific metadata for the dataset. We recommend storing all setup-related metadata in a dedicated node of the JSON file called `Setup`.
+We recommend using the following keys to describe the setup:
+
+### Institution Information
+
+{{ MACROS___make_sidecar_table("microephys.microephysInstitutionInformation") }}
+
+### Setup Information
+
+{{ MACROS___make_sidecar_table("microephys.microephysSetup") }}
+
+### Processing Information
+
+{{ MACROS___make_sidecar_table("microephys.microephysProcessing") }}
+
+### Additional Procedure Information
+
+Furthermore, additional information can be stored about the recording procedure.
+We RECOMMEND to use a dedicated `Procedure` node with the following keys:
+
+- `Pharmaceuticals`
+- `Sample`
+- `Supplementary`
+
+
+
+#### Pharmaceuticals
+
+For each pharmaceutical we RECOMMEND to use a dedicated node with the name of the Pharmaceuticals containing the following administration details:
+
+{{ MACROS___make_sidecar_table("microephys.microephysPharmaceuticals") }}
+
+#### Sample
+
+{{ MACROS___make_sidecar_table("microephys.microephysSample") }}
+
+#### Supplementary
+
+{{ MACROS___make_sidecar_table("microephys.microephysSupplementary") }}
+
+### Task Information
+
+If the OPTIONAL [` task-`](../appendices/entities.md#task) is used, the following metadata SHOULD be used.
+
+{{ MACROS___make_sidecar_table("microephys.microephysTaskInformation") }}
+
+### Example `*_ecephys.json`
+
+```JSON
+{
+ "InstitutionName": "Example University",
+ "InstitutionAddress": "123 Main St, City, State 12345, Country",
+ "InstitutionalDepartmentName": "Neuroscience Department",
+ "PowerLineFrequency": 60,
+ "Manufacturer": "ExampleManufacturer",
+ "ManufacturersModelName": "Model-XYZ",
+ "SamplingFrequency": 30000,
+ "SoftwareName": "RecordingSoftware",
+ "SoftwareVersions": "1.0.0",
+ "SoftwareFilters": {
+ "LowpassFilter": {
+ "Half-amplitude cutoff (Hz)": 300,
+ "Roll-off": "6dB/Octave"
+ }
+ },
+ "HardwareFilters": {
+ "HighpassFilter": {
+ "Half-amplitude cutoff (Hz)": 0.1,
+ "Roll-off": "6dB/Octave"
+ }
+ },
+ "PharmaceuticalName": ["anesthetic1", "anesthetic2"],
+ "PharmaceuticalDoseAmount": [1.5, 10],
+ "PharmaceuticalDoseUnits": ["percent", "mg/kg"],
+ "BodyPart": "BRAIN",
+ "BodyPartDetails": "Motor Cortex",
+ "SampleEnvironment": "in-vivo",
+ "TaskName": "ExampleTask",
+ "TaskDescription": "Description of the experimental task"
+}
+```
+
+### Example `*_icephys.json`
+
+```JSON
+{
+ "InstitutionName": "Example Institute",
+ "InstitutionAddress": "456 Science Ave, City, State 67890, Country",
+ "PowerLineFrequency": 60,
+ "Manufacturer": "PatchClampManufacturer",
+ "ManufacturersModelName": "Amplifier-ABC",
+ "SamplingFrequency": 20000,
+ "SoftwareName": "PatchSoftware",
+ "SoftwareVersions": "2.1.0",
+ "SoftwareFilters": {
+ "BesselFilter": {
+ "Half-amplitude cutoff (Hz)": 10000,
+ "Roll-off": "12dB/Octave"
+ }
+ },
+ "BodyPart": "BRAIN",
+ "BodyPartDetails": "Visual Cortex",
+ "SampleEnvironment": "ex-vivo",
+ "SliceThickness": 300,
+ "TaskName": "MembraneProperties",
+ "TaskDescription": "Characterization of intrinsic properties"
+```
+
+## Channels description (`*_channels.tsv`)
+
+Channels are recorded signals.
+These may be of neuronal origin (for example, online filtered LFP signals) or generated by the recording setup
+(for example, synchronization or behavioral signals).
+
+The channel properties are stored in a `.tsv` file.
+It should contain information about reference electrodes, amplifier, filtering, time alignment and other metadata pertinent to the data for each channel.
+
+This table stores information about the recorded signals, *not* the electrodes. The distinction is particularly important in cases where multiple signals are recorded from a single electrode (such as Neuropixel probes). For more information about the distinction between electrodes and channels, see [the corresponding section in iEEG](./intracranial-electroencephalography.md#terminology-electrodes-vs-channels).
+
+Columns in the `*_channels.tsv` file are:
+
+{{ MACROS___make_columns_table("microephys.microephysChannels") }}
+
+### The `stream_id` Column
+
+The `stream_id` column links each channel to its corresponding data stream within the data file. The format of `stream_id` depends on the data file format:
+
+**For NWB files (`.nwb`):**
+The `stream_id` SHOULD be the internal HDF5 path to the neurodata object (typically an `ElectricalSeries`) that contains the voltage recordings for that channel, for example `/acquisition/ElectricalSeries`.
+If no path is provided, it is assumed to be `/acquisition/ElectricalSeries`.
+If the directory contains multiple NWB files, and not all of those files contain data from the channel, the `stream_id` SHOULD include the filename(s) that do followed by a colon and the internal path, for example `sub-01_ses-01_run-02_ecephys.nwb:/acquisition/ElectricalSeries`.
+
+**For NIX files (`.nix`):**
+The `stream_id` SHOULD reference the data array or signal within the NIX file structure that contains the recordings for that channel, following the NIX/Neo data organization.
+
+**Multiple data streams:**
+If a single channel's data spans multiple neurodata objects within a file or across multiple files,
+the `stream_id` MUST be specified as a comma-separated list.
+For example: `/acquisition/ElectricalSeries1,/acquisition/ElectricalSeries2` or
+`file1.nwb:/acquisition/ElectricalSeries,file2.nwb:/acquisition/ElectricalSeries`.
+
+### Example `*_channels.tsv`
+
+**Extracellular electrophysiology example:**
+
+```tsv
+name reference type units sampling_frequency hardware_filters software_filters gain status status_description
+ch001 ref01 LFP uV 1000 HighpassFilter LowpassFilter 500 good n/a
+ch002 ref01 LFP uV 1000 HighpassFilter LowpassFilter 500 good n/a
+ch003 ref01 HP uV 30000 HighpassFilter n/a 500 good n/a
+ch004 ref01 HP uV 30000 HighpassFilter n/a 500 bad high_noise
+ch005 ref02 LFP uV 1000 HighpassFilter LowpassFilter 500 good n/a
+ch006 n/a SYNC V 30000 n/a n/a 1 good n/a
+```
+
+**Intracellular electrophysiology example:**
+
+```tsv
+name type units sampling_frequency recording_mode gain ground status
+patch01 VM mV 20000 current-clamp 10 AgCl good
+patch02 VM mV 20000 current-clamp 10 AgCl good
+patch03 IM pA 20000 voltage-clamp 5 AgCl good
+```
+
+Note: In many datasets multiple sets of identifiers are used for probes, electrodes and channels.
+We RECOMMEND to include alternative sets of identifiers, for instance identifiers that enumerate electrodes according to their spatial arrangement, as additional custom columns in the `.tsv` file.
+
+### Recommended Channel Type Values
+
+For the `type` column we recommend to use the following terms (adapted from [iEEG](intracranial-electroencephalography.md#channels-description-_channelstsv))
+
+| **Keyword** | **Description** |
+| ------------ | ------------------------------------------------------------------------------------------------------------------------------- |
+| **LFP** | Low-pass filtered extracellular voltage signal that represents local field potentials |
+| **HP** | High-pass filtered extracellular voltage signal as used for spike sorting |
+| **MUA** | High-pass filtered and rectified or thresholded extracellular voltage signal that represents an estimate of multi-unit activity |
+| **BB** | Unfiltered (broadband) extracellular voltage signal |
+| **SPIKES** | Discrete signal indicating spike events as derived from spike detection or spike sorting |
+| **VM** | Membrane voltage |
+| **IM** | Membrane current |
+| **SYNC** | Signal used for synchronization between different recording systems / channels |
+| **STIM** | Electrical stimulation |
+| **EEG** | Electrode channel from electroencephalogram |
+| **ECOG** | Electrode channel from electrocorticogram (intracranial) |
+| **SEEG** | Electrode channel from stereo-electroencephalogram (intracranial) |
+| **DBS** | Electrode channel from deep brain stimulation electrode (intracranial) |
+| **VEOG** | Vertical EOG (electrooculogram) |
+| **HEOG** | Horizontal EOG |
+| **EOG** | Generic EOG channel if HEOG or VEOG information not available |
+| **ECG** | ElectroCardioGram (heart) |
+| **EMG** | ElectroMyoGram (muscle) |
+| **TRIG** | System Triggers |
+| **AUDIO** | Audio signal |
+| **PD** | Photodiode |
+| **EYEGAZE** | Eye Tracker gaze |
+| **PUPIL** | Eye Tracker pupil diameter |
+| **BEH** | Behavioral signals |
+| **MISC** | Miscellaneous |
+| **SYSCLOCK** | System time showing elapsed time since trial started |
+| **ADC** | Analog to Digital input |
+| **DAC** | Digital to Analog output |
+| **REF** | Reference channel |
+| **OTHER** | Any other type of channel |
+
+## Electrodes description (`*_electrodes.tsv`)
+
+Electrodes are the physical recording sites that make electrical contact with neural tissue to capture electrophysiological signals.
+
+The electrode positions and properties are stored in a `.tsv` file (amplifier information is in `channels.tsv`).
+
+This file contains the following information:
+
+- The electrode name
+- The electrode coordinates in 3 columns (`xyz`) (use `n/a` for values if a dimension is absent).
+- The ID of the probe the electrode is located on
+
+{{ MACROS___make_columns_table("microephys.microephysElectrodes") }}
+
+### Electrode Position Coordinates
+
+The `x`, `y`, and `z` columns in the electrodes table specify electrode positions, but their meaning depends on whether a `space-` entity is used in the filename. When no `space-` entity is used in the filename, the `x`, `y`, `z` coordinates describe the relative position of electrodes on the probe, NOT their position in the brain or any anatomical coordinate system. These probe-relative positions are REQUIRED for all electrodes. The probe origin (0, 0, 0) is typically at the probe tip or a standard reference point on the probe and SHOULD be specified in the `coordinate_reference_point` column of `*_probes.tsv`. Units SHOULD be specified in the `dimension_unit` column of `*_probes.tsv`. The `*_coordsystem.json` file should not be provided for probe-relative coordinates. If there is just one electrode, the `x`, `y`, and `z` values should be `0`.
+
+This rule is different from the electrodes.tsv table of the [iEEG modality](intracranial-electroencephalography.md#electrodes-description-_electrodestsv), where electrode positions are always specified in anatomical space. The distinction is necessary because microelectrode probes often have many electrodes with known relative positions on the probe, but their anatomical positions may not be precisely known without additional localization procedures. The probe-relative positions are essential for interpreting the recorded signals in relation to the probe geometry and for analyses such as spike sorting.
+
+To specify electrode positions in surgical space, individual anatomical space, or a common coordinate system (such as the Allen CCF), use an additional `*_electrodes.tsv` file with a [`space-`](../appendices/entities.md#space) entity. See the [`*_coordsystem.json` section](#coordinate-system-json-_coordsystemjson) for details on defining these coordinate systems.
+
+
+### Example `*_electrodes.tsv`
+
+**Extracellular electrophysiology example (probe-relative coordinates):**
+
+```tsv
+name probe_name hemisphere x y z impedance shank_id size material location
+e001 probe01 L 0 0 0 1.2 0 15 iridium-oxide MOp
+e002 probe01 L 0 0 25 1.1 0 15 iridium-oxide MOp
+e003 probe01 L 0 0 50 1.3 0 15 iridium-oxide MOp
+e004 probe01 L 0 0 75 1.4 0 15 iridium-oxide MOp
+e005 probe02 R 0 0 0 2.1 n/a 12 tungsten CA1
+e006 probe02 R 0 0 15 2.3 n/a 12 tungsten CA1
+e007 probe02 R 0 0 30 1.9 n/a 12 tungsten CA1
+e008 probe02 R 0 0 45 2.0 n/a 12 tungsten CA1
+```
+
+**Intracellular electrophysiology example:**
+
+```tsv
+name probe_name hemisphere x y z impedance pipette_solution internal_pipette_diameter external_pipette_diameter material location
+patch01 pipette01 L 0 0 0 5.2 K-gluconate 1.5 2.5 borosilicate-glass VISp2/3
+patch02 pipette02 R 0 0 0 4.8 K-gluconate 1.5 2.5 borosilicate-glass VISp2/3
+sharp01 pipette03 L 0 0 0 80 3M KCl 0.5 1.0 borosilicate-glass PL5
+```
+
+## Probes description (`*_probes.tsv`)
+
+Probes are electrode-bearing devices that interface with neural tissue to record electrophysiological activity, ranging from multi-electrode arrays to single recording pipettes. They can be permanently implanted (chronic recordings) or inserted temporarily for the recording (acute recordings).
+
+The probe positions and properties are stored in a `.tsv` file.
+This file contains the probe ID, the type of recording (acute/chronic), and the probe coordinates.
+
+{{ MACROS___make_columns_table("microephys.microephysProbes") }}
+
+### Example `*_probes.tsv`
+
+**Extracellular electrophysiology example:**
+
+```tsv
+probe_name type AP ML DV AP_angle ML_angle rotation_angle hemisphere manufacturer device_serial_number electrode_count width height depth dimension_unit coordinate_reference_point anatomical_reference_point associated_brain_region associated_brain_region_id reference_atlas material
+probe01 silicon-probe -2.5 1.5 -4.0 15 0 0 L IMEC NP1100-2205 384 70 20 10000 um tip Bregma Primary Motor Cortex MOp Franklin-Paxinos silicon
+probe02 tetrode -1.2 -2.1 -3.5 0 10 45 R Neuralynx TT-12345 4 n/a n/a n/a um tip Bregma Hippocampus CA1 CA1 Paxinos-Watson tungsten
+```
+
+**Intracellular electrophysiology example:**
+
+```tsv
+probe_name type AP ML DV AP_angle ML_angle rotation_angle hemisphere manufacturer electrode_count coordinate_reference_point associated_brain_region associated_brain_region_id reference_atlas
+pipette01 patch-pipette -1.8 0.5 -2.2 30 0 0 L Sutter 1 tip Visual Cortex Layer 2/3 VISp2/3 AllenCCFv3
+pipette02 patch-pipette -1.8 -0.5 -2.2 30 0 0 R Sutter 1 tip Visual Cortex Layer 2/3 VISp2/3 AllenCCFv3
+pipette03 sharp-electrode -3.2 1.2 -3.8 20 5 0 L WPI 1 tip Prefrontal Cortex Layer 5 PL5 Franklin-Paxinos
+```
+
+For details on the surgical coordinate system used to describe probe placement during surgery (AP, ML, DV, angles, and
+anatomical reference points), see the [Microelectrode Surgical Coordinates](../appendices/microelectrode-surgical-coordinates.md)
+appendix.
+
+### ProbeInterface Library
+
+[ProbeInterface](https://github.com/SpikeInterface/probeinterface) is a standard for specifying electrode layouts on probes.
+The [ProbeInterface library](https://github.com/SpikeInterface/probeinterface_library) includes layouts for many common probes.
+
+Probe information is specified in the `probes.json` sidecar file using the `model` field with `Levels` to define each probe model.
+
+For probes listed in the ProbeInterface library, use `TermURL` to reference the probe definition:
+
+```json
+"model": {
+ "Levels": {
+ "A1x32": {
+ "Description": "A1x32-Poly3-10mm-50-177, a 1-shank probe",
+ "TermURL": "https://raw.githubusercontent.com/SpikeInterface/probeinterface_library/refs/heads/main/neuronexus/A1x32-Poly3-10mm-50-177/A1x32-Poly3-10mm-50-177.json"
+ }
+ }
+}
+```
+
+If the probe is not listed in the ProbeInterface library, you SHOULD define it using the [ProbeInterface format](https://probeinterface.readthedocs.io/en/latest/format_spec.html) and include it in a directory called `probes/` in the root of the dataset. Custom probe files MUST comply with the [ProbeInterface specification](https://probeinterface.readthedocs.io/en/latest/format_spec.html) and [JSON schema](https://raw.githubusercontent.com/SpikeInterface/probeinterface/refs/heads/main/src/probeinterface/schema/probe.json.schema).
+
+For custom probes, reference them using a [BIDS URI](../common-principles.md#bids-uri) with the `bids::` prefix in the `TermURL` field:
+
+```json
+"model": {
+ "Levels": {
+ "customprobe1": {
+ "Description": "Custom experimental probe",
+ "TermURL": "bids::probes/customprobe1.json"
+ }
+ }
+}
+```
+
+Example file structure:
+
+
+{{ MACROS___make_filetree_example(
+ {
+ "probes": {
+ "customprobe1.json": "",
+ "customprobe2.json": "",
+ "...": "",
+ },
+ }
+) }}
+
+
+## Coordinate System JSON (`*_coordsystem.json`)
+
+
+{{ MACROS___make_filename_template("raw", datatypes=["icephys", "ecephys"], suffixes=["coordsystem"]) }}
+
+To describe the location of electrodes in an anatomical or stereotaxic coordinate system, a space entity
+is used in the filename, and a corresponding `*_coordsystem.json` file is used alongside the corresponding
+`*_electrodes.tsv` file. This `*_coordsystem.json` file contains the coordinate system in which electrode
+positions are expressed. The associated MRI, CT, X-Ray, or operative photo can also be specified.
+
+This file is REQUIRED when the [`space-`](../appendices/entities.md#space) entity is used
+in the filename to specify electrode positions in an anatomical or stereotaxic coordinate system.
+When a `*_space-_coordsystem.json` file is present, the corresponding `*_space-_electrodes.tsv`
+file with the same space label MUST also be present.
+
+General fields:
+
+
+{{ MACROS___make_json_table("json.microephys.microephysCoordsystemGeneral") }}
+
+Fields relating to the microelectrode electrophysiology electrode positions:
+
+
+{{ MACROS___make_json_table("json.microephys.microephysCoordsystemPositions") }}
+
+`*_coordsystem.json` files SHOULD NOT be duplicated for each data file,
+for example, across multiple tasks.
+The [inheritance principle](../common-principles.md#the-inheritance-principle) MUST
+be used to find the appropriate coordinate system description for a given data file.
+If electrodes are repositioned, it is RECOMMENDED to use multiple sessions to indicate this.
+
+### Recommended 3D coordinate systems
+
+It is preferred that electrodes are localized in a 3D coordinate system, with
+respect to anatomical reference images, stereotactic coordinates, or in a
+standard space as specified in the BIDS [Coordinate Systems Appendix](../appendices/coordinate-systems.md).
+
+For example:
+
+- `*_space-StereoTaxic` (electrodes are localized in stereotactic coordinate system with bregma origin)
+
+- `*_space-individual` (electrodes are localized in subject-specific anatomical coordinate system)
+- `*_space-AllenCCFv3` (electrodes are mapped to Allen Common Coordinate Framework v3)
+- `*_space-PaxinosWatson` (electrodes are mapped to Paxinos-Watson rat brain atlas coordinates)
+
+When referring to the `*_electrodes.tsv` file in a certain *space* as defined
+above, the [`space-`](../appendices/entities.md#space) of the accompanying `*_coordsystem.json` MUST
+correspond.
+
+
+### Allowed 2D coordinate systems
+
+If electrodes are localized in 2D space (only x and y are specified and z is `"n/a"`),
+then the positions in this file MUST correspond to the locations expressed
+in pixels on the photo/drawing/rendering of the electrodes on the brain.
+In this case, `MicroephysCoordinateSystem` MUST be defined as `"Pixels"`,
+and `MicroephysCoordinateUnits` MUST be defined as `"pixels"`
+(note the difference in capitalization).
+Furthermore, the coordinates MUST be (row,column) pairs,
+with (0,0) corresponding to the upper left pixel and (N,0) corresponding to the lower left pixel.
+
+### Multiple coordinate systems
+
+If electrode positions are known in multiple coordinate systems (for example, probe-relative, StereoTaxic,
+and AllenCCFv3), these spaces can be distinguished by the [`space-`](../appendices/entities.md#space)
+entity.
+Note that the [`space-`](../appendices/entities.md#space) fields must correspond
+between `*_electrodes.tsv` and `*_coordsystem.json` if they refer to the same
+data.
+
+For example:
+
+
+{{ MACROS___make_filetree_example(
+ {
+ "sub-01": {
+ "sub-01_electrodes.tsv": "",
+ "sub-01_space-StereoTaxic_electrodes.tsv": "",
+ "sub-01_space-StereoTaxic_coordsystem.json": "",
+ "...": "",
+ },
+ }
+) }}
+
+The order of the required columns in the `*_electrodes.tsv` file MUST be as listed below.
+The `x`, `y`, and `z` columns indicate the positions of the center of each electrode in Cartesian coordinates.
+
+## Photos of the electrode positions (`*_photo.`)
+
+
+{{ MACROS___make_filename_template("raw", datatypes=["icephys", "ecephys"], suffixes=["photo"]) }}
+
+These can include photos of the electrodes on the brain surface, photos of
+anatomical features or landmarks (such as cortical vasculature, stereotactic coordinates), and fiducials. Photos
+can also include histological sections showing electrode tracks, microscope images of electrode placements,
+or screenshots of a brain atlas with electrode positions.
+The photos may need to be cropped and/or blurred to conceal identifying features
+or entirely omitted prior to sharing, depending on obtained consent and institutional protocols.
+
+If there are photos of the electrodes, the [`acq-`](../appendices/entities.md#acq) entity should be specified
+with:
+
+- `*_photo.` in case of an operative or in-vivo photo
+- `*_acq-_photo.` where `` describes the acquisition type (for example: `histology` for histological sections showing electrode tracks, `microscopy` for microscope images of electrode placements, `atlas` for screenshots showing electrodes overlaid on brain atlas)
+- `*_acq-drawing#_photo.` in case of a drawing or sketch of electrode placements
+
+The [`ses-`](../appendices/entities.md#ses) entity may be used to specify when the photo was taken.
+
+The [`sample-`](../appendices/entities.md#sample) entity may be used to specify the tissue sample for histological photos.
+
+The [`space-`](../appendices/entities.md#space) entity may be used to specify the coordinate system for atlas overlay photos.
+
+## Recording Events (`*_events.tsv`)
+
+The `*_events.tsv` and corresponding `*_events.json` sidecar files are OPTIONAL and can be used to
+indicate time points of recording events. Each task events file requires a corresponding task data
+file. These events can be internal recording system events, task-related events, or events triggered
+by the experimentalist (for example, manual reward). Note that these events must share a common clock
+with the corresponding microephys recording data. For more details, see the
+Task Events documentation.
+Note that this file can also be used to describe stimulation performed during the recording. For this,
+please follow the [iEEG stimulation documentation](intracranial-electroencephalography.md#electrical-stimulation).
+
+## Multi-part Recordings
+
+Two different procedures are supported to handle multi-part recordings. The two options are:
+
+1. each recording is stored in an independent data file, and the corresponding metadata is described in the `*_scans.tsv` file; or
+1. several recordings are stored in a single data file, and the corresponding metadata is described in the `*_events.tsv` file.
+
+These two options are made available to support different usages and habits of the experimenters, as
+well as to benefit from the capability of the supported data formats (NWB and NIX).
+They are described in the following subsections, and made explicit through some of the example data sets.
+
+### Multiple tasks / runs in separate files (`*_scans.tsv`)
+
+The `*_scans.tsv` should be used to provide information about multiple parts of an acquisition
+session (for example, recording start times in case the recording was paused and restarted)
+when the data from each of these different recordings is stored in separate files.
+Each data file should have a name that contains a `_task-XX` and/or `_run-XX` suffix, and
+should be described by one row in the `*_scans.tsv` file. See also the BIDS Scans
+specification.
+Relative paths to files should be used under a compulsory "filename" header.
+If acquisition time is included, it should be with the `acq_time` header. Datetime should
+be expressed in the RFC3339 "date-time" format, for example `2009-06-15T13:45:30` (year, month, day, hour (24h), minute, second). Time zone is always assumed as local time.
+The run and task keywords and the corresponding `*_scans.tsv` file are OPTIONAL and can be
+ignored if the dataset consists of only one continuous recording and a single or no task.
+
+Optional: Yes
+
+Example of a `*_scans.tsv`:
+
+```tsv
+filename acq_time
+ephys/sub-P001_task-pull_run-01_ephys.nix 2018-07-15T09:45:30
+ephys/sub-P001_task-pull_run-02_ephys.nix 2018-07-15T13:24:00
+ephys/sub-P001_task-push_run-01_ephys.nix 2018-07-15T14:24:00
+ephys/sub-P001_task-push_run-02_ephys.nix 2018-07-15T15:24:00
+```
+
+It is recommended to accompany the `*_scans.tsv` file with a corresponding `*_scans.json`
+sidecar file, as described in the [BIDS specifications](https://bids-specification.readthedocs.io/en/stable/03-modality-agnostic-files.html#scans-file).
+
+### Multiple recordings in a single data file (`*_events.tsv`)
+
+The `*_events.tsv` should be used to provide information about multiple parts of an acquisition
+session when the data from each of these different recordings is stored in a single data file.
+In such a case, this file is REQUIRED.
+This allows benefiting from the capability of the supported data formats (NIX and NWB) to store multiple
+recordings in a single file, which can be convenient when these recordings share numerous characteristics
+(for example, for subsequent recordings obtained on a single cell in intracellular electrophysiology).
+In such case, the information about these recordings should be stored in columns added in the
+`*_events.tsv` file, which are listed now.
+
+Optional column names in `events.tsv` to support multiple recordings in a single data file:
+
+
+
+## Microelectrode Electrophysiology Examples
+
+### Toy datasets
+
+#### Extracellular Electrophysiology
+
+This dataset contains data from a single subject (subject A), that was recorded on two
+days (2022-01-01 and 2022-01-02).
+On the first day the subject performed three tasks (nose-poke, reach-to-grasp, and rest), and on the second day only a
+rest task was performed.
+The electrophysiology data for each of the four recordings are stored in the corresponding
+session and ecephys directories in the `nix` format. Metadata about the probes, their electrodes
+and the corresponding recording channels are stored in `tsv` format. Note that in this case,
+this information is shared between data files (see BIDS Inheritance Principle): in the first session,
+the probe, electrode and channel files apply to all data files of that session, as they do not
+contain a `task` entity in their name. For the behavioral tasks (nose-poke and reach-to-grasp), additional behavioral timestamps
+(events) were recorded and stored in task-specific `events.tsv` files.
+
+{{ MACROS___make_filetree_example(
+
+{
+"dataset_description.json": "",
+"participants.tsv": "",
+"sub-A/": {
+"sub-A_sessions.tsv": "",
+"ses-20220101/": {
+"sub-A_ses-20220101_scans.tsv": "",
+"ecephys/": {
+"sub-A_ses-20220101_task-nosepoke_ecephys.nix": "",
+"sub-A_ses-20220101_task-nosepoke_ecephys.json": "",
+"sub-A_ses-20220101_task-nosepoke_events.tsv": "",
+"sub-A_ses-20220101_task-reachtograsp_ecephys.nix": "",
+"sub-A_ses-20220101_task-reachtograsp_ecephys.json": "",
+"sub-A_ses-20220101_task-reachtograsp_events.tsv": "",
+"sub-A_ses-20220101_task-rest_ecephys.nix": "",
+"sub-A_ses-20220101_task-rest_ecephys.json": "",
+"sub-A_ses-20220101_channels.tsv": "",
+"sub-A_ses-20220101_electrodes.tsv": "",
+"sub-A_ses-20220101_probes.tsv": ""
+}
+},
+"ses-20220102/": {
+"sub-A_ses-20220102_scans.tsv": "",
+"ecephys/": {
+"sub-A_ses-20220102_task-rest_ecephys.nix": "",
+"sub-A_ses-20220102_task-rest_ecephys.json": "",
+"sub-A_ses-20220102_channels.tsv": "",
+"sub-A_ses-20220102_electrodes.tsv": "",
+"sub-A_ses-20220102_probes.tsv": ""
+}
+}
+}
+}
+
+) }}
+
+Example `sub-A_ses-20220101_task-nosepoke_ecephys.json`:
+
+```json
+{
+ "TaskName": "Nose Poke Task",
+ "TaskDescription": "Subject performs nose-poke responses to visual cues for reward",
+ "InstitutionName": "Example University",
+ "PowerLineFrequency": 60,
+ "SamplingFrequency": 30000,
+ "HardwareFilters": {
+ "HighpassFilter": {
+ "Half-amplitude cutoff (Hz)": 0.1,
+ "Roll-off": "6dB/Octave"
+ }
+ },
+ "SoftwareFilters": "n/a",
+ "RecordingType": "continuous",
+ "PharmaceuticalName": ["ketamine", "xylazine"],
+ "PharmaceuticalDoseAmount": [10, 1],
+ "PharmaceuticalDoseUnits": ["mg/kg", "mg/kg"],
+ "BodyPart": "BRAIN",
+ "SampleEnvironment": "in-vivo"
+}
+```
+
+Example `sub-A_ses-20220101_task-reachtograsp_ecephys.json`:
+
+```json
+{
+ "TaskName": "Reach to Grasp Task",
+ "TaskDescription": "Subject reaches and grasps objects of different shapes and sizes",
+ "InstitutionName": "Example University",
+ "PowerLineFrequency": 60,
+ "SamplingFrequency": 30000,
+ "HardwareFilters": {
+ "HighpassFilter": {
+ "Half-amplitude cutoff (Hz)": 0.1,
+ "Roll-off": "6dB/Octave"
+ }
+ },
+ "SoftwareFilters": "n/a",
+ "RecordingType": "continuous",
+ "PharmaceuticalName": ["ketamine", "xylazine"],
+ "PharmaceuticalDoseAmount": [10, 1],
+ "PharmaceuticalDoseUnits": ["mg/kg", "mg/kg"],
+ "BodyPart": "BRAIN",
+ "SampleEnvironment": "in-vivo"
+}
+```
+
+Example `sub-A_ses-20220101_task-rest_ecephys.json`:
+
+```json
+{
+ "TaskName": "Resting State",
+ "TaskDescription": "Spontaneous activity recording with no task",
+ "InstitutionName": "Example University",
+ "PowerLineFrequency": 60,
+ "SamplingFrequency": 30000,
+ "HardwareFilters": {
+ "HighpassFilter": {
+ "Half-amplitude cutoff (Hz)": 0.1,
+ "Roll-off": "6dB/Octave"
+ }
+ },
+ "SoftwareFilters": "n/a",
+ "RecordingType": "continuous",
+ "PharmaceuticalName": ["ketamine", "xylazine"],
+ "PharmaceuticalDoseAmount": [10, 1],
+ "PharmaceuticalDoseUnits": ["mg/kg", "mg/kg"],
+ "BodyPart": "BRAIN",
+ "SampleEnvironment": "in-vivo"
+}
+```
+
+#### Intracellular Electrophysiology (Patch)
+
+This dataset contains intracellular data from slices acquired from two subjects (20220101-A and 20220101B). Details about the subjects and the sample generation are documented in the samples (tsv/json) files. Data of each subject is stored in separate subject directories (top level directories), each of which contains an 'icephys/' subdirectory. Note that there is no session-level directory in this case. Here, we choose the option of having "multiple tasks/runs in separate files" to demonstrate the high level of readability offered by the filenames in this case.
+
+For the first subject only a single sample (a cell for patch-clamp terminology) was extracted (sample-cell001), on which three different protocol recordings were performed: two runs of current injection to characterize intrinsic properties, and one run of synaptic stimulation. The `scans.tsv` file stores information such as the starting recording times. The detailed information on the recording channel (such as the recording mode used) is stored in the `channels.tsv` which, in this case, is common to all available recordings. The probes and electrodes files provide information on the pipette and solutions used for the recordings and are also shared across data files.
+
+For the second subject two samples (sample-cell002 and sample-cell003) were extracted and recordings of different tasks (current injection and synaptic stimulation) were performed on each of them. Each recording was performed using a different probe (listed in the probes.tsv) having specific electrode and channel information. Therefore, each data file has a dedicated channel and electrode file with the same name as the data file.
+
+{{ MACROS___make_filetree_example(
+
+{
+"samples.tsv": "",
+"samples.json": "",
+"participants.tsv": "",
+"dataset_description.json": "",
+"sub-20220101A/": {
+"sub-20220101A_sample-cell001_scans.tsv": "",
+"icephys/": {
+"sub-20220101A_sample-cell001_task-IVcurve_run-1_icephys.nwb": "",
+"sub-20220101A_sample-cell001_task-IVcurve_run-1_icephys.json": "",
+"sub-20220101A_sample-cell001_task-IVcurve_run-1_events.tsv": "",
+"sub-20220101A_sample-cell001_task-IVcurve_run-2_icephys.nwb": "",
+"sub-20220101A_sample-cell001_task-IVcurve_run-2_icephys.json": "",
+"sub-20220101A_sample-cell001_task-IVcurve_run-2_events.tsv": "",
+"sub-20220101A_sample-cell001_task-synaptic_icephys.nwb": "",
+"sub-20220101A_sample-cell001_task-synaptic_icephys.json": "",
+"sub-20220101A_sample-cell001_task-synaptic_events.tsv": "",
+"sub-20220101A_channels.tsv": "",
+"sub-20220101A_electrodes.tsv": "",
+"sub-20220101A_probes.tsv": "",
+"sub-20220101A_events.json": ""
+}
+},
+"sub-20220101B/": {
+"sub-20220101B_scans.tsv": "",
+"icephys/": {
+"sub-20220101B_sample-cell002_task-IVcurve_icephys.nwb": "",
+"sub-20220101B_sample-cell002_task-IVcurve_icephys.json": "",
+"sub-20220101B_sample-cell002_task-IVcurve_events.tsv": "",
+"sub-20220101B_sample-cell002_task-IVcurve_channels.tsv": "",
+"sub-20220101B_sample-cell002_task-IVcurve_electrodes.tsv": "",
+"sub-20220101B_sample-cell002_task-synaptic_icephys.nwb": "",
+"sub-20220101B_sample-cell002_task-synaptic_icephys.json": "",
+"sub-20220101B_sample-cell002_task-synaptic_events.tsv": "",
+"sub-20220101B_sample-cell002_task-synaptic_channels.tsv": "",
+"sub-20220101B_sample-cell002_task-synaptic_electrodes.tsv": "",
+"sub-20220101B_sample-cell003_task-IVcurve_icephys.nwb": "",
+"sub-20220101B_sample-cell003_task-IVcurve_icephys.json": "",
+"sub-20220101B_sample-cell003_task-IVcurve_events.tsv": "",
+"sub-20220101B_sample-cell003_task-IVcurve_channels.tsv": "",
+"sub-20220101B_sample-cell003_task-IVcurve_electrodes.tsv": "",
+"sub-20220101B_sample-cell003_task-synaptic_icephys.nwb": "",
+"sub-20220101B_sample-cell003_task-synaptic_icephys.json": "",
+"sub-20220101B_sample-cell003_task-synaptic_events.tsv": "",
+"sub-20220101B_sample-cell003_task-synaptic_channels.tsv": "",
+"sub-20220101B_sample-cell003_task-synaptic_electrodes.tsv": "",
+"sub-20220101B_probes.tsv": "",
+"sub-20220101B_events.json": ""
+}
+}
+}
+
+) }}
+
+Example `sub-20220101A_sample-cell001_task-IVcurve_run-1_icephys.json`:
+
+```json
+{
+ "TaskName": "IV Curve Characterization",
+ "TaskDescription": "Current injection protocol to characterize intrinsic membrane properties and generate current-voltage curves",
+ "InstitutionName": "Example University",
+ "PowerLineFrequency": 60,
+ "SamplingFrequency": 20000,
+ "HardwareFilters": "n/a",
+ "SoftwareFilters": "n/a",
+ "RecordingType": "epoched",
+ "BodyPart": "BRAIN",
+ "SampleEnvironment": "ex-vivo",
+ "SliceThickness": 300,
+ "SliceThicknessUnits": "um",
+ "TissueOrigin": "Visual Cortex",
+ "CellType": "pyramidal"
+}
+```
+
+Example `sub-20220101A_sample-cell001_task-synaptic_icephys.json`:
+
+```json
+{
+ "TaskName": "Synaptic Stimulation",
+ "TaskDescription": "Electrical stimulation to evoke synaptic responses and characterize synaptic properties",
+ "InstitutionName": "Example University",
+ "PowerLineFrequency": 60,
+ "SamplingFrequency": 20000,
+ "HardwareFilters": "n/a",
+ "SoftwareFilters": "n/a",
+ "RecordingType": "epoched",
+ "BodyPart": "BRAIN",
+ "SampleEnvironment": "ex-vivo",
+ "SliceThickness": 300,
+ "SliceThicknessUnits": "um",
+ "TissueOrigin": "Visual Cortex",
+ "CellType": "pyramidal"
+}
+```
+
+Example `sub-20220101B_sample-cell002_task-IVcurve_icephys.json`:
+
+```json
+{
+ "TaskName": "IV Curve Characterization",
+ "TaskDescription": "Current injection protocol to characterize intrinsic membrane properties and generate current-voltage curves",
+ "InstitutionName": "Example University",
+ "PowerLineFrequency": 60,
+ "SamplingFrequency": 20000,
+ "HardwareFilters": "n/a",
+ "SoftwareFilters": "n/a",
+ "RecordingType": "epoched",
+ "BodyPart": "BRAIN",
+ "SampleEnvironment": "ex-vivo",
+ "SliceThickness": 350,
+ "SliceThicknessUnits": "um",
+ "TissueOrigin": "Hippocampus",
+ "CellType": "interneuron"
+}
+```
+
+This toy data set can be found in [this repository,](https://gin.g-node.org/NeuralEnsemble/BEP032-examples/src/master/toy-dataset_patchclamp_single-record-per-file) with the content of the metadata files. The other option available to organize such data consists in storing several recordings in a single data file (as described in 3.8.2); the same data set is presented using this latter option in [this other repository](https://gin.g-node.org/NeuralEnsemble/BEP032-examples/src/master/toy-dataset_patchclamp_multiple-records-per-file), so that both options can be compared for the same data set.
+
+## Examples of Real Datasets
+
+Several real-world datasets have been formatted using this specification and can be used for practical guidance when curating a new dataset.
+
diff --git a/src/schema/meta/associations.yaml b/src/schema/meta/associations.yaml
index 42d72c1e90..835e120cf6 100644
--- a/src/schema/meta/associations.yaml
+++ b/src/schema/meta/associations.yaml
@@ -74,7 +74,7 @@ bvec:
channels:
selectors:
- - intersects([suffix], ['eeg', 'emg', 'ieeg', 'meg', 'nirs', 'motion', 'optodes'])
+ - intersects([suffix], ['eeg', 'emg', 'ieeg', 'meg', 'nirs', 'motion', 'optodes', 'ecephys', 'icephys'])
- extension != '.json'
target:
suffix: channels
@@ -83,7 +83,7 @@ channels:
coordsystem:
selectors:
- - intersects([suffix], ['eeg', 'ieeg', 'meg', 'nirs', 'motion', 'electrodes', 'optodes'])
+ - intersects([suffix], ['eeg', 'ieeg', 'meg', 'nirs', 'motion', 'electrodes', 'optodes', 'ecephys', 'icephys']])
- extension != '.json'
target:
suffix: coordsystem
@@ -92,7 +92,7 @@ coordsystem:
electrodes:
selectors:
- - intersects([suffix], ['eeg', 'emg', 'ieeg', 'meg'])
+ - intersects([suffix], ['eeg', 'emg', 'ieeg', 'meg', 'ecephys', 'icephys'])
- extension != '.json'
target:
suffix: electrodes
@@ -101,6 +101,14 @@ electrodes:
- space
inherit: true
+probes:
+ selectors:
+ - intersects([suffix], ['ecephys', 'icephys'])
+ - extension != '.json'
+ target:
+ suffix: probes
+ extension: .tsv
+
coordsystems:
selectors:
- datatype == 'emg'
diff --git a/src/schema/objects/columns.yaml b/src/schema/objects/columns.yaml
index 0b46f85e74..2825ee83c0 100644
--- a/src/schema/objects/columns.yaml
+++ b/src/schema/objects/columns.yaml
@@ -47,6 +47,45 @@ age:
"Units": "year",
"Maximum": 89,
}
+AP_angle:
+ name: AP_angle
+ display_name: AP angle
+ description: |
+ Anterior-Posterior rotation angle measured as rotation from the vertical axis in the sagittal plane.
+ 0° represents vertical along DV axis. Positive values indicate anterior rotation.
+ unit: degree
+ type: number
+ minimum: -180
+ maximum: 180
+AP__probes:
+ name: AP
+ display_name: Probe AP position
+ description: |
+ Probe position along the Anterior-Posterior axis.
+ Positive values are anterior to the reference point.
+ type: number
+ unit: mm
+associated_brain_region:
+ name: associated_brain_region
+ display_name: Associated brain region
+ description: |
+ A textual indication on the location of the probe,
+ preferably species-independent terms as obtained, for example from Uberon.
+ type: string
+associated_brain_region_id:
+ name: associated_uberon_brain_region_id
+ display_name: Associated brain region identifier
+ description: |
+ An identifier of the associated brain region based on the Uberon ontology
+ for anatomical structures in animals, for example "UBERON:0010415"
+ type: number
+associated_brain_region_quality_type:
+ name: associated_brain_region_quality_type
+ display_name: Associated brain region quality type
+ description: |
+ The method used to identify the associated brain region (estimated|proof)
+ depending on anatomical pictures proofing the location or indirect estimation of the location.
+ type: string
cardiac:
name: cardiac
display_name: Cardiac measurement
@@ -69,6 +108,14 @@ channel:
In the absence of a delimiter, tools MUST interpret any character as being part
of a channel name.
type: string
+channel_label:
+ name: channel_label
+ display_name: Channel label
+ description: |
+ Human readable identifier. Use this name to specify the
+ content of signals not generated by electrodes. For example,
+ 'DAQ internal synchronization signals', 'behavioral signals', 'behavioral cues'.
+ type: string
color:
name: color
display_name: Color label
@@ -92,6 +139,43 @@ component:
- $ref: objects.enums.quat_y.value
- $ref: objects.enums.quat_z.value
- $ref: objects.enums.quat_w.value
+contact_count:
+ name: contact_count
+ display_name: Contact count
+ description: |
+ Number of miscellaneous analog contacts for auxiliary signals.
+ type: number
+coordinate_reference_point:
+ name: coordinate_reference_point
+ display_name: Coordinate reference point
+ description: |
+ Point of the probe that is described by the probe coordinates and
+ on which the yaw, pitch, and roll rotations are applied.
+ type: string
+anatomical_reference_point:
+ name: anatomical_reference_point
+ display_name: Anatomical reference point
+ description: |
+ Anatomical reference point for stereotaxic coordinates (for example, `Bregma`, `Lambda`).
+ If not specified, `Bregma` is assumed for rodents.
+ MUST be defined for species other than rodents.
+ type: string
+data_entity_id:
+ name: data_entity_id
+ display_name: Data entity ID
+ description: |
+ The corresponding (UUID) identifier of the recording trace in the data file.
+ The same `data_entity_id` can be listed multiple times with different
+ `onset` and `duration` values to select a subset of a recording trace.
+ type: string
+depth__probes:
+ name: depth
+ display_name: Depth
+ description: |
+ Physical depth of the probe, for example, '0.3'.
+ This dimension should be omitted or set to 0 for two-dimensional (shank-type) probes.
+ This dimension corresponds to the z-axis of the probe's local coordinate frame.
+ type: number
coordinate_system:
name: coordinate_system
display_name: Coordinate System
@@ -141,6 +225,12 @@ description:
description: |
Brief free-text description of the channel, or other information of interest.
type: string
+device_serial_number:
+ name: device_serial_number
+ display_name: Device serial number
+ description: |
+ The serial number of the probe (provided by the manufacturer).
+ type: string
description__optode:
name: description
display_name: Description
@@ -160,6 +250,15 @@ dimension:
Size of the group (grid/strip/probe) that this electrode belongs to.
Must be of form `[AxB]` with the smallest dimension first (for example, `[1x8]`).
type: string
+# TODO: Add unit enums if everyone agrees to keep this column.
+dimension_unit:
+ name: dimension_unit
+ display_name: Dimension unit
+ description: |
+ Spatial units for a position or a physical dimension of electrodes, such as
+ 'width', 'height' or 'depth' of the probe.
+ For example, `um`.
+ type: string
duration:
name: duration
display_name: Event duration
@@ -171,6 +270,32 @@ duration:
type: number
unit: s
minimum: 0
+duration_index:
+ name: duration_index
+ display_name: Duration index
+ description: |
+ Number of recording samples included in the event.
+ type: number
+DV__probes:
+ name: DV
+ display_name: Probe DV position
+ description: |
+ Probe position along the Dorsal-Ventral axis.
+ Positive values are ventral.
+ type: number
+ unit: mm
+electrode_count:
+ name: electrode_count
+ display_name: Electrode count
+ description: |
+ Number of miscellaneous analog electrodes for auxiliary signals (for example, '2').
+ type: number
+electrode_shape:
+ name: electrode_shape
+ display_name: Electrode shape
+ description: |
+ Description of the shape of the electrode (for example, `square`, `circle`).
+ type: string
filename:
name: filename
display_name: Filename
@@ -178,6 +303,23 @@ filename:
Relative paths to files.
type: string
format: participant_relative
+# TODO: Figure out and add rule for default values.
+gain:
+ name: gain
+ display_name: Gain
+ description: |
+ Amplification factor applied from signal detection at the electrode
+ to the signal stored in the data file.
+ If no gain factor is provided it is assumed to be 1.
+ type: number
+# TODO: Clarify if the optionality of the column be defined here or as an addendum in the rules.
+ground:
+ name: ground
+ display_name: Ground
+ description: |
+ Information on the ground. For example, 'chamber screw', 'head post', 'ear clip'.
+ Only should be used to optionally override the global ground in the `_ecephys.json` or `_icephys.json` file.
+ type: string
group__channel:
name: group
display_name: Channel group
@@ -229,6 +371,26 @@ handedness:
For "ambidextrous", use one of these values: `ambidextrous`, `a`, `A`, `AMBIDEXTROUS`,
`Ambidextrous`.
+hardware_filters:
+ name: hardware_filters
+ display_name: Hardware filters
+ description: |
+ List of hardware (amplifier) filter keys applied.
+ Note that parameters should be defined in the general microephys sidecar .json file.
+ Indicate `n/a` in the absence of hardware filters applied.
+ anyOf:
+ - type: string
+ - type: string
+ enum:
+ - n/a
+height__probes:
+ name: height
+ display_name: Probe height
+ description: |
+ Physical height of the probe, for example, '0.3'.
+ This dimension should be omitted or set to 0 for one-dimensional (linear) probes.
+ This dimension corresponds to the y-axis of the probe's local coordinate frame.
+ type: number
hemisphere:
name: hemisphere
display_name: Electrode hemisphere
@@ -238,6 +400,16 @@ hemisphere:
enum:
- $ref: objects.enums.left_hemisphere.value
- $ref: objects.enums.right_hemisphere.value
+# TODO: Should the hemisphere details be unified for electrodes and probes or will it break other modality?
+hemisphere__probes:
+ name: hemisphere
+ display_name: Hemisphere
+ description: |
+ Hemisphere in which the probe is placed.
+ type: string
+ enum:
+ - $ref: objects.enums.left_hemisphere.value
+ - $ref: objects.enums.right_hemisphere.value
high_cutoff:
name: high_cutoff
display_name: High cutoff
@@ -269,6 +441,12 @@ index:
description: |
The label integer index.
type: integer
+location:
+ name: location
+ display_name: Location
+ description: |
+ An indication on the location of the electrode (for example, `cortical layer 3`, `CA1`).
+ type: string
interelectrode_distance:
name: interelectrode_distance
display_name: Interelectrode Distance
@@ -293,6 +471,13 @@ manufacturer:
The manufacturer for each electrode.
Can be used if electrodes were manufactured by more than one company.
type: string
+# TODO: Should the manufacturer details be unified for electrodes and probes?
+manufacturer__probes:
+ name: manufacturer
+ display_name: Manufacturer
+ description: |
+ Manufacturer of the probes system (for example, 'openephys', 'alphaomega','blackrock').
+ type: string
mapping:
name: mapping
display_name: Label mapping
@@ -305,6 +490,30 @@ material:
description: |
Material of the electrode (for example, `Tin`, `Ag/AgCl`, `Gold`).
type: string
+material__probes:
+ name: material__probes
+ display_name: Material
+ description: |
+ A textual description of the base material of the probe.
+ type: string
+ML_angle:
+ name: ML_angle
+ display_name: ML angle
+ description: |
+ Medial-Lateral rotation angle measured as rotation from the vertical axis in the coronal plane.
+ 0° represents vertical along DV axis. Positive values indicate rightward/clockwise rotation (as seen from behind).
+ unit: degree
+ type: number
+ minimum: -180
+ maximum: 180
+ML__probes:
+ name: ML
+ display_name: Probe ML position
+ description: |
+ Probe position along the Medial-Lateral axis.
+ Positive values are to the right (as seen from behind).
+ type: number
+ unit: mm
metabolite_parent_fraction:
name: metabolite_parent_fraction
display_name: Metabolite parent fraction
@@ -379,6 +588,12 @@ onset:
A value of `n/a` value indicates the onset time is unknown or unavailable.
type: number
unit: s
+onset_index:
+ name: onset_index
+ display_name: Onset index
+ description: |
+ Index of the onset recording sample (0 based) within the data entity.
+ type: integer
pathology:
name: pathology
display_name: Pathology
@@ -399,6 +614,28 @@ participant_id:
matching a participant entity found in the dataset.
type: string
pattern: ^sub-[0-9a-zA-Z+]+$
+pipette_solution:
+ name: pipette_solution
+ display_name: Pipette solution
+ description: |
+ The solution used to fill the pipette.
+ See also [openMINDS Pipette]
+ (https://github.com/openMetadataInitiative/openMINDS_ephys/blob/v1/schemas/device/pipetteUsage.schema.tpl.json).
+ type: string
+internal_pipette_diameter:
+ name: internal_pipette_diameter
+ display_name: Internal pipette diameter
+ description: |
+ The internal diameter of the pipette in micrometers.
+ type: number
+ unit: um
+external_pipette_diameter:
+ name: external_pipette_diameter
+ display_name: External pipette diameter
+ description: |
+ The external diameter of the pipette in micrometers.
+ type: number
+ unit: um
placement_description:
name: placement_description
display_name: Placement Scheme Description
@@ -430,7 +667,19 @@ plasma_radioactivity:
description: |
Radioactivity in plasma, in unit of plasma radioactivity (for example, `kBq/mL`).
type: number
-# reference column for channels.tsv files for EEG data
+probe_name:
+ name: probe_name
+ display_name: Probe name
+ description: |
+ A unique identifier of the probe, can be identical with the `device_serial_number`.
+ (expected to match probe_name listed in `*_electrodes.tsv`).
+ type: string
+recording_mode:
+ name: recording_mode
+ display_name: Recording mode
+ description: |
+ The mode of recording for patch clamp datasets (for example, `voltage clamp`, `current clamp`).
+ type: string
reference__eeg:
name: reference
display_name: Electrode reference
@@ -439,6 +688,14 @@ reference__eeg:
This column is not needed when it is common to all channels.
In that case the reference electrode(s) can be specified in `*_eeg.json` as `EEGReference`).
type: string
+reference__microephys:
+ name: reference
+ display_name: Reference
+ description: |
+ The reference for the given channel.
+ When the reference is an electrode in `*_electrodes.tsv`, use the name of that electrode.
+ If a corresponding electrode is not applicable, use "n/a"
+ type: string
# reference column for channels.tsv files for EMG data
reference__emg:
name: reference
@@ -457,6 +714,13 @@ reference__ieeg:
Specification of the reference (for example, `mastoid`, `ElectrodeName01`, `intracranial`, `CAR`, `other`, `n/a`).
If the channel is not an electrode channel (for example, a microphone channel) use `n/a`.
type: string
+reference_atlas:
+ name: reference_atlas
+ display_name: Reference atlas
+ description: |
+ Name of reference atlas used for associated brain region identification,
+ preferably an [ebrains supported atlas](https://www.ebrains.eu/brain-atlases/reference-atlases/#services).
+ type: string
reference_frame:
name: reference_frame
display_name: Reference frame
@@ -484,6 +748,16 @@ response_time:
`n/a` denotes a missed response.
type: number
unit: s
+rotation_angle:
+ name: rotation_angle
+ display_name: Rotation angle
+ description: |
+ Rotation angle around the probe axis. 0° when probe features align with the coronal plane.
+ Positive rotation is clockwise when viewed from above.
+ unit: degree
+ type: number
+ minimum: -180
+ maximum: 180
sample_id:
name: sample_id
display_name: Sample ID
@@ -557,6 +831,13 @@ sex:
"other": "Other",
}
}
+shank_id:
+ name: shank_id
+ display_name: Shank ID
+ description: |
+ A unique identifier to specify which shank of the probe the electrode is on.
+ This is useful for spike sorting when the electrodes are on a multi-shank probe.
+ type: string
short_channel:
name: short_channel
display_name: Short Channel
@@ -565,6 +846,7 @@ short_channel:
The total number of channels listed as short channels
SHOULD be stored in `ShortChannelCount` in `*_nirs.json`.
type: boolean
+# TODO: might need to dup for microephys__size and have it um^2
signal_electrode:
name: signal_electrode
display_name: Signal electrode
@@ -588,6 +870,20 @@ software_filters:
Note that parameters should be defined in the general MEG sidecar .json file.
Indicate `n/a` in the absence of software filters applied.
type: string
+# TODO: This seems very confusing. Should be merge with the column above?
+software_filters__channels:
+ name: software_filters
+ display_name: Software filters
+ description: |
+ List of temporal and/or spatial software filters applied
+ (for example, `SSS`, `SpatialCompensation`).
+ Note that parameters should be defined in the general microephys sidecar .json file.
+ Indicate `n/a` in the absence of software filters applied.
+ anyOf:
+ - type: string
+ - type: string
+ enum:
+ - n/a
source__channels:
name: source
display_name: Source name
@@ -667,6 +963,22 @@ strain_rrid:
of the strain of the species, for example: `RRID:IMSR_JAX:000664`.
type: string
format: rrid
+stream_id:
+ name: stream_id
+ display_name: Stream ID
+ description: |
+ Data stream of the recording the signal.
+ type: string
+# TODO: Clarify if column values can be arrays.
+surgery_date:
+ name: surgery_date
+ display_name: Surgery date
+ description: |
+ Date(s) of surgery. Datetime format and their anonymization
+ are described in [Units](SPEC_ROOT/common-principles.md#units).
+ The details of the surgery should be described in the sidecar json file.
+ type: string
+ format: datetime
target_muscle:
name: target_muscle
display_name: Target muscle
@@ -683,6 +995,19 @@ time:
For example, 5.
type: number
unit: s
+time_offset:
+ name: time_offset
+ display_name: Time offset
+ description: |
+ Time shift between signal of this channel to a reference channel in seconds.
+ type: number
+ unit: s
+time_reference_channel:
+ name: time_reference_channel
+ display_name: Time reference channel
+ description: |
+ Name of the channel that is used for time alignment of signals.
+ type: string
tracked_point__channels:
name: tracked_point
display_name: Tracked point channel
@@ -690,6 +1015,18 @@ tracked_point__channels:
Label of the point that is being tracked, for example, label of a tracker
or a marker (for example,`"LeftFoot"`, `"RightWrist"`).
type: string
+# TODO: Add relative links to `trial_type` column and events.tsv description.
+trial_id:
+ name: trial_id
+ display_name: Trial ID
+ description: |
+ If the data entity belongs to set of data_entities forming a trial,
+ they have to be linked to the same trial_id.
+ This can be used for example for group stimulation and response records.
+ The optional `trial_type` events.tsv column can be used to provide
+ further information on the trial like such as `electric stimulation`,
+ `rest`, or `pharmaceutical stimulation`.
+ type: string
trial_type:
name: trial_type
display_name: Trial type
@@ -723,6 +1060,8 @@ type__channels:
- $ref: objects.enums.ADC.value
- $ref: objects.enums.ANGACCEL.value
- $ref: objects.enums.AUDIO.value
+ - $ref: objects.enums.BB.value
+ - $ref: objects.enums.BEH.value
- $ref: objects.enums.DAC.value
- $ref: objects.enums.DBS.value
- $ref: objects.enums.ECG.value
@@ -736,8 +1075,11 @@ type__channels:
- $ref: objects.enums.GYRO.value
- $ref: objects.enums.HEOG.value
- $ref: objects.enums.HLU.value
+ - $ref: objects.enums.HP.value
+ - $ref: objects.enums.IM.value
- $ref: objects.enums.JNTANG.value
- $ref: objects.enums.LATENCY.value
+ - $ref: objects.enums.LFP.value
- $ref: objects.enums.MAGN.value
- $ref: objects.enums.MEGGRADAXIAL.value
- $ref: objects.enums.MEGGRADPLANAR.value
@@ -747,6 +1089,7 @@ type__channels:
- $ref: objects.enums.MEGREFGRADPLANAR.value
- $ref: objects.enums.MEGREFMAG.value
- $ref: objects.enums.MISC.value
+ - $ref: objects.enums.MUA.value
- $ref: objects.enums.NIRSCWAMPLITUDE.value
- $ref: objects.enums.NIRSCWFLUORESCENSEAMPLITUDE.value
- $ref: objects.enums.NIRSCWHBO.value
@@ -762,11 +1105,15 @@ type__channels:
- $ref: objects.enums.REF.value
- $ref: objects.enums.RESP.value
- $ref: objects.enums.SEEG.value
+ - $ref: objects.enums.SPIKES.value
+ - $ref: objects.enums.STIM.value
+ - $ref: objects.enums.SYNC.value
- $ref: objects.enums.SYSCLOCK.value
- $ref: objects.enums.TEMP.value
- $ref: objects.enums.TRIG.value
- $ref: objects.enums.VEL.value
- $ref: objects.enums.VEOG.value
+ - $ref: objects.enums.VM.value
# type column for electrodes.tsv files
type__electrodes:
name: type
@@ -783,6 +1130,12 @@ type__optodes:
enum:
- $ref: objects.enums.source.value
- $ref: objects.enums.detector.value
+type__probes:
+ name: type
+ display_name: Type
+ description: |
+ The type of the probe.
+ type: string
units:
name: units
display_name: Units
@@ -792,6 +1145,15 @@ units:
(see [Units](SPEC_ROOT/common-principles.md#units)).
type: string
format: unit
+units__channels:
+ name: units
+ display_name: Units
+ description: |
+ Physical unit of the value represented in this channel,
+ for example, `V` for Volt, or `uV` for micro Volt
+ (see [Units](SPEC_ROOT/common-principles.md#units)).
+ type: string
+ format: unit
units__nirs:
name: units
display_name: Units
@@ -855,6 +1217,13 @@ wavelength_emission_actual:
`n/a` for channels that do not contain raw NIRS signals (acceleration).
This field is equivalent to `measurementList.wavelengthEmissionActual` in the SNIRF specification.
type: number
+width__probes:
+ name: width
+ display_name: Width
+ description: |
+ Physical width of the probe, for example, '5'.
+ This dimension corresponds to the x-axis of the probe's local coordinate frame.
+ type: number
whole_blood_radioactivity:
name: whole_blood_radioactivity
display_name: Whole blood radioactivity
@@ -901,6 +1270,32 @@ z__optodes:
Recorded position along the z-axis.
`"n/a"` if not available.
type: number
+# TODO: Remove the overspecified entries for electrode positions if not used in microephys
+# TODO: finish up setup below
+x__electrodes:
+ name: x
+ display_name: Electrode X position
+ description: |
+ If no `_space` entity used, it is the position along the local width-axis relative
+ to the probe origin (see `_probes.tsv`, also `dimension_unit` column there in).
+ Otherwise, the position relative to the origin of the coordinate system along
+ the first axis relative to the in the `MicroephysCoordinateUnits` of the corresponding
+ `_coordsystem.json` file.
+ type: number
+y__electrodes:
+ name: y
+ display_name: Electrode Y position
+ description: |
+ Recorded position along the local height-axis relative
+ to the probe origin (see `_probes.tsv`)
+ type: number
+z__electrodes:
+ name: z
+ display_name: Electrode Z position
+ description: |
+ Recorded position along the local depth-axis relative
+ to the probe origin (see `_probes.tsv`)
+ type: number
template_x:
name: template_x
display_name: X template position
diff --git a/src/schema/objects/datatypes.yaml b/src/schema/objects/datatypes.yaml
index b3fdc455e3..5d981576f9 100644
--- a/src/schema/objects/datatypes.yaml
+++ b/src/schema/objects/datatypes.yaml
@@ -16,6 +16,11 @@ dwi:
display_name: Diffusion-Weighted Imaging
description: |
Diffusion-weighted imaging (DWI).
+ecephys:
+ value: ecephys
+ display_name: Extracellular Electrophysiology
+ description: |
+ Electrophysiological data from extracellular microelectrodes
eeg:
value: eeg
display_name: Electroencephalography
@@ -34,6 +39,11 @@ func:
display_name: Task-Based Magnetic Resonance Imaging
description: |
Task (including resting state) imaging data
+icephys:
+ value: icephys
+ display_name: Intracellular Electrophysiology
+ description: |
+ Electrophysiological data acquired from intracellular or patch microelectrodes
ieeg:
value: ieeg
display_name: Intracranial electroencephalography
diff --git a/src/schema/objects/entities.yaml b/src/schema/objects/entities.yaml
index 4161b04cd1..1048206ad0 100644
--- a/src/schema/objects/entities.yaml
+++ b/src/schema/objects/entities.yaml
@@ -362,12 +362,13 @@ split:
display_name: Split
description: |
In the case of long data recordings that exceed a file size of 2Gb,
- `.fif` files are conventionally split into multiple parts.
- Each of these files has an internal pointer to the next file.
+ Files with a lot of data may be split into multiple parts.
+ Some file types, such as `.fif`, have internal pointers to the next file
+ Each of the `.fif` files has an internal pointer to the next file.
This is important when renaming these split recordings to the BIDS convention.
Instead of a simple renaming, files should be read in and saved under their
- new names with dedicated tools like [MNE-Python](https://mne.tools/),
+ new names with dedicated tools like [MNE-Python](https://mne.tools/) for `.fif`,
which will ensure that not only the filenames, but also the internal file pointers, will be updated.
It is RECOMMENDED that `.fif` files with multiple parts use the `split-` entity to indicate each part.
diff --git a/src/schema/objects/enums.yaml b/src/schema/objects/enums.yaml
index b70641a927..0efc34986b 100644
--- a/src/schema/objects/enums.yaml
+++ b/src/schema/objects/enums.yaml
@@ -79,6 +79,16 @@ _iEEGCoordSys:
- $ref: objects.enums.ACPC.value
- $ref: objects.enums.ScanRAS.value
- $ref: objects.enums.Other.value
+_MicroephysCoordSys:
+ type: string
+ enum:
+ - $ref: objects.enums.Pixels.value
+ - $ref: objects.enums.Stereotaxic.value
+ - $ref: objects.enums.AllenCCFv3.value
+ - $ref: objects.enums.WaxholmSpace.value
+ - $ref: objects.enums.WistarRatAtlas.value
+ - $ref: objects.enums.individual.value
+ - $ref: objects.enums.Other.value
left_hemisphere:
value: 'L'
display_name: Left Hemisphere
@@ -787,6 +797,7 @@ MISC:
- ieeg
- fnirs
- motion
+ - microephys
description: |
Miscellaneous channels.
ORNT:
@@ -824,6 +835,7 @@ AUDIO:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Audio signal.
EEG:
@@ -845,6 +857,7 @@ EOG:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Generic electrooculogram (eye), different from HEOG and VEOG.
ECG:
@@ -856,6 +869,7 @@ ECG:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Electrocardiogram (heart).
EMG:
@@ -867,6 +881,7 @@ EMG:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Electromyogram (muscle).
EYEGAZE:
@@ -877,6 +892,7 @@ EYEGAZE:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Eye tracker gaze.
GSR:
@@ -895,6 +911,7 @@ HEOG:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Horizontal EOG (eye).
PPG:
@@ -912,6 +929,7 @@ PUPIL:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Eye tracker pupil diameter.
REF:
@@ -921,6 +939,7 @@ REF:
- eeg
- emg
- ieeg
+ - microephys
description: |
Reference channel.
RESP:
@@ -939,6 +958,7 @@ SYSCLOCK:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Elapsed time since trial/recording start, as provided by the recording device.
For device-external timestamp signals, use `LATENCY`.
@@ -959,6 +979,7 @@ TRIG:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Analog (TTL in Volt) or digital (binary TTL) trigger channel.
VEOG:
@@ -970,6 +991,7 @@ VEOG:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Vertical EOG (eye).
MEGMAG:
@@ -1036,6 +1058,7 @@ ECOG:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Electrode channel.
SEEG:
@@ -1045,6 +1068,7 @@ SEEG:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Electrode channel.
DBS:
@@ -1054,6 +1078,7 @@ DBS:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Electrode channel.
PD:
@@ -1063,6 +1088,7 @@ PD:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Photodiode.
ADC:
@@ -1072,6 +1098,7 @@ ADC:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Analog to Digital input.
DAC:
@@ -1081,6 +1108,7 @@ DAC:
- meg
- ieeg
- fnirs
+ - microephys
description: |
Digital to Analog output.
HLU:
@@ -1099,12 +1127,84 @@ FITERR:
- fnirs
description: |
Fit error signal from each head localization coil.
+LFP:
+ value: LFP
+ display_name: LFP
+ tags:
+ - microephys
+ description: |
+ Low-pass filtered extracellular voltage signal that represents local field potentials.
+HP:
+ value: HP
+ display_name: HP
+ tags:
+ - microephys
+ description: |
+ High-pass filtered extracellular voltage signal as used for spike sorting.
+MUA:
+ value: MUA
+ display_name: MUA
+ tags:
+ - microephys
+ description: |
+ High-pass filtered and rectified or thresholded extracellular voltage signal
+ that represents an estimate of multi-unit activity.
+BB:
+ value: BB
+ display_name: BB
+ tags:
+ - microephys
+ description: |
+ Unfiltered (broadband) extracellular voltage signal.
+SPIKES:
+ value: SPIKES
+ display_name: SPIKES
+ tags:
+ - microephys
+ description: |
+ Discrete signal indicating spike events as derived from spike detection or spike sorting.
+VM:
+ value: VM
+ display_name: VM
+ tags:
+ - microephys
+ description: |
+ Membrane voltage.
+IM:
+ value: IM
+ display_name: IM
+ tags:
+ - microephys
+ description: |
+ Membrane current.
+SYNC:
+ value: SYNC
+ display_name: SYNC
+ tags:
+ - microephys
+ description: |
+ Signal used for synchronization between different recording systems / channels.
+STIM:
+ value: STIM
+ display_name: STIM
+ tags:
+ - microephys
+ description: |
+ Electrical stimulation.
+BEH:
+ value: BEH
+ display_name: BEH
+ tags:
+ - microephys
+ description: |
+ Behavioral signal.
OTHER:
value: OTHER
display_name: OTHER
tags:
- meg
- fnirs
+ - microephys
description: |
Any other type of channel.
NIRSCWAMPLITUDE:
@@ -1471,3 +1571,50 @@ microvascular:
display_name: microvascular
description: |
The origin of a tissue: microvascular
+Stereotaxic:
+ value: Stereotaxic
+ display_name: Stereotaxic
+ description: |
+ A generic stereotaxic coordinate system commonly used in animal neuroscience for surgical
+ targeting and electrode localization. The origin is at bregma, a skull landmark defined as
+ the intersection of the coronal and sagittal sutures. The x-axis corresponds to the
+ anterior-posterior (AP) axis with posterior being positive. The y-axis corresponds to the
+ dorsal-ventral (DV) or superior-inferior (SI) axis with ventral/inferior being positive.
+ The z-axis corresponds to the medial-lateral (ML) axis with right being positive.
+ Units are typically in millimeters or micrometers. When using this coordinate system,
+ the specific anatomical reference point and units should be specified in
+ `MicroephysCoordinateSystemDescription`.
+AllenCCFv3:
+ value: AllenCCFv3
+ display_name: Allen CCF v3
+ description: |
+ Allen Common Coordinate Framework version 3 (RRID:SCR_020999), a 3D reference space for
+ the mouse brain based on average anatomy. The framework provides a systematic way to
+ map and compare data across different experiments and labs. Origin and orientation
+ follow the Allen Institute conventions.
+ Reference: Wang Q, Ding SL, Li Y, Royall J, Feng D, Lesnar P, Graddis N, Naeemi M, Facer B,
+ Ho A, Dolbeare T, Blanchard B, Dee N, Wakeman W, Hirokawa KE, Szafer A, Sunkin SM, Oh SW,
+ Bernard A, Phillips JW, Hawrylycz M, Koch C, Zeng H, Harris JA, Ng L. The Allen Mouse Brain
+ Common Coordinate Framework: A 3D Reference Atlas. Cell. 2020 May 14;181(4):936-953.e20.
+ [doi:10.1016/j.cell.2020.04.007](https://doi.org/10.1016/j.cell.2020.04.007).
+WaxholmSpace:
+ value: WaxholmSpace
+ display_name: Waxholm Space
+ description: |
+ A standardized 3D coordinate system for the rat brain (RRID:SCR_001592) based on
+ high-resolution imaging data. Part of the Waxholm Space atlas of the Sprague Dawley
+ rat brain. For more information, see
+ [https://www.nitrc.org/projects/whs-sd-atlas](https://www.nitrc.org/projects/whs-sd-atlas).
+ Reference: Hawrylycz M, Baldock RA, Burger A, Hashikawa T, Johnson GA, Martone M, Ng L,
+ Lau C, Larson SD, Nissanov J, Puelles L, Ruffins S, Verbeek F, Zaslavsky I, Boline J.
+ Digital atlasing and standardization in the mouse brain. PLoS Comput Biol. 2011 Feb 3;7(2):e1001065.
+ [doi:10.1371/journal.pcbi.1001065](https://doi.org/10.1371/journal.pcbi.1001065).
+WistarRatAtlas:
+ value: WistarRatAtlas
+ display_name: Wistar Rat Atlas
+ description: |
+ A multidimensional magnetic resonance histology atlas of the adult Wistar rat brain
+ (RRID:SCR_006288). This atlas provides high-resolution anatomical reference for rat brain studies.
+ Reference: Johnson GA, Calabrese E, Badea A, Paxinos G, Watson C. A multidimensional magnetic resonance
+ histology atlas of the Wistar rat brain. Neuroimage. 2012 Sep;62(3):1848-56.
+ [doi:10.1016/j.neuroimage.2012.05.041](https://doi.org/10.1016/j.neuroimage.2012.05.041).
diff --git a/src/schema/objects/extensions.yaml b/src/schema/objects/extensions.yaml
index d482f8849d..9e2f735a4b 100644
--- a/src/schema/objects/extensions.yaml
+++ b/src/schema/objects/extensions.yaml
@@ -194,6 +194,11 @@ nii_gz:
display_name: Compressed NIfTI
description: |
A compressed Neuroimaging Informatics Technology Initiative (NIfTI) data file.
+nix:
+ value: .nix
+ display_name: Neuroscience Information Exchange Format
+ description: |
+ A [Neuroscience Information Exchange](https://nixio.readthedocs.io) file.
nwb:
value: .nwb
display_name: Neurodata Without Borders Format
diff --git a/src/schema/objects/files.yaml b/src/schema/objects/files.yaml
index 9c6bc41305..418c5edf25 100644
--- a/src/schema/objects/files.yaml
+++ b/src/schema/objects/files.yaml
@@ -133,3 +133,10 @@ stimuli:
A directory to store any stimulus files used during an experiment.
See the [relevant section](SPEC_ROOT/modality-agnostic-files/events.md#stimuli-directory)
for more information.
+probes:
+ display_name: Probes
+ file_type: directory
+ description: |
+ A directory to store probe using the ProbeInterface specification format. This folder can be used to also store the associated probe figures.
+ This is primarily intended for use with Microelectrode Electrophysiology data, see more information in the
+ [relevant section](SPEC_ROOT/modality-specific-files/microelectrode-electrophysiology.md#probeinterface-library).
diff --git a/src/schema/objects/metadata.yaml b/src/schema/objects/metadata.yaml
index 4908cee718..0ba73e792d 100644
--- a/src/schema/objects/metadata.yaml
+++ b/src/schema/objects/metadata.yaml
@@ -2237,6 +2237,54 @@ MEGREFChannelCount:
`MEGREFChannelCount` should be set to `0`.
type: integer
minimum: 0
+# TODO: Change if needs to be broken down into ecephys and icephys
+# TODO: Add links to the 2D coordinate system, Pixels and glossary entry.
+# TODO: Add enums for the valid values specific to microephys
+MicroephysCoordinateSystem:
+ name: MicroephysCoordinateSystem
+ display_name: Microephys Coordinate System
+ description: |
+ Defines the coordinate system for the microelectrode probes.
+ See the
+ [Coordinate Systems Appendix](SPEC_ROOT/appendices/coordinate-systems.md)
+ for a list of restricted keywords for coordinate systems.
+ If `"Other"`, provide definition of the coordinate system in
+ `"MicroephysCoordinateSystemDescription"`. If positions correspond to
+ pixel indices in a 2D image (of either a volume-rendering,
+ surface-rendering, operative photo, or operative drawing),
+ this MUST be "Pixels". For more information, see the section
+ on 2D coordinate systems.
+ For a list of valid values for this field, see the associated glossary entry.
+ anyOf:
+ - $ref: objects.enums._MicroephysCoordSys
+ - $ref: objects.enums._StandardTemplateCoordSys
+MicroephysCoordinateSystemDescription:
+ name: MicroephysCoordinateSystemDescription
+ display_name: Microephys Coordinate System Description
+ description: |
+ Free-form text description of the coordinate system.
+ May also include a link to a documentation page or paper describing the
+ system in greater detail.
+ type: string
+MicroephysCoordinateUnits:
+ name: MicroephysCoordinateUnits
+ display_name: Microephys Coordinate Units
+ description: |
+ Units of the coordinates of `"MicroephysCoordinateSystem"`.
+ type: string
+# TODO: Clarify if units need to be used or enums, if units, define pixels
+ enum:
+ - m
+ - mm
+ - cm
+ - pixels
+MicroephysCoordinateSystemPhoto:
+ name: MicroephysCoordinateSystemPhoto
+ display_name: Microephys Coordinate System Photo
+ description: |
+ A link to a photo or drawing of the microelectrode probe system.
+ type: string
+ format: uri
MISCChannelCount:
name: MISCChannelCount
display_name: Miscellaneous channel count
@@ -2355,6 +2403,12 @@ ManufacturersModelName:
description: |
Manufacturer's model name of the equipment that produced the measurements.
type: string
+ManufacturersModelVersion:
+ name: ManufacturersModelVersion
+ display_name: Manufacturers Model Version
+ description: |
+ Manufacturer's model version of the equipment that produced the measurements.
+ type: string
MatrixCoilMode:
name: MatrixCoilMode
display_name: Matrix Coil Mode
@@ -3152,6 +3206,12 @@ RecordingDuration:
Length of the recording in seconds (for example, `3600`).
type: number
unit: s
+RecordingSetupName:
+ name: RecordingSetupName
+ display_name: Recording Setup Name
+ description: |
+ Custom name of the recording setup.
+ type: string
RecordingType:
name: RecordingType
display_name: Recording Type
@@ -3958,6 +4018,13 @@ SubjectArtefactDescription:
If this field is set to `"n/a"`, it will be interpreted as absence of major
source of artifacts except cardiac and blinks.
type: string
+SupplementarySignals:
+ name: SupplementarySignals
+ display_name: Supplementary Signals
+ description: |
+ Description of the supplementary signal (additional modalities) recorded
+ in parallel and are also stored in the data file.
+ type: string
TablePosition:
name: TablePosition
display_name: Table Position
diff --git a/src/schema/objects/modalities.yaml b/src/schema/objects/modalities.yaml
index f363180534..aab7a8e512 100644
--- a/src/schema/objects/modalities.yaml
+++ b/src/schema/objects/modalities.yaml
@@ -42,3 +42,6 @@ nirs:
mrs:
display_name: Magnetic Resonance Spectroscopy
description: Data acquired with MRS.
+microephys:
+ display_name: Microelectrode Electrophysiology
+ description: Electrophysiological data acquired using microelectodes.
diff --git a/src/schema/objects/suffixes.yaml b/src/schema/objects/suffixes.yaml
index 17a501b185..ebba3969b4 100644
--- a/src/schema/objects/suffixes.yaml
+++ b/src/schema/objects/suffixes.yaml
@@ -602,6 +602,11 @@ dwi:
display_name: Diffusion-weighted image
description: |
Diffusion-weighted imaging contrast (specialized T2 weighting).
+ecephys:
+ value: ecephys
+ display_name: Extracellular Electrophysiology
+ description: |
+ Extracellular electrophysiological data.
eeg:
value: eeg
display_name: Electroencephalography
@@ -652,6 +657,11 @@ XPCT:
display_name: X-ray Phase-Contrast Tomography
description: |
X-ray phase-contrast tomography imaging data
+icephys:
+ value: icephys
+ display_name: Intracellular Electrophysiology
+ description: |
+ Intracellular electrophysiological data.
ieeg:
value: ieeg
display_name: Intracranial Electroencephalography
@@ -815,6 +825,16 @@ physio:
display_name: Physiological recording
description: |
Physiological recordings such as cardiac and respiratory signals.
+probe:
+ value: probe
+ display_name: A recording probe
+ description: |
+ A probe with one or more recording contacts.
+probes:
+ value: probes
+ display_name: Implanted physical devices
+ description: |
+ Physical devices used for recording microelectrode electrophysiology data, whether chronically or acutely implanted.
probseg:
value: probseg
display_name: Probabilistic Segmentation
diff --git a/src/schema/rules/checks/channels.yaml b/src/schema/rules/checks/channels.yaml
index a9eddc55cd..e7f3ed160d 100644
--- a/src/schema/rules/checks/channels.yaml
+++ b/src/schema/rules/checks/channels.yaml
@@ -42,6 +42,7 @@ RequiredCoordsystem:
selectors:
- suffix == "electrodes"
- extension == ".tsv"
+ - '!intersects([datatype], ["ecephys", "icephys"])' #TODO: need to verify and unify how selector is used EMG
- datatype != "emg" # coordsys file may have space entity that electrodes.tsv lacks
checks:
- associations.coordsystem != null || associations.coordsystems != null
diff --git a/src/schema/rules/checks/microephys.yaml b/src/schema/rules/checks/microephys.yaml
new file mode 100644
index 0000000000..a7e20e22ec
--- /dev/null
+++ b/src/schema/rules/checks/microephys.yaml
@@ -0,0 +1,51 @@
+---
+# Microelectrode electrophysiology validation rules
+
+# Override the general RequiredCoordsystem rule for microephys
+# Allow electrodes.tsv without coordsystem.json for microephys datatypes
+RequiredCoordsystem:
+ issue:
+ code: REQUIRED_COORDSYSTEM
+ message: |
+ If an electrodes.tsv file is provided, an associated coordsystem.json must also be present.
+ level: error
+ selectors:
+ - suffix == "electrodes"
+ - extension == ".tsv"
+ - '!intersects([datatype], ["ecephys", "icephys"])' # Exclude microephys datatypes
+ checks:
+ - associations.coordsystem != null
+
+# For microephys: if coordsystem.json with space exists, require matching electrodes.tsv
+RequiredElectrodesWithSpace:
+ issue:
+ code: MICROEPHYS_ELECTRODES_SPACE_REQUIRED
+ message: |
+ If a coordsystem.json file with a space entity is present for microelectrode
+ electrophysiology data, a corresponding electrodes.tsv file with the same
+ space entity must also be present.
+ level: error
+ selectors:
+ - intersects([datatype], ["ecephys", "icephys"])
+ - suffix == "coordsystem"
+ - extension == ".json"
+ - '"space" in entities'
+ checks:
+ - associations.electrodes != null
+
+# Ensure space labels match between coordsystem.json and electrodes.tsv
+MatchingSpaceLabels:
+ issue:
+ code: MICROEPHYS_SPACE_MISMATCH
+ message: |
+ The space entity in electrodes.tsv must match the space entity in the
+ corresponding coordsystem.json file for microelectrode electrophysiology data.
+ level: error
+ selectors:
+ - intersects([datatype], ["ecephys", "icephys"])
+ - suffix == "electrodes"
+ - extension == ".tsv"
+ - '"space" in entities'
+ - associations.coordsystem != null
+ checks:
+ - associations.coordsystem.entities.space == entities.space
diff --git a/src/schema/rules/directories.yaml b/src/schema/rules/directories.yaml
index e5415e8c14..57765d008a 100644
--- a/src/schema/rules/directories.yaml
+++ b/src/schema/rules/directories.yaml
@@ -56,6 +56,7 @@ raw:
- sourcedata
- stimuli
- subject
+ - probes
code:
name: code
level: optional
@@ -102,6 +103,10 @@ raw:
value: datatype
level: required
opaque: false
+ probes:
+ name: probes
+ level: optional
+ opaque: true
derivative:
root:
diff --git a/src/schema/rules/files/common/core.yaml b/src/schema/rules/files/common/core.yaml
index fe8535d0ce..2de006942e 100644
--- a/src/schema/rules/files/common/core.yaml
+++ b/src/schema/rules/files/common/core.yaml
@@ -48,3 +48,6 @@ sourcedata:
stimuli:
level: optional
path: stimuli
+probes:
+ level: optional
+ path: probes
diff --git a/src/schema/rules/files/raw/channels.yaml b/src/schema/rules/files/raw/channels.yaml
index 4905245a78..d848d3032e 100644
--- a/src/schema/rules/files/raw/channels.yaml
+++ b/src/schema/rules/files/raw/channels.yaml
@@ -11,6 +11,22 @@ channels:
- ieeg
- nirs
+# microephys has an additional 'sample' entity but excludes task/run
+channels__microephys:
+ $ref: rules.files.raw.channels.channels
+ suffixes:
+ - channels
+ extensions:
+ - .json
+ - .tsv
+ datatypes:
+ - icephys
+ - ecephys
+ entities:
+ subject: required
+ session: optional
+ sample: optional
+ acquisition: optional
# emg may have a `recording` entity
channels__emg:
$ref: rules.files.raw.channels.channels
@@ -61,6 +77,14 @@ coordsystem__eeg:
$ref: rules.files.raw.channels.coordsystem.entities
space: optional
+coordsystem_microephys:
+ $ref: rules.files.raw.channels.coordsystem
+ datatypes:
+ - icephys
+ - ecephys
+ entities:
+ $ref: rules.files.raw.channels.coordsystem.entities
+ space: required
# emg may have a `recording` entity
coordsystem__emg:
$ref: rules.files.raw.channels.coordsystem__eeg
@@ -110,6 +134,25 @@ electrodes__meg:
$ref: rules.files.raw.channels.electrodes__eeg.entities
processing: optional
+# microephys electrodes exclude task/run entities
+electrodes__microephys:
+ $ref: rules.files.raw.channels.electrodes
+ suffixes:
+ - electrodes
+ extensions:
+ - .json
+ - .tsv
+ datatypes:
+ - ecephys
+ - icephys
+ entities:
+ subject: required
+ session: optional
+ sample: optional
+ acquisition: optional
+ processing: optional
+ space: optional
+
optodes:
suffixes:
- optodes
diff --git a/src/schema/rules/files/raw/events.yaml b/src/schema/rules/files/raw/events.yaml
index 81da1dd2d8..ec0fe77dd2 100644
--- a/src/schema/rules/files/raw/events.yaml
+++ b/src/schema/rules/files/raw/events.yaml
@@ -16,6 +16,18 @@ events:
# Specializations
# In these rules, we use $ref to retrieve most of an object, and then override
+events__microephys:
+ $ref: rules.files.raw.events.events
+ datatypes:
+ - ecephys
+ - icephys
+ entities:
+ subject: required
+ session: optional
+ sample: optional
+ task: optional
+ acquisition: optional
+ run: optional
events__emg:
$ref: rules.files.raw.events.events
datatypes:
diff --git a/src/schema/rules/files/raw/microephys.yaml b/src/schema/rules/files/raw/microephys.yaml
new file mode 100644
index 0000000000..643bbc0a33
--- /dev/null
+++ b/src/schema/rules/files/raw/microephys.yaml
@@ -0,0 +1,36 @@
+---
+microephys:
+ suffixes:
+ - ecephys
+ - icephys
+ extensions:
+ - .nwb
+ # possible future: serialization in .zarr format to accompany .ome.zarr
+ # - .nwb.zarr
+ - .nix
+ - .json
+ datatypes:
+ - ecephys
+ - icephys
+ entities:
+ subject: required
+ session: optional
+ sample: optional
+ task: optional
+ acquisition: optional
+ run: optional
+
+probes:
+ suffixes:
+ - probes
+ extensions:
+ - .tsv
+ - .json
+ datatypes:
+ - ecephys
+ - icephys
+ entities:
+ subject: required
+ session: optional
+ sample: optional
+ acquisition: optional
diff --git a/src/schema/rules/files/raw/photo.yaml b/src/schema/rules/files/raw/photo.yaml
index 6d7a4ac4da..220c80b909 100644
--- a/src/schema/rules/files/raw/photo.yaml
+++ b/src/schema/rules/files/raw/photo.yaml
@@ -35,3 +35,15 @@ photo__micr:
entities:
$ref: rules.files.raw.photo.photo.entities
sample: required
+
+# microephys photo has sample and space entities like other
+# microephys files and unlike iEEG
+photo__microephys:
+ $ref: rules.files.raw.photo.photo
+ datatypes:
+ - ecephys
+ - icephys
+ entities:
+ $ref: rules.files.raw.photo.photo.entities
+ sample: optional
+ space: optional
diff --git a/src/schema/rules/json/microephys.yaml b/src/schema/rules/json/microephys.yaml
new file mode 100644
index 0000000000..a407f5b94f
--- /dev/null
+++ b/src/schema/rules/json/microephys.yaml
@@ -0,0 +1,40 @@
+#
+# Groups of related metadata fields
+#
+# Assumptions: never need disjunction of selectors
+# Assumptions: top-to-bottom overrides is sufficient logic
+
+---
+microephysCoordsystemGeneral:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == ["coordsystem"]
+ fields:
+ IntendedFor:
+ level: optional
+ description_addendum: |
+ # TODO
+
+# Fields relating to the microephys electrode positions
+microephysCoordsystemPositions:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == ["coordsystem"]
+ fields:
+ MicroephysCoordinateSystem: required
+ MicroephysCoordinateUnits: required
+ MicroephysCoordinateSystemDescription:
+ level: recommended
+ level_addendum: required if `MicroephysCoordinateSystem` is `"Other"`
+ MicroephysCoordinateSystemPhoto:
+ level: optional
+ level_addendum: required if `MicroephysCoordinateUnits` is `"pixels"`
+
+microephysCoordsystemOther:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == ["coordsystem"]
+ - '"MicroephysCoordinateSystem" in json'
+ - json.MicroephysCoordinateSystem == "Other"
+ fields:
+ MicroephysCoordinateSystemDescription: required
diff --git a/src/schema/rules/modalities.yaml b/src/schema/rules/modalities.yaml
index 6aa492a8a0..304b21bc83 100644
--- a/src/schema/rules/modalities.yaml
+++ b/src/schema/rules/modalities.yaml
@@ -34,6 +34,10 @@ motion:
nirs:
datatypes:
- nirs
+microephys:
+ datatypes:
+ - ecephys
+ - icephys
mrs:
datatypes:
- mrs
diff --git a/src/schema/rules/sidecars/microephys.yaml b/src/schema/rules/sidecars/microephys.yaml
new file mode 100644
index 0000000000..46806f8180
--- /dev/null
+++ b/src/schema/rules/sidecars/microephys.yaml
@@ -0,0 +1,105 @@
+#
+# Groups of related metadata fields
+#
+# Assumptions: never need disjunction of selectors
+# Assumptions: top-to-bottom overrides is sufficient logic
+
+---
+# Groups are defined as they appear in the proposal
+
+microephysInstitutionInformation:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == ["ecephys", "icephys"]
+ fields:
+ InstitutionName: recommended
+ InstitutionAddress: recommended
+ InstitutionalDepartmentName: recommended
+
+microephysSetup:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == ["ecephys", "icephys"]
+ fields:
+ PowerLineFrequency: required
+ Manufacturer:
+ level: recommended
+ description_addendum: For example, `"TDT"`, `"Blackrock"`.
+ ManufacturersModelName: recommended
+ ManufacturersModelVersion: recommended
+ RecordingSetupName: recommended
+ SamplingFrequency:
+ level: required
+ description_addendum: |
+ Internal (maximum) sampling frequency (in Hz)
+ of the recording (for example, "24000").
+ DeviceSerialNumber:
+ level: recommended
+ description_addendum: |
+ The serial number of the components of the setup,
+ recommended to add serial numbers and versions of
+ ALL components constituting the setup.
+ SoftwareName:
+ level: recommended
+ description_addendum: |
+ The name of the software suite used to
+ record the data.
+ SoftwareVersions: recommended
+
+microephysProcessing:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == ["ecephys", "icephys"]
+ fields:
+ SoftwareFilters: required
+ HardwareFilters: recommended
+
+microephysPharmaceuticals:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == ["ecephys", "icephys"]
+ fields:
+ PharmaceuticalName: recommended
+ PharmaceuticalDoseAmount: recommended
+ PharmaceuticalDoseUnits: recommended
+ PharmaceuticalDoseRegimen: recommended
+ PharmaceuticalDoseTime: recommended
+
+microephysSupplementary:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == ["ecephys", "icephys"]
+ fields:
+ SupplementarySignals: optional
+
+microephysSample:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == ["ecephys", "icephys"]
+ fields:
+ BodyPart: recommended
+ BodyPartDetails: recommended
+ BodyPartDetailsOntology: optional
+ SampleEnvironment: recommended
+ SampleEmbedding: optional
+ SliceThickness: optional
+ SampleExtractionProtocol: optional
+
+microephysTaskInformation:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == ["ecephys", "icephys"]
+ fields:
+ TaskName:
+ level: recommended
+ description_addendum: |
+ A recommended convention is to name resting state task using labels
+ beginning with `rest`.
+ TaskDescription: recommended
+ Instructions:
+ level: recommended
+ description_addendum: |
+ This is especially important in context of resting state recordings and
+ distinguishing between eyes open and eyes closed paradigms.
+ CogAtlasID: recommended
+ CogPOID: recommended
diff --git a/src/schema/rules/tabular_data/events.yaml b/src/schema/rules/tabular_data/events.yaml
index 5bf86123c1..53403ea54b 100644
--- a/src/schema/rules/tabular_data/events.yaml
+++ b/src/schema/rules/tabular_data/events.yaml
@@ -14,6 +14,27 @@ Events:
description_addendum: |
Note that this column only applies to data types where
channels are specified, such as EEG, iEEG, MEG or NIRS.
+# TODO: Make the addendums more clear and descriptive
+ data_entity_id:
+ level: optional
+ description_addendum: |
+ Note that this column only applies to
+ microelectrode eleectrophysiology data type.
+ duration_index:
+ level: optional
+ description_addendum: |
+ Note that this column only applies to
+ microelectrode eleectrophysiology data type.
+ onset_index:
+ level: optional
+ description_addendum: |
+ Note that this column only applies to
+ microelectrode eleectrophysiology data type.
+ trial_id:
+ level: optional
+ description_addendum: |
+ Note that this column only applies to
+ microelectrode eleectrophysiology data type.
additional_columns: allowed
initial_columns:
- onset
diff --git a/src/schema/rules/tabular_data/microephys.yaml b/src/schema/rules/tabular_data/microephys.yaml
new file mode 100644
index 0000000000..6c890cf1f5
--- /dev/null
+++ b/src/schema/rules/tabular_data/microephys.yaml
@@ -0,0 +1,102 @@
+---
+microephysProbes:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == "probes"
+ - extension == ".tsv"
+ initial_columns:
+ - probe_name
+ - type__probes
+ - AP__probes
+ - ML__probes
+ - DV__probes
+ - AP_angle
+ - ML_angle
+ columns:
+ probe_name: required
+ type__probes: required
+ AP__probes: recommended
+ ML__probes: recommended
+ DV__probes: recommended
+ AP_angle: recommended
+ ML_angle: recommended
+ manufacturer__probes: recommended
+ device_serial_number: recommended
+ electrode_count: optional
+ width__probes: optional
+ height__probes: optional
+ depth__probes: optional
+ dimension_unit: optional
+ rotation_angle: recommended
+ coordinate_reference_point: recommended
+ anatomical_reference_point: optional
+ hemisphere__probes: recommended
+ associated_brain_region: recommended
+ associated_brain_region_id: recommended
+ associated_brain_region_quality_type: recommended
+ reference_atlas: recommended
+ material__probes: optional
+ index_columns: [probe_name]
+ additional_columns: allowed_if_defined
+
+microephysElectrodes:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == "electrodes"
+ - extension == ".tsv"
+ initial_columns:
+ - name__electrodes
+ - probe_name
+ - x
+ - y
+ - z
+ columns:
+ name__electrodes: required
+ probe_name: required
+ x: required
+ y: required
+ z: required
+ hemisphere: recommended
+ impedance: recommended
+ shank_id: optional
+ size: optional
+ electrode_shape: optional
+ material: optional
+ location: recommended
+ pipette_solution: optional
+ internal_pipette_diameter: optional
+ external_pipette_diameter: optional
+ index_columns: [name__electrodes]
+ additional_columns: allowed_if_defined
+
+microephysChannels:
+ selectors:
+ - datatype == ["ecephys", "icephys"]
+ - suffix == "channels"
+ - extension == ".tsv"
+ initial_columns:
+ - name__channels
+ - reference__microephys
+ - type__channels
+ - units__channels
+ - sampling_frequency
+ columns:
+ name__channels: required
+ reference__microephys: required
+ type__channels: required
+ units__channels: required
+ sampling_frequency: optional
+ channel_label: optional
+ stream_id: optional
+ description: optional
+ hardware_filters: recommended
+ software_filters: recommended
+ status: optional
+ status_description: optional
+ gain: recommended
+ time_offset: optional
+ time_reference_channel: optional
+ ground: optional
+ recording_mode: recommended
+ index_columns: [name__channels]
+ additional_columns: allowed_if_defined