Partition a light curve with the Bayesian Block algorithm

The functions implemented here are:

class CountFitness[source]

CountFitness(lc, p0=0.05) :: FitnessFunc

Adapted version of a astropy.stats.bayesian_blocks.FitnessFunc Considerably modified to give the fitness function access to the cell data.

Implements the Event model using exposure instead of time.

class LikelihoodFitness[source]

LikelihoodFitness(lc, p0=0.05, npt=50) :: CountFitness

Fitness function that uses the full likelihood

doc_countfitness[source]

doc_countfitness(fitness, light_curve_dict, source_name)

{class_name} test with source {source_name}

Create object: bbfitter = {class_name}(lc)

Object description: {bbfitter}

Then bbfitter({n}) returns the values {values}

Finally, the partition algorithm, 'bbfitter.fit()' returns {cffit}

get_bb_partition[source]

get_bb_partition(config, lc, fitness_class=LikelihoodFitness, p0=0.05, key=None, clear=False)

Perform Bayesian Block partition of the cells found in a light curve

  • lc : input LightCurve object or DataFrame with fit cells
  • fitness_class

return edges for partition