Skip to content

Addition of optional energy-dependent peak width model to XEDS pytorc… - #311

Open
nwvlahakis wants to merge 1 commit into
electronmicroscopy:devfrom
nwvlahakis:dev
Open

nwvlahakis wants to merge 1 commit into
electronmicroscopy:devfrom
nwvlahakis:dev

Conversation

@nwvlahakis

Copy link
Copy Markdown
Collaborator

…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:
image

Spectrum fitting output in revised code with arguments
peak_width=0.02,
peak_width_b=0.0425,
width_model='energy_dependent':
image

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:

image

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!

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

Successfully merging this pull request may close these issues.

1 participant