Skip to content

Commit

Permalink
Add documentation about duplicated metadata in Electrodes (#442)
Browse files Browse the repository at this point in the history
* add documentation about duplicated metadata

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
h-mayorquin and pre-commit-ci[bot] authored Apr 4, 2024
1 parent b79276b commit 6ab9bb5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/best_practices/ecephys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ For relative position of an electrode on a probe, use ``rel_x``, ``rel_y``, and
that are close enough to share a neuron.


Avoid Duplication of Metadata
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The ``ElectrodeTable`` should not contain redundant information that is present somewhere else within the :ref:`nwb-schema:sec-NWBFile` . Avoid adding columns to the `ElectrodeTable` that correspond to properties of the :ref:`nwb-schema:sec-ElectricalSeries` such as ``unit``, ``offsets`` or ``channel gains`` These properties should be stored in the corresponding attributes of the :ref:`nwb-schema:sec-ElectricalSeries` object.

As a concrete example, the package objects from the `SpikeInterface <https://spikeinterface.readthedocs.io/en/latest/>`__ package contain two properties named ``gain_to_uv`` and ``offset_to_uv`` that are used to convert the raw data to microvolts. These properties should not be stored in the `ElectrodeTable` but rather in the ``ElectricalSeries`` object as ``channel_conversion`` and ``offset`` respectively.

Units Table
-----------
Expand Down
6 changes: 6 additions & 0 deletions docs/best_practices/general.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@ Empty Strings
Required free-text fields for neurodata types should not use placeholders such as empty strings (`""`), ``"no description"``, or ``"PLACEHOLDER"``. For example, the :py:attr:`description` field should always richly describe that particular neurodata type and its interpretation within the experiment.

Many attributes of neurodata types in NWB are optional details to include. It is not necessary, therefore, to use placeholders for these attributes. Instead, they should not be specified at all.


Avoid Duplication of Metadata
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Avoid duplication of metadata across different objects. If a piece of metadata is shared between multiple objects, consider creating a separate object to store that metadata and linking to it from the other objects. This will help to keep the metadata consistent and reduce the risk of errors when updating the metadata.

0 comments on commit 6ab9bb5

Please sign in to comment.