qzhu2017 / XRD

X-ray diffraction calculations
MIT License
7 stars 6 forks source link

Structure Factor + Additional Profiling #30

Open sayred1 opened 4 years ago

sayred1 commented 4 years ago

Deadline 2/19

Additional Profiling

Structure Factor

Notes

sayred1 commented 4 years ago

@qzhu2017 @sabaronett, I've just added another profiling function to profile.py, the original pseudo-voigt function. This required me to rename the previous pseudo-voigt function to "mod_pseudo-voigt", let me know if you think of a more compact name for this modified version.

I've also updated the profiling notebook. Since the pseudo voigt function is the combination of the gaussian and lorentzian profiles the user may specify either one or two FWHM, corresponding to each profile. By default, one FWHM is specified.

To differentiate the two options, here's an example: user_kwargs = {'FWHM-G': 0.02, 'FWHM-L': 0.03} or user_kwargs = {'FWHM':0.05}

@qzhu2017 I've added numbt.jit to both the gaussian and lorentzian functions, to speed up the original P-V function. Here are the effects: