-
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
Patch/spectrum bin peaks #19
Conversation
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨
|
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 addition, would be nice if the user could choose the binning method.
@@ -558,6 +558,8 @@ def __init__( | |||
reference_spectrum: DataFrame | None = None, | |||
mirror_spectrum: bool = False, | |||
relative_intensity: bool = False, | |||
bin_peaks: Union[Literal["auto"], bool] = "auto", |
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.
Perhaps the user could choose the method to calculate number of bins.
Adding a bin_method
parameter such as Literal["none", "sturges", "freedman diaconis"]
?
"auto" was useful in the peak map binning, where the y dimension was considered as well.
PR Type
enhancement
Description
bin_peaks
andnum_x_bins
to control the binning process._bin_peaks
to perform binning based on x-axis values and calculate mean intensity within each bin._prepare_data
method to integrate the binning process when required.Changes walkthrough 📝
_core.py
Implement peak binning for spectrum plots
pyopenms_viz/_core.py
bin_peaks
andnum_x_bins
._bin_peaks
method to handle peak binning._prepare_data
method to incorporate peak binning.