Skip to content

ElectricalSeries: channel_conversion doc omits offset from conversion formula #698

Description

@ehennestad

Summary

The data-to-volts conversion formula is described inconsistently across two fields of ElectricalSeries in nwb.ecephys.yaml.

Current state

ElectricalSeries.dataunit attribute doc:

"To access the data in these units, multiply 'data' by 'conversion', followed by 'channel_conversion' (if present), and then add 'offset'."

Full formula: data * conversion * channel_conversion + offset

ElectricalSeries.channel_conversion doc:

"…data in Volts = data * data.conversion * channel_conversion"

Formula: data * data.conversion * channel_conversionoffset is missing.

Impact

A reader consulting only the channel_conversion doc would not know that offset is part of the pipeline and could implement the conversion incorrectly.

Proposed fix

Update the channel_conversion doc to include offset in both prose and the inline equation, e.g.:

"…data in Volts = data * data.conversion * channel_conversion + data.offset"

Both fields should use the same canonical formula notation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions