Skip to content

Commit

Permalink
Add implied defaults for sclaing_factor and offset
Browse files Browse the repository at this point in the history
  • Loading branch information
phyy-nx committed Aug 21, 2024
1 parent 37f53ac commit 314c763
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions applications/NXmx.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,12 +171,16 @@
single per-pixel array applied to every image (dimensions (i, j) or (i, j, k)),
or a per-image correction specified with an array whose slowest rank is nP (dimensions
(np, 1), (np, i, j) or (np, i, j, k)).

When ommited, the scaling factor is assumed to be 1.
</doc>
</field>
<field name="data_offset" type="NX_NUMBER" optional="true">
<doc>
An optional offset to apply to the values in data.

When ommited, the offset is assumed to be 0.

See :ref:`data_scaling_factor &lt;/NXmx/ENTRY/DATA/data_scaling_factor-field&gt;` for more information.
</doc>
</field>
Expand Down
4 changes: 4 additions & 0 deletions base_classes/NXdata.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,16 @@
corrected values = (FIELDNAME + offset) * scaling_factor

This formula will derive the values to use in downstream applications, when necessary.

When ommited, the scaling factor is assumed to be 1.
</doc>
</field>
<field name="FIELDNAME_offset" type="NX_NUMBER">
<doc>
An optional offset to apply to the values in FIELDNAME (usually the signal).

When ommited, the offset is assumed to be 0.

See :ref:`FIELDNAME_scaling_factor &lt;/NXdata/FIELDNAME_scaling_factor-field&gt;` for more information.
</doc>
</field>
Expand Down

0 comments on commit 314c763

Please sign in to comment.