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

Energy calibration for flash #102

Closed
yacremann opened this issue Feb 7, 2023 · 14 comments
Closed

Energy calibration for flash #102

yacremann opened this issue Feb 7, 2023 · 14 comments
Assignees

Comments

@yacremann
Copy link

For operation at FLASH we developed a calibration method of the energy calibration (it is part of the hextof processor). It would be great to have the same functionality in SED.

@rettigl
Copy link
Member

rettigl commented Feb 8, 2023

The calibration fitting functions presently there should also work for FLASH bias series. You can also directly supply the calibration parameters to the append_energy_axis() function as keyword parameters

def append_energy_axis(
. How did you perform energy calibration at FLASH before? I would prefer if we find a common solution, so that we don't have multiple functions for doing similar things.

@steinnymir
Copy link
Member

We are currently working on implementing the corrections and calibrations from hextof-processor, but are currently still not available.

The principle behind the energy calibration there was to transform the time-of-flight to an energy scale, based on photon energy, sample bias and tof bias, all from measured quantities. Optionally these could be also fixed values.

This has the advantage of correcting for possible fluctuations in the photon energy, but also has some drawbacks. In particular, the electron path is assumed constant for all energies and detected angles, which is a rough approximation.

I believe we should implement at first all the hextof and all the MPES methods and make them easily callable. Then we can select which to prioritize or try to combine them when possible.

@rettigl
Copy link
Member

rettigl commented Feb 10, 2023

I think you should be able to get a similar result by adjusting the offset parameter accordingly. But off course you can add another method to the function as well. I would just like to avoid that we have multiple functions and/or modules that do more or less the same. This will confuse users.

@steinnymir
Copy link
Member

I agree that we should try avoid multiple functions doing the same thing, but also loosing functionality from other methods because one is already implemented is not ideal.

having two different approaches that to do similar things, does not make them interchangeable. There are some corrections necessary for FLASH data which do not fit in the workflow for MPES (sector correction for example).

I believe a good starting point is to provide different workflow methods which can be applied at will on a workflow manager. This can then be tuned to use the preferred methods for each experiment.
I will explain this in more detail in our meeting Tuesday.

@zain-sohail
Copy link
Member

Hi @steinnymir, any updates on the workflow feature? Dima was saying we need the calibration functions soon so I was wondering if we should try implementing them in the current state or with the workflow feature.

@steinnymir
Copy link
Member

hi @zainsohail04, I am still at an early stage of the infrastructure, but I think I could make the pull request soon. There will still be many things to implement to get a full, flexible workflow though.

When is the beamtime starting?

@steinnymir
Copy link
Member

a first basic version is in the pull request #104

@kutnyakhov
Copy link
Collaborator

Beamtime is already running until Tuesday morning and @zainsohail04 and @steinnymir you should have access to the data (/asap3/flash/gpfs/pg2/2023/data/11013426) in case something has to be tested.

@kutnyakhov
Copy link
Collaborator

I've prepared a notebook with an example of how we did energy calibration at FLASH, but somehow I could not find a proper way to add to this discussion :)

@rettigl
Copy link
Member

rettigl commented Sep 12, 2023

Can you provide this, together with some accessible test data somewhere? Then I could have a look at it eventually.

@kutnyakhov
Copy link
Collaborator

I've added all to DESY cloud
https://syncandshare.desy.de/index.php/s/Fn9GWHF3yoyAyyN

@rettigl
Copy link
Member

rettigl commented Sep 13, 2023

It appears this was done with quite some outdated version of sed, no? I could get it to run now with updating at some places, and it seems more or less straight forward to include, but there are a few things to consider.

  1. How do we want to take the photon energy into account? So far, this is included into the calibration parameters by defining the energy of the calibration feature (the energy offset). This is fine as long as the photon energy is constant, but at FLASH it is not.
  2. Where do we make the decision about the energy scale direction (i.e. binding/kinetic)? Right now, I flip the sign of the calibration function, but you rather flip the sign of the applied energy axis later. We could consider opting for one way to define the calibration, and move the switch on energy scale into the actual calibration function, thus having the flexibility at application time. I kind of like this idea.
  3. Automatically including the bias offset into the calibration should be straight forward, I will also add another offset parameter there, that allows to easily adjust the (stored) calibration at application time.

@rettigl
Copy link
Member

rettigl commented Sep 14, 2023

Being developed in PR #152

@steinnymir
Copy link
Member

solved in #169 and #152

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

5 participants