Skip to content
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

Getting cumulative sums and masks value out of select_ring_peaks_by_intensity #369

Open
loichuder opened this issue Jan 9, 2025 · 1 comment

Comments

@loichuder
Copy link

Again for #358

We would need to get additional data out of the select_ring_peaks_by_intensity function.

Namely, we would need the cumulative sums (defined here:

cums /= cums[-1]
) and the mask values (defined here:
cums /= cums[-1]
).

The easiest would be to add additional return values out of select_ring_peaks_by_intensity (and sorted_peak_intensity_mask for the cumsum) but this risks breaking other uses of select_ring_peaks_by_intensity. So we are not actually sure it would be the best solution, what do you think ? Another possibility is to extract common computation in other functions.

Related, we don't need to have plotting since we are only interested in the data. But that is only a minor annoyance since the plot can be disabled by setting doplot to None.

Again, happy to discuss this further with you

@jonwright
Copy link
Member

I agree - it is very annoying to recompute this all when changing the cutoff parameter. We also need to save cor_intensity (for example, into the colfile, this is needed for plotting and to check the "B" parameter).

Refactoring would be welcome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants