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

Add new postprocessing grid alignment schema #53

Open
CharlesC30 opened this issue Nov 23, 2022 · 2 comments
Open

Add new postprocessing grid alignment schema #53

CharlesC30 opened this issue Nov 23, 2022 · 2 comments

Comments

@CharlesC30
Copy link
Contributor

Denis (from ISS beamline) requested a new schema be added to the postprocessing operations for aligning energy grids from multiple spectra. Currently there is a StandardizeGrid UnaryOperator, which operates on single spectrum and standardizes the energy grid to a uniformly spaced values (i.e., new_grid = np.linspace(self.x0, self.xf, self.nx)).

However XAS spectra are often not sampled on uniformly spaced grids because there is more information at different regions of the spectrum.

This new schema will work in the following way:

  • operates on a group of spectra (MimoOperator)
  • select one "master energy grid" from the group (this could be the first spectrum passed by default)
  • align all spectra in group to "master grid" via InterpolatedUnivariateSpline
@matthewcarbone
Copy link
Contributor

@CharlesC30 this is an interesting take but it makes sense. As long as the user is confident that the first (or at least some specified) spectrum contains the "master energy grid" this is a really good idea!

@CharlesC30
Copy link
Contributor Author

@x94carbone thanks! You are right the user would have to have some confidence about the "master grid", but Denis expressed a strong preference for this method over the current scheme. I already have some code written for this. Would it be okay to commit now or should we wait until #50 is closed?

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

2 participants