Hi Matt,
The backstory is that I'm trying to find which standards will define my samples, so I am pulling standards from different beamlines and years to get a basic linear combination fit, to run new standards myself when I have more beamtime.
I'm able to do it in Athena- where you more or less:
1. Assign E0 to the first peak in the first derivative of your standard reference foil.
2. Calibrate one standard reference foil to the theoretical edge energy.
3. Ensure E0 is right/adjust E0 for all samples and sample foils.
4. Align reference foils to the standard reference foil, because the foil will pull the sample with it.
But in Larch, maybe I'm unsure about the groups function? I'm not convinced the reference foils 'follow' the sample spectra.
If the reference and samples aren't tied together, how do you align samples when your energies are off because of different beamlines or years or people not as careful to calibrate the beamline energy?
My first thought was using the first derivative peak of your sample, but if your edge energy shifts because of oxidation state changes, what do you use then?
It is true that Larch's XAS Viewer does not really expose the concept of each spectrum having its own reference channel. I guess that reflects my own bias that if each spectrum in a set of measurements really needs its own reference, there is a serious problem with the measurements - like, the monochromator needs fixing. (Aside: if the energy drifts significantly from scan to scan, how do we know how to align the energies?). It probably also reflects my reality that most of the work I do is in fluorescence and on samples that will have no transmission, and are done on a beamline where an "elf-like" scatter measurement is not practical.
But, for sure, if you measure sets of data at different beamlines or even at the same beamline but weeks apart, you may need to apply energy shifts to get those *sets* of data to be aligned. Admittedly, if you're pulling in standard spectra from many sources, this can be a little tedious but (in principle) only needs to be done once.
In Larch's XAS Viewer, you can go to the Data->Recalibrate Energy menu to bring up a window for aligning one spectrum to another. So, if you have two sets of data and have measured the same calibrant (say, Mo foil) at both, you can read in the foil spectra and align them: Select the data group for the spectrum from "new foil" and auto-align that to the spectrum of the "good foil". With that energy shift (this dialog only does a constant energy shift, not an angular offset or lattice-spacing offset) determined, you can apply that shift to any number of Selected Groups, say all the spectrum measured along with "new foil" spectrum.
Does that seem workable for what you're trying to do?
I guess that if you have a reference channel measured for each spectrum, you could also read those reference spectra in and see how much their edge positions vary, assess the variation in those positions, identify outliers, and so forth.