-
Notifications
You must be signed in to change notification settings - Fork 19
Add option to save difference curve #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #237 +/- ##
==========================================
+ Coverage 99.09% 99.12% +0.03%
==========================================
Files 21 21
Lines 1104 1142 +38
==========================================
+ Hits 1094 1132 +38
Misses 10 10
🚀 New features to boost your workflow:
|
sbillinge
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Please see comments. I can merge this if it helps you and we can return to the tweaks later too, just make issues in that case so I can close confident we won't forget
|
|
||
| save: str or path | ||
| Save the morphed function to a the file passed to save. Use '-' for stdout. | ||
| get_diff: bool |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we want to do either/or here. A clearer logic would be that diff is saved if this is true, not saved if it is false, and also the case for the morph function. So TT would save both. To keep the API cleaner, we could have defaults of TF for morph and diff (the current behavior).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, created #238 since I think we should have a discussion on this.
| dest="get_diff", | ||
| action="store_true", | ||
| help=( | ||
| "Save the difference curve rather than the manipulated function.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if we do update the logic, update this help here too.
| "--rmin", | ||
| type="float", | ||
| help="Minimum r-value to use for PDF comparisons.", | ||
| help="Minimum r-value (abscissa) to use for function comparisons.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"r" might be a bit confusing in our more general world of functions. Not sure what to change it to (and let's just make an issue, not do it on this PR0. "x" is widely used by scientists. "minimum value on the absisca" might be mathematically more correct? Anyway, just a note to make an issue.....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I noted this in #236
| "using a serial file NAMESFILE. The format of NAMESFILE should be " | ||
| "as follows: each target PDF is an entry in NAMESFILE. For each " | ||
| "entry, there should be a key {__save_morph_as__} whose value " | ||
| "specifies the name to save the manipulated PDF as. An example " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another issue to make as claning before release (not now) would be to do a global search for PDF and root it out wherever it survives. Like a weed......
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, noted in #236, didn't want to do that now
|
I created issues addressing these comments (yea, noticed there were a lot of PDF references still dangling, but didn't want to refactor all). I also put some more detailed notes on #238 about the either or approach. |
* Add save diff * Add documentation * Name change diff->get-diff
Very useful for experiments when you are interested in the difference signal.
diffpy.morphhas a very robust way of taking the difference on an intersecting grid as well