-
Notifications
You must be signed in to change notification settings - Fork 34
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
[WIP] Split PrepPipeline into separate methods, make final interpolation optional #99
base: main
Are you sure you want to change the base?
Conversation
Whoops, looks like one of the examples relies on an undocumented attribute I removed for the sake of RAM ( |
Codecov Report
@@ Coverage Diff @@
## master #99 +/- ##
==========================================
- Coverage 99.04% 98.68% -0.36%
==========================================
Files 7 7
Lines 734 762 +28
==========================================
+ Hits 727 752 +25
- Misses 7 10 +3
Continue to review full report at Codecov.
|
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.
thanks, it's great that we don't need the matplotlib stuff in the tests anymore. Also reminds me of #15
It is possible that I introduced these conflicts 😖 it's because I worked on dbe2062 before pulling |
No worries, I'll rebase before I push any more work! I've set this aside for a few days while tackling some other projects, but I'll try and get this wrapped up within the next week or so :) |
3e67ad7
to
0688a5c
Compare
0688a5c
to
c4bb806
Compare
Okay @sappelhoff, I've gotten the My main changes here are:
Let me know what you think! |
I didn't take a look at the diff because I am not sure what diff will stay after #99 (comment) is resolved, but I still have concerns over these two points (I am commenting only based on your summary comment):
and
Could we not just return a dict in both cases, with the keys What do you think? |
That could work, though I still think it'd be useful to have an attribute like Instead of attributes, maybe methods in the style of the new Keep in mind that for the |
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.
Instead of attributes, maybe methods in the style of the new get_raw function would be clearer? For example, a get_noisy_info method that returns the most recent noisy info available by default (like current_noisy_info does now), but also has an argument that lets you specify explicitly whether you want the original, post-reference, or post-interpolation noisy info.
yes! That sounds good to me, I like the new get_raw
👍 But I think the default should be "current"
, not "None"
, to be more explicit.
I approve of the remaining changes, but I am slowly losing my grasp on the potential workflows we can have with our different classes and their methods 😇 it's been too long that I actually worked with this code, I think.
|
||
Parameters | ||
---------- | ||
stage : str, optional |
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 think I'd do something like this:
stage : str, optional | |
stage : {"unprocessed", "filtered", "post-reference", "post-interpolation"}, optional |
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.
That causes the line to go beyond 88 characters, is line wrap for argument types something that's supported by Numpy docstyle?
"Could not retrieve {stage} data, as that stage of the pipeline " | ||
"has not yet been performed." |
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.
"Could not retrieve {stage} data, as that stage of the pipeline " | |
"has not yet been performed." | |
f"Could not retrieve {stage} data, as that stage of the pipeline " | |
"has not yet been performed." |
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.
Whoops, nice catch!
Great! I'll get to work on this, as well as proper tests and docs for everything new. In that case, for the sake of simplicity I'm going to leave the internal noisy info and reference signal attributes undocumented so that the new
Hopefully cleaning up the example scripts for 0.4 will refresh us all on that front! |
PR Description
(Eventually) closes #73. Currently, this PR:
remove_line_noise
androbust_reference
methods toPrepPipeline
.PrepPipeline
unit tests.spectrum_fit
, since you can now just filter line noise however you want and then runPrepPipeline.robust_reference
if you want to use another kind. This vastly simplifies the demands on thefilter_kwargs
API and should make thePrepSettings
filtering options much easier to document.There's still definitely more cleanup to do, but I figured it'd be good to get the core of this up for review sooner than later!
Merge Checklist
closes #<issue-number>
to automatically close an issue