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

Plotting suggestions #17

Open
jlillo opened this issue Jun 15, 2024 · 1 comment
Open

Plotting suggestions #17

jlillo opened this issue Jun 15, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@jlillo
Copy link

jlillo commented Jun 15, 2024

Great tool! A couple of suggestions for the plotting tools:

  • It would be awesome if the phase_plot could plot the phase-folded RV curves for signals sorted by the number of samples of the corresponding periodicity instead of being sorted by RV semi-amplitude as it is now.
  • It would be great to add an option for the plot_posterior_period function to include the periods of the most prominent peaks. Currently, the option show_peaks is only available if kde=True. It is quite simple to implement it for the other case. simply adding this:
        if show_peaks and find_peaks:
            peaks, _ = find_peaks(y, prominence=5*np.nanmedian(y))
            for peak in peaks:
                s = r'P$\simeq$%.2f' % xx[peak]
                ax.text(xx[peak], y[peak], s, ha='left')

Note that here I changed to the default prominence=0.1 to a value dependent on the "noise floor" of the samples. But of course feel free to modify this if you are interested in adding this to the code.

@j-faria j-faria added the enhancement New feature or request label Jun 19, 2024
@j-faria
Copy link
Contributor

j-faria commented Jul 10, 2024

Hi Jorge, thanks for the suggestions!

It would be awesome if the phase_plot could plot the phase-folded RV curves for signals sorted by the number of samples of the corresponding periodicity instead of being sorted by RV semi-amplitude as it is now.

This would be possible, but I think it would require binning the period posterior and/or deciding what samples are "close enough" to a particular period so they would be counted. I'm guessing you are searching for a way to sort the signals based on significance?

It would be great to add an option for the plot_posterior_period function to include the periods of the most prominent peaks.

Indeed, this would be helpful. I will try to add something like this to the plot.

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

No branches or pull requests

2 participants