[Nexus] beam spectrum in NeXus
Aaron Brewster
asbrewster at lbl.gov
Wed Apr 1 22:13:35 BST 2020
Hi all, as part of the Jan 2020 codecamp, we put in some changes to NXmx to
support beam spectra. The relevant text is here:
https://github.com/nexusformat/definitions/blob/master/applications/NXmx.nxdl.xml#L583-L607,
but here's a quick summary
The use cases are
1. 1 wavelength
2. 1 spectrum (weights in incident_wavelength_weight)
3. 1 wavelength per image (incident_wavelength_weight is not set)
4. 1 spectrum per image (incident_wavelength and
incident_wavelength_weight are 2D arrays)
There is however a use case we didn't cover. SwissFEL currently provides a
spectrum per image (use case 4) AND a per-shot 'calibrated' wavelength. I
had assumed this wavelength was a simple weighted average, but it actually
is complicated smoothing and fitting procedure. So, how to represent both
1 spectra per image and a calculated wavelength in NeXus?
I have 3 ideas right now:
1. Add a new optional field to NXmx: incident_wavelength_calculated.
2. Add an entirely separate beam group to the NeXus file for the
spectra. So under entry/sample, there would be beam and beam_spectra.
The first would be use case 3 using the calculated wavelengths and the
second would be use case 4.
3. Use incident_wavelength as use case 3 with the calculated
wavelengths, and add incident_wavelength_spectra as a variant of
incident_wavelength. This wouldn't modify NXmx, but I could modify our
software to look for this variant. This seems like it defeats 'standards'
though.
In idea 2, how would downstream processing software know which to use if
both are marked with NX_class = NXBeam? Also, could I specify this in NXmx
somehow that won't confuse the validator?
Thoughts?
Thanks!
-Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nexusformat.org/pipermail/nexus/attachments/20200401/7af4d2b0/attachment.htm>
More information about the NeXus
mailing list