AI-multimodal / aimmdb

BSD 3-Clause "New" or "Revised" License
0 stars 10 forks source link

Add new postprocessing grid alignment schema #53

Open CharlesC30 opened 1 year ago

CharlesC30 commented 1 year ago

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:

matthewcarbone commented 1 year ago

@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 commented 1 year ago

@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?