-
Notifications
You must be signed in to change notification settings - Fork 8
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
Spectral averaging with outlier rejection #28
base: main
Are you sure you want to change the base?
Conversation
@Janne98 Can you first make sure that merge conflicts are resolved? |
Done |
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.
Some comments.
In addition, the averaging implementation seems a bit complex at certain points, with creating empty lists of NumPy arrays that are grown iteratively. This is not really optimal; maybe there are some possibilities to still simplify that a bit.
np.ndarray | ||
The array of intensities with outliers removed. | ||
""" | ||
while len(intensities) > 2: |
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.
thought: Interesting, I didn't know this was performed iteratively. Don't you progressively remove a bunch of peaks that way?
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.
Yes, this is how they describe it in the paper
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 looked into it a bit further and sigma clipping is an iterative procedure by default, but typically removes only 1 outlier per iteration. However, the paper uses a "bulk rejection" version of sigma clipping to limit the number of calculations (median and std).
Add option to choose consensus spectrum method by setting
--consensus_method
tomedoid
oraverage
. Ifaverage
, spectral averaging with outlier rejection will be performed.