nexusformat / definitions

Definitions of the NeXus Standard File Structure and Contents
https://manual.nexusformat.org/
Other
26 stars 55 forks source link

Better rewrite of NXdata scaling_factor and offset fields #1343

Open phyy-nx opened 5 months ago

phyy-nx commented 5 months ago

Adds FIELDNAME_scaling_factor and FIELDNAME_offset as fields to NXdata. These fields should be used instead of scaling_factor and offset, as it is ambiguous which fields to apply them to in the case of multiple signals. _scaling_factor and _offset are added as reserved suffixes.

Additionally adds a formula for how to apply these fields:

corrected values = (FIELDNAME + offset) * scaling_factor

For NXmx, adds clarification these fields can be used as pedestal and gain correction fields, and defines these terms. Also the possible rank options are elaborated. These rank options were implied (in my opinion) in the original wording, but in NXmx I made it more explicit.

Closes #1332. Same set of changes as in #1333 with an additional commit to resolve feedback from #1333.

phyy-nx commented 5 months ago

691f56a addresses comments from the review of #1333:

Thanks for the feedback! This is ready for further review :)

phyy-nx commented 2 days ago

@paulmillar @PeterC-DLS I've come back to this after a while and responded to your comments. Can you review and resolve the comments that are ok now?

Also, I'm not seeing why the checks are failing. Any help on this @PeterC-DLS?

Thanks!!

phyy-nx commented 17 hours ago

Feedback from Telco: need to deprecate NXdata's scaling_factor and offset instead of replacing them with FIELDNAME_scaling_factor and FIELDNAME_offset

phyy-nx commented 9 hours ago

Woops I actually had deprecated the original fields. So @paulmillar and @PeterC-DLS this is ready to review. Thanks!