Repository navigation
Addition of optional energy-dependent peak width model to XEDS pytorc… - #311
Open
nwvlahakis wants to merge 1 commit into
Open
nwvlahakis wants to merge 1 commit into
nwvlahakis wants to merge 1 commit into
Conversation
…h spectrum fitting code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…h spectrum fitting code
What problem this PR addresses
Adds an energy-dependent width model option for peaks in an XEDS spectrum for spectrum fitting by fit_spectrum_pytorch. This was found to be useful for a number of low-SNR, low-dose datasets, such as
those from soft materials or bio samples.
Spectrum fitting output using current function in dev:

Spectrum fitting output in revised code with arguments

peak_width=0.02,
peak_width_b=0.0425,
width_model='energy_dependent':
The original behavior of the function can still be achieved for datasets that do not benefit from it.
For this example dataset with high-SNR XEDS signals, using the arguments
width_model='constant',
freeze_peak_width_global=False:
The behavior matches how the routine worked previously
What should the reviewer(s) do
Test fit_spectrum_pytorch with width_model='constant', freeze_peak_width_global=False, confirming original functionality still works if desired, on data that were fit by this function previously.
Test fit_spectrum_pytorch with width_model='energy_dependent' (freeze_peak_width_global=False, and adjustments to peak_width and peak_width_b inputs, may also be needed depending on the data) on XEDS datasets where broadening of peaks as a function of energy is apparent. Please provide any feedback or suggested edits you think are needed!