Skip to content

Binning Folded Light curves #1431

Answered by orionlee
Paco-2000 asked this question in Q&A
Discussion options

You must be logged in to vote

binning folded lightcurve does make sense.

Unfortunately, there is an existing bug on binning folded lightcurve using bins parameter. See issue #1271 .

Alternatives:

  1. parameter n_bins should work. See the bin() documentation for the diffeerence.

  2. One can also bin using time_bin_size parameter. E.g., the following will bin the folded lightcurve, with each bin has the duration of 10 minutes in the folded time.

from astropy import units as u

lc_b = lc.fold(period=pg.period_at_max_power).bin(time_bin_size=10*u.miin)
  1. If it's important to you to have a fixed number of bins, the following is anotherway to approximate it for 500 bins.
lc_f = lc.fold(period=pg.period_at_max_power)
lc_binsize =

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Paco-2000
Comment options

Answer selected by Paco-2000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants