Skip to content

Conversation

@woutdenolf
Copy link
Member

@woutdenolf woutdenolf commented Feb 11, 2024

Still not really sure what to call these levels. Perhaps "electroionization subshell"? But it is used in denoting transitions as well so probably not. Also I'm not sure how far I need to go in the list.

@woutdenolf
Copy link
Member Author

woutdenolf commented Feb 11, 2024

For reference a script that generates the table

from fractions import Fraction


def shell_name(n):
    # K, L, M, ...
    return chr(ord("K") - 1 + n)


def subshell_name(l):
    # s, p, d, ...
    if l == 0:
        return "s"
    if l == 1:
        return "p"
    if l == 2:
        return "d"
    if l == 3:
        return "f"
    l -= 4
    name = ord("g")
    skip = ("s", "p", "d", "f", "j")
    for _ in range(l):
        name += 1
        while chr(name) in skip:
            name += 1
    return chr(name)


for n in range(1, 7):  # principal quantum number (shell)
    shell = shell_name(n)
    i = 1
    for l in range(n):  # azimuthal quantum number (subshell)
        subshell = subshell_name(l)
        # for m in range(-l, l+1)  # magnetic quantum number
        for s in [Fraction(-1, 2), Fraction(1, 2)]:  # spin quantum number
            j = l + s  # total angular momentum (spin-orbit splitting)
            if j < 0:
                continue
            if shell == "K":
                xname = shell
            else:
                xname = f"{shell}{i}"
            if subshell == "s":
                aname = f"{n}{subshell}^{{-1}}"
            else:
                aname = f"{n}{subshell}_{{{j}}}^{{-1}}"
            # 2*j+1 possible energetically equivalent states?
            print(f'<item value="{xname}"> <doc>:math:`{aname}`</doc> </item>')
            i += 1

@woutdenolf woutdenolf requested a review from mretegan February 12, 2024 13:56
@woutdenolf woutdenolf self-assigned this Feb 12, 2024
@woutdenolf woutdenolf requested review from a team and removed request for mretegan February 12, 2024 15:19
@mretegan
Copy link

First, the easy part regarding how long you should make that list, I would complete the entire P group to include P7.

Regarding the labeling, the name "electron level" is not meaningful. A better labeling would be "electron energy level," but this is too general for what K, L1, L2, etc. represent. They are multielectronic states with one missing electron in a given orbital. In fact, on Wikipedia, they are designed as the "X-ray notation" for atomic orbitals: https://en.wikipedia.org/wiki/X-ray_notation.

What we are labeling here is defined only in the context of X-ray sciences. Therefore, we should only try to make this as general as it should be. Now that the name of the attribute in the NXxas class is "absorption_edge," and thus the possibility of confusing the user is minimal, we should use the IUPAC definition for the base class, which clearly defines K, L1, L2, etc as "x-ray levels":

"The electronic states occurring as initial and final states of a process involving the absorption or emission of x-ray radiation are called x-ray levels."

(see sections 2 and 3 of the IUPAC document https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/abs/10.1002/xrs.1300200308).

So, my vote is for having this NXxray_level.

@newville
Copy link
Member

I prefer "electron level". X-rays do not have levels.

We called them

nxElectronLevel:  
    name: (required) NX_CHAR/ENUM minOccurs=1 maxOccurs=1 (eg  “K”, “L1”, “L2”, “L3”, “M1”, “M2”, “M3”, “M4”, “M5”,  “continuum”)
    
nxElectronTransition:  
    initial_level: (required) NX_ELECTRON_LEVEL 
    final_level: (required) NX_ELECTRON_LEVEL
    
nxElectronTransitions:     
    TRANSITIONS: (required) NX_ELECTRON_TRANSITION minOccurs=1

"electron level" is not confusing and it is certainly meaningful. @mretegan are you honestly confused by this or is something else going on? I find this concerning.

This is just not that complicated. K = 1s, L1 = 2s, L2 = 2p1/2, L3 = 2p3/2. As the Wikipedia page says, these are equivalent ways of "labeling atomic orbitals", which is to say, the electron orbitals of the atoms. They are the labels for the levels.

@woutdenolf
Copy link
Member Author

woutdenolf commented Feb 13, 2024

are you honestly confused by this

Yes and I think I finally understand why. Thanks for being persistent @mretegan ! Please keep doing so.

I lack theoretical knowledge so bare with me and tell me where I'm wrong.

To me there seem to be two points of view here: we either describe an electron energy level in an atom or an electronic state of the atom with one hole. The latter is also as an energy level, but then an atom energy level as opposed to an electron energy level.

Is it correct to say that talking about electron energy levels in general is not useful because the energy level splitting we are talking about happens specifically for atoms with one missing electron? It is not like we are labeling electron energy levels in general, because there are different types of splitting (e.g. crystal field, spin-orbit).

That's why we should be strict and say that $K$ corresponds to $1s^{-1}$ (electronic state of the atom: one electron missing in $1s$, so atom energy level) and not $1s$ (could seem to refer to some electron energy level, which it does not). So like the IUPAC recommendation does. Wiki is causing problems once again.

The IUPAC recommendation for spectroscopy says: "The electronic states occurring as initial and final states of a process involving the absorption or emission of x-ray radiation are called x-ray levels."

So they define an electronic state as a level, presumably meaning the energy level of an atom. And the word x-ray refers to the fact that we consider atoms with one missing electron. I.e. consider spin-orbit splitting right? Can someone knowledgeable describe this is the shortest possible way?

It took me long enough to understand (provided I got it right this time). Thanks again @mretegan !

@woutdenolf
Copy link
Member Author

Can someone knowledgeable describe this is the shortest possible way?

I added more explanations to the best of my ability. Someone else can probably improve in another PR.

@woutdenolf woutdenolf force-pushed the improve_nxelectron_level branch from d56d0cf to 02e43f7 Compare February 13, 2024 23:43
@newville
Copy link
Member

@woutdenolf @mretegan

I would say that these levels are not really related to whether an electron has been removed from an atom by an X-ray or electron or any other particle. "K" is identical to "1s", which is the most tightly bound electron level of an atom. "M4" is identical to "3d3/2" That is all it is.

As the Wikipedia page https://en.wikipedia.org/wiki/X-ray_notation says
X-ray notation is a method of labeling atomic orbitals.

The link to atomic orbitals clarifies that these are electronic orbital levels (ie, nothing to do with the nucleus of the atom).
The words "orbital", "shell", and "level" are all used for these - more or less interchangeably (though sometimes grouped differently). "orbital" and "shell" imply a spatial character that is not highly accurate, but a useful guide. "Level" implies the discrete nature of the binding energies. The energy and the discreteness of the bound electrons are what we care about in X-ray or electron spectroscopies.

@lukaspie
Copy link

lukaspie commented Feb 28, 2024

Hi everybody, @woutdenolf pointed me to this PR through the main NIAC repo. 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 NXelectron_level base class we developed was originally adapated from another XAS-related PR: nexusformat#1293. My suggestion would be to harmonize the two approaches.

I am happy to see that you have also been thinking in a similar direction wrt naming what we often call electron level. I also fully support the statement I prefer "electron level". X-rays do not have levels." and it would therefore call it NXelectron_level.

I agree with your discussion above that "M4" is identical to "3d3/2". However, for the notation in a field like XPS, it would still be nice if I could actually write "3d3/2" because the different level are usually labeled with their electron configuration. For this reason, we had made a distinction for electron_config for the 1s, 2s, 2p, etc. naming and level_iupac for the K, L, M, etc. notation (X-ray notation). But, these names are either not really common and/or describe something slightly different (3d3/2is actually NOT the electronic orbital configuration as used in chemistry because you are missing the filled lower subshells).

I am curious what you think about our approach and how we can harmonize. Also tagging @domna from our team here. We are not using our NXelectron_level definition extensively so far, so we would be open to changes that makes the description cleaner.

@woutdenolf
Copy link
Member Author

woutdenolf commented Feb 28, 2024

Can anyone reference a publication, book or organization that uses and defines the term "electron level"? We have one for "x-ray level": https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/abs/10.1002/xrs.1300200308. They define "x-ray level", "diagram level" and "x-ray diagram level". We should be using the later I think but it is too long.

And if not, could someone please write down the definition of "electron level" as you understand it? I do not manage to do this, regardless of what we call it. When I say for example it is "a multi-electron configuration with a missing core-level electron" it must be wrong. For example L2 and L3 have the same electron configuration but they are obviously different in our context.

The electron configuration of $\text{Fe}^0$ is $1s^22s^22p^63s^23p^64s^23d^6$ (210 possible electronic states). The electron configuration $1s^22s^22p^53s^23p^64s^23d^6$ is iron with one missing $2p$ electron (6x210=1260 possible electronic states). Somehow these 1260 possible states are grouped in L2 and L3 (or perhaps they do not include all 1260?). What do you call L2 and L3 and what do these groups represent? These are not subshells and these are not electron configurations. How does the name "electron level" relate to all this? They are energy levels of some sort but not of single electrons, that is clear.

In the docs I'm talking about the unpaired electron left behind having a spin parallel or antiparallel alignment to the orbital momentum so the same electron configuration with one core hole is split in two degenerate groups of states like L2 and L3. But all this goes above my level of expertise. I'm doing this to get a real spectroscopist to provide a proper definition or a reference to one.

In conclusion, whatever name we choose we need to either refer to something that defines it or define the name ourselves.

@newville
Copy link
Member

For the immediate application of XAS here, I think it is OK to just list the electronic level that is expected to be empty in the X-ray excitation. But, I can see that some measurements like RIXS (and even XRF) needs to detail multiple levels.

For notations to use (or perhaps "allow") to identify a level, "M4" and "3d3/2" are equivalent. But there might be a few variations on how to spell or render "3d3/2", leading to questions of whether"$3d_{3/2}$" is allowed. I believe UTF-8 "U+00BD" would give "1/2", but I don't know if there is a "3/2", which might complicate what is permitted. I wonder if the NIAC has faced similar questions before for specifying which bytes are allowed for an enum string (perhaps with Angstrom symbol?).
Maybe that might be part of the reason that IUPAC prefers (I think?) "M4", and "K-M2" over "$K_{\beta3}$".

Anyway, I would not be opposed "3d3/2".

@maurov
Copy link

maurov commented Mar 5, 2024

@woutdenolf @mretegan

Sorry for my late reply, but I was fully busy on the beamline. I agree with @newville and @lukaspie for keeping NXelectron_level as initially agreed during our discussion at the Users Meeting. I have also asked around to colleagues who are experts in X-ray spectroscopy and all agree using "electron level". As Matt stated, the common argument is that X-rays do not have levels.

@mretegan
Copy link

mretegan commented Mar 6, 2024

As @woutdenolf said above, there is the IUPAC definition for precisely what we want to label. Here it is again, just in case you missed it:

"The electronic states occurring as initial and final states of a process involving the absorption or emission of x-ray radiation are called x-ray levels."

They use it to label specific multielectronic states that appear in X-ray spectroscopy. You can read more on this here: https://journals.aps.org/rmp/abstract/10.1103/RevModPhys.31.616.

I don't understand why we must dismiss all this using the argument, "X-rays don't have levels." Electrons don't have levels, either. I could not find anywhere a definition of the term "electron level".

I propose two solutions:

  1. We use something more general, like NXelectronic_state, NXenergy_level, NXelectronic_energy_level
  2. We don't create a specific class for edges, and we use instead an enumeration of strings that limits the possible values. See, for example, the type in the case of an NXsource: https://manual.nexusformat.org/classes/base_classes/NXsource.html

@mretegan
Copy link

mretegan commented Mar 13, 2024

@newville @maurov @woutdenolf

What do you think about having the edge as an enumeration (the second proposal)?

An advantage of doing it this way is that it can be validated if needed.

If we do the same for the emission lines, both edge and line will look similar in the NeXus viewer. We abandoned this option during the February meetings because we thought there would be too many options for lines. However, there are packages like fisx where all the radiative and non-radiative channels are explicitly listed (https://github.com/vasole/fisx/blob/master/fisx_data/EADL97_KShellRadiativeRates.dat). We could follow the same approach.

@maurov
Copy link

maurov commented Mar 13, 2024

@newville @maurov @woutdenolf

What do you think about having the edge as an enumeration (the second proposal)?

An advantage of doing it this way is that it can be validated if needed.

If we do the same for the emission lines, both edge and line will look similar in the NeXus viewer. We abandoned this option during the February meetings because we thought there would be too many options for lines. However, there are packages like fisx where all the radiative and non-radiative channels are explicitly listed (https://github.com/vasole/fisx/blob/master/fisx_data/EADL97_KShellRadiativeRates.dat). We could follow the same approach.

I agree with the enumeration proposal. It is the same approach in xraylib (X-ray fluorescence lines macros).

@newville
Copy link
Member

I agree with the enumeration proposal. It is the same approach in xraylib (X-ray fluorescence lines macros).

or even https://xraypy.github.io/XrayDB/overview.html#x-ray-edges ;)

I thought the idea was for "edge" to be an enumeration of electron levels. Sorry, what was the other alternative?

@mretegan
Copy link

mretegan commented Mar 22, 2024

@newville

If it is an enumeration, we don't need a specific class, NXelectron_level or NXxray_level. It can be NX_CHAR as I mentioned in this comment #2 (comment).

@newville
Copy link
Member

@mretegan A simple enumeration of values "K", "L1", "L2", ... would be fine with me.

I think the idea for a class is that you could give more information so that "K" and "1s" would be tied together. But that could also just be in the documentation or referenced away.

@lukaspie
Copy link

From a reusability perspective in NeXus I would prefer that this concept actually does become its own base class. Otherwise, for any technique that wants to use the same concept one would also have to write the long enumeration of "K", "L1", "L2", etc. into the application definition, which makes it hard to read and there would be many repititions in NeXus. I also would like to keep the information that "K" and "1s" are linked and would even advocate for a solution where writing any of the two would be possible (i.e., by extending the enumeration to include "1s", "2s", "2p", and so on) since other techniques traditionally use that notation.

Thus my vote would be to keep it as a base class. Regarding the naming, I think what we actually want to describe is an energy level. In order to make it clear that this class describe electronic levels (rather than energy levels of nuclei or vibrational/rotational energy levels in molecules), I would suggest to call the class NXelectronic_energy_level.

@newville
Copy link
Member

@lukaspie NXelectronic_energy_level is pretty long. Are there NeXuS classes for either nuclei levels or molecular vibrational levels?

I would not be opposed to having a base class, but there seem to be at least 3 opinions on naming things and little agreement. I think adding yet another suggestion the name of such a base class is probably the final nail in the coffin.

Progress on NXxas has pretty much stalled by this discussion. That is unfortunate because the existing NXxas definition is utter junk, written by people who have never done XAS and were too ignorant to ask anyone who did. Unfortunately, the NIAC failed to do its job in vetting that.

I think we should just use a field "edge" in the NXxas definition that is an enumeration of strings "K", L1", "L2", ... "P7".

I also think We should use a similar enumeration for "element" (the atomic symbol, "H" through "Og").

I propose we close and move on.

@woutdenolf
Copy link
Member Author

woutdenolf commented Mar 26, 2024

From a reusability perspective in NeXus I would prefer that this concept actually does become its own base class.

That was our first thought as well. But then think about how we would represent the K emission lines: K-L1, K-L2, K-L3, K-M2, K-M3, K-M4, K-M5, K-M2, K-M3, K-N2, K-N3. If you would use a class for the level we would need to create 22 HDF5 groups with one string dataset each. Or if we create a class for each emission line as well: 11 HDF5 groups with 2 subgroups each.

So I thought we need a re-usable enumeration. If NeXus does not have the concept we can ask the NIAC if this can be created.

@maurov
Copy link

maurov commented Mar 26, 2024

If it could help, for my own work, I use simple Python tuples and dictionaries to achieve what we are discussing. Please, have a look to lines 81-348 here:

https://github.com/maurov/xraysloth/blob/master/sloth/utils/xdata.py

I agree with @lukaspie that we should avoid re-inventing the wheel for each NeXus application definition that requires elements, edges, lines and transitions, thus I would go for the solution of a re-usable enumeration, as proposed by @woutdenolf.

Please, let's move on on this!

@mretegan mretegan closed this Nov 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

Successfully merging this pull request may close these issues.

6 participants