-
Notifications
You must be signed in to change notification settings - Fork 65
NXxas refactoring #1352
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
base: main
Are you sure you want to change the base?
NXxas refactoring #1352
Conversation
|
Hi @woutdenolf, I came across this PR by chance and noticed that you are working on a base class for describing an electron level. In the context of photoemission spectroscopy, we in FAIRmat have also been working on something very similar: https://github.com/FAIRmat-NFDI/nexus_definitions/blob/fairmat/contributed_definitions/NXelectron_level.nxdl.xml. In fact, some of the base class we developed was originally adapated from another XAS-related PR: #1293. Would you be open to harmonizing the concept that we were developing with your approach here? I think the two approaches are already very similar right now. |
|
@lukaspie Yes since we are doing the same thing we should try to converge. We are currently discussing this very topic: XraySpectroscopy#2. Feel free to get involved. The XAS working group will work in https://github.com/XraySpectroscopy/nexus_definitions. It would be helpful to add comments in that repo. This PR will be a draft and is subject to lots of changes until we are finished. |
|
@woutdenolf great, thanks for the pointers. I will add some comments there. |
This was the first attempt before we created the XAS working group. It will most likely be closed. |
|
@woutdenolf after asking a question to the nexus mailing list and reading: I arrived here :) I have had a look at the proposal you made to the NXxas_new I am particularly interested in the topic raised in #1011 of adding the ability to work with multiple detectors. I see that you've added the entry Do you plan to include the suggestions from @padraic-shafer in https://github.com/padraic-shafer/definitions/blob/1011-multixas/contributed_definitions/NXmultixas.nxdl.xml When is the next planned meeting of the working group? Can I come along? |
|
Currently we only support a single XAS spectrum. I'm very much open to support multi-detector and/or multi-scan. You are very welcome to join the XAS working group. I'll contact you directly. |
| <field name="name"/> | ||
| <field name="probe"> | ||
| <enumeration> | ||
| <item value="x-ray"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to allow the "electron energy loss" mode, then you should also allow an "electron" probe type.
| </enumeration> | ||
| </field> | ||
| <group type="NXelement" name="element"> | ||
| <doc>Excited element</doc> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if I want to do a scan that includes multiple absorption edges (e.g. Carbon K-edge and K L-edge)? Can I specify multiple elements?
applications/NXxas_new.nxdl.xml
Outdated
| </item> | ||
| <item value="electron yield"> | ||
| <doc> | ||
| TODO total or partial electron yield |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this include Auger electron yield? Can we include a way to specify the observed electron energy range? Or should that be a detail for NXdetector?
| </dimensions> | ||
| </field> | ||
| </group> | ||
| <group type="NXdetector" name="i0" optional="true"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The i0 should have a corresponding NXmonitor group. There are also many ways of measuring an i0 that is useful to document in the file. For example, is the i0 measured in parallel with the sample absorption (or its proxy), or is it measured in sequence (e.g. before or after the sample), or is it sequential, but interleaved?
There is also question of how "clean" the i0 data is, as in how directly/accurately does the i0 measurement follow the ideal incident flux signal? This issue is particularly significant for C K-edge measurements - one can read my article on the topic to further understand this issue.
|
#1352 (comment) |
Co-authored-by: Wout De Nolf <wout.de_nolf@esrf.eu>
Use enumerations for the absorption edge and emission lines
Add documentation and extend the XAS modes
PeterC-DLS
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With NXedge and NXemission_lines, is it better to have an atomic orbital (in X-ray notation rather than spectroscopic notation) and transition with the latter comprising an initial and final orbital?
|
Hi all, I was asked by @PeterC-DLS to have a look at this as a few beamlines I'm working with at Diamond are using sub-entries with the old NXxas specification. I have a couple of comments:
As @PeterC-DLS mentioned, this could also be expanded to allow different notations and the specification of specific orbital transitions.
|
|
@DanPorter I would not be in favor of an "element_edge" like "Co L3". We will want to be able to search on Element and also on Edge, and should not expect all downstream software to parse such strings. Point 2: Yes, the intention is that the Point 3: "Calculated" could be the sum or mean of multiple other spectra, or the result of a fit or some other analysis. But, if the ratio of different signals in the "raw data" within a single measurement, then every spectrum would be a calculation - no one measures one "signal" that is "normalized mu(E)" or even "unnormalized mu(E)". But also, yes, including the details of the calculation or analysis done in the process section would be helpful and/or expected. |
|
Thanks for your responses @newville. I certainly don't want to re-open old arguments! I just thought of another comment whilst whilst working on some XMCD spectra:
|
|
|
||
| 6. Total electron yield (TEY) | ||
|
|
||
| 7. Partial electron yield (PEY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should Auger electron yield mode supposed to be recorded as PEY, or can it be added as a new category? In my experience, AEY restricts the energy of the detected electrons to a much smaller window (a single Auger peak) than PEY, which typically operates on a single cut-off energy to reject most of the secondary electrons.
| <link name="energy" target="/NXentry/energy"/> | ||
| <link name="intensity" target="/NXentry/intensity"/> | ||
| </group> | ||
| <group type="NXCollection" optional="true"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <group type="NXCollection" optional="true"> | |
| <group type="NXcollection" optional="true"> |
| <symbol name="nEnergy"> | ||
| <doc>Number of energy data points</doc> | ||
| </symbol> | ||
| <symbol name="nTransitions"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This symbol is not used
|
@woutdenolf Thanks for updating this. Any guidance on the delay on merging this? I'm sort of at a loss here. |
|
We need to finish the modes, add it to NXxas and then I can schedule the contribution for the NIAC meeting. |
|
Hi all, at a previous meeting I promised some example data and I'd forgotten to share it with you! Here is a repo with some example scans doing XAS and XMCD, where I've tried to implement the new format: https://github.com/DanPorter/xmcd_analysis_example You can click on the links in the readme to view the files in myHDF5. The files also contain processed components described with NXprocess. I found that there are lots of different ways of interpreting how this should be implemented, but the way I've done it provides useful default plotting and what I felt is a full description of the steps taken, with different steps stored as different NXdata groups and different elements in the NXprocess group. |
|
Hi all, @DanPorter thanks a lot for providing the formatted files. I don't think we discussed using this definition to describe XMCD, or any other type of dichroic measurements for that matter. I would be more in favor of not adding too much initially so that we have something finished for XAS; this has already taken more time than expected. This week I can update the definition with the information from the modes Regarding the “calculated” field, it is meant to indicate whether the data is from a theoretical calculation, so its description could be improved. |
|
@phyy-nx @sanbrock Question for the NIAC: XAS has several variations. The new XAS definition will only cover the variations that can be expressed as "mu-versus-energy" (transmission, total fluorescence, partial fluorescence, HERFD, etc.). The people who create the HDF5 file need to specify which mode was used so we know what mu represents. Some modes have required metadata fields which others do not have. How can we do this in NeXus? Some options that were suggested by the participants of the working group:
|
|
NeXus has a "choice" mechanism we could perhaps be used, assuming we enforce one single mode per XAS: definitions/base_classes/NXdetector.nxdl.xml Line 906 in 5a44a07
|
WIP: everything will be moved to contributed_definitions once this is up for review.
Contributing: PR to the main branch of https://github.com/XraySpectroscopy/nexus_definitions (merge commits will be removed regularly).
Rendering: https://hdf5.gitlab-pages.esrf.fr/nexus/nxxas/classes/applications/NXxas_new.html
Example files: https://pynxxas.readthedocs.io/
NXDL questions: