ezmsg.nwb.scaling.SCALING_ATTR#
- SCALING_ATTR = 'nwb_scaling'#
Prefix under which a message reports the scaling that relates it to the file.
Namespaced rather than flat
attrs["conversion"]/attrs["offset"]: attrs is a shared dict that any stage downstream may add to, and three unqualified generic words are a collision waiting to happen.Five prefixed keys rather than one nested dict under this name, because a dict is opaque to every stage that walks attrs generically.
ezmsg-sigproc’sconcatis the case that forced it: it merges two messages’ attrs and rejects any value that is not a scalar, so a nested dict raisedTypeErroreven when both sides carried an identical one. Flat keys also let it do the right thing when two streams disagree – an unequalnwb_scaling_gaingets promoted onto thechaxis, which is where a per-channel gain belongs and is something a dict could never express.