Add --smear-function option and Lorentzian smearing#309
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #309 +/- ##
=======================================
Coverage 99.93% 99.93%
=======================================
Files 24 24
Lines 1570 1624 +54
=======================================
+ Hits 1569 1623 +54
Misses 1 1
🚀 New features to boost your workflow:
|
sbillinge
left a comment
There was a problem hiding this comment.
one small gripe, but a great PR, thanks!
| sfn = "smear_morph_result.cgr" | ||
| save_file = (tmp_path / sfn).resolve().as_posix() | ||
|
|
||
| # Test Gaussian default |
There was a problem hiding this comment.
per group standard, please specify what the expected behavior is for each case, something like
# Test Gaussian default. Expect Gaussian convolution is correctly applied
| expected = filter(ignore_path, tf) | ||
| are_files_same(actual, expected) | ||
|
|
||
| # Test explicit Gaussian specification with capitalization |
There was a problem hiding this comment.
see above and for all the cases
|
@sbillinge Updated headers. Tests for the i/o are in |
Addresses part of #211. This adds a Lorentzian smearing option.
We will need another PR that allows the user to pass a general smearing function, but the outline for how to do that is already done in this PR and should be relatively straightforward to implement from here.
The default if
--smear-functionis not enabled is still Gaussian, no no workflow changes will have to be made for those using the Gaussian smearing.Below are two morphs. The morphed function is a Lorentzian with HWHM
0.1. The target is a Lorentzian with HWHM0.25. The first image is when Gaussian smearing (and scaling) is applied. The second is when Lorentzian smearing (and scaling) is applied.Gaussian smearing:

Lorentzian smearing:
