Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nexus.py uses incident_wavelength incorrectly #31

Closed
phyy-nx opened this issue May 24, 2019 · 5 comments
Closed

nexus.py uses incident_wavelength incorrectly #31

phyy-nx opened this issue May 24, 2019 · 5 comments

Comments

@phyy-nx
Copy link
Contributor

phyy-nx commented May 24, 2019

Our code for reading NeXus files looks at incident_wavelength and if it's array, assumes that each value corresponds to a different image:
https://github.com/dials/dxtbx/blob/master/format/nexus.py#L933-L938

However, I think we are mis-interpreting incident_wavelength:
http://download.nexusformat.org/doc/html/classes/applications/NXmx.html
"In the case of a polychromatic beam this is an array of the wavelengths with the relative weights in incident_wavelength_weight."

I have an opened an issue in NeXus about how to specify a per-shot wavelength (nexusformat/definitions#667). In the meantime, do we have NeXus file created either for XFELs or for Eiger that use incident_wavelength as an array?

For XFELs the answer is no. We are using mean energies and specifying only one:
https://github.com/cctbx/cctbx_project/blob/master/xfel/euxfel/agipd_cxigeom2nexus.py#L101
https://github.com/cctbx/cctbx_project/blob/master/xfel/swissfel/jf16m_cxigeom2nexus.py#L104
So for XFELs, however nexusformat/definitions#667 gets resolved, it won't affect existing files.

@graeme-winter
Copy link
Collaborator

In principle, data from VMXi[1] is polychromatic (i.e. pink beam from DMM) so we could in principle mock an example data set from there with some knowledge of the beam properties - I will give this a go and let you know.

[1] https://www.diamond.ac.uk/Instruments/Mx/VMXi.html

@phyy-nx
Copy link
Contributor Author

phyy-nx commented Jan 22, 2020

Pull request to update NeXus to support spectra over time is in review now: nexusformat/definitions#706

@phyy-nx
Copy link
Contributor Author

phyy-nx commented Jan 23, 2020

Update, the above pull request was redone as nexusformat/definitions#717 and is now merged. Ready to implement nexus.py to the new spec.

@dagewa
Copy link
Member

dagewa commented Jul 5, 2023

@phyy-nx Is this still an issue, or can it be closed?

@dagewa
Copy link
Member

dagewa commented Oct 4, 2024

I'm going to assume it can be closed (please re-open if relevant)

@dagewa dagewa closed this as completed Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants