-
Notifications
You must be signed in to change notification settings - Fork 24
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
Trace fix improvements #2386
Merged
Merged
Trace fix improvements #2386
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
31710ad
move reference spectra transforms into dedicated function.
segasai b35478e
additional updates
segasai 61c241d
move code into separate function to be reused
segasai 5a1b754
log the internal offsets
segasai 7f500c5
subtract continuum when doing internal calirbation
segasai d5c29cf
make the continuum subtraction in self-calibration optional
segasai 389f1e1
use actual variance not variance times flux
segasai 9587395
update window of medianing
segasai 764d413
deal with the fact that different functions oversample differently
segasai ee20370
make sure arcs are still processed with continuum as before
segasai be4d316
fix variable name
segasai a4050eb
switch to f-formatting in a couple of instances
segasai 2f6e80a
use correct weights for central wavelength
segasai 0f03f5c
update variable names
segasai aa1cf83
add functions docstrings
segasai b3c5ba3
get rid of comment on oversampling
segasai b08cb4e
few more typos
segasai ece6b59
make the selection more readable
segasai 083ca2b
Merge branch 'trace_fix_improvements' of github.com:desihub/desispec …
segasai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Minor style comment, but for the record so that it doesn't propagate to more code:
When formatting strings for logging, it is better to use the structure
so that the string formatting is only evaluated by the logger if the log level would actually print it. In practice we almost always have INFO-level on so this particular case doesn't make a performance difference, but the readability is nearly the same as old-syle %-formatting and we have had cases in the past of string evaluation of unprinted debug-level logging taking a significant amount of time, so this style is something to keep in mind when adding new log messages.
Personal opinion: I'm also fine with pre-evaluated new-style format strings for INFO-level and above if the author feels it helps with readability, e.g.
My basic motivation is that readability trumps performance given that we use INFO-level for production running anyway so there isn't a performance impact. This should not be used for DEBUG-level logging though, due to performance issues especially if it is deep in loops.
[actual review of algorithmic changes takes more thought/time...]