BayesicFitting

Model Fitting and Evidence Calculation

View project on GitHub



class PeriodicScout( object )[source]

Investigating scout for periodic models

PeriodicScout( ) [source]

findPeriod( days, flux, pmin=1, pmax=2, grid=1000, clip=2, verbose=0 ) [source]

Find period in eclipsing star data.

The search periods are defined as a geometric series, from pmin to pmax with NP points, where NP = int( grid * log10( pmax / pmin ) / math.log10( 2 ) ) That is grid points per octave from pmin to pmax.

Select eclipsing parts and find the minimum distance

Parameters

  • days : array
         Julian days of observation
  • flux : array
         measured flux
  • pmin : float (1)
         smallest period to be considered
  • pmax : float (2)
         largest period to be considered
  • grid : int (1000)
         number of points per octave in pmin to pmax
  • clip : float (2)
         select data below median flux minus clip * median abs deviants
  • verbose : int
         0 : silent
         1 : not

downhill( days, flux, prs, scl, nrknots=20, tol=0.01, verbose=0 ) [source]
Search minimum chisq in a range of periods

Parameters

  • days : array
         Julian days of observation
  • flux : array
         measured flux
  • prs : array
         list of periods
  • scl : array
         pertaining scale of fit
  • nrknots : int (20)
         number of knots in BasicSplinesModel
  • tol : float (0.001)
         tolerance, stop criterion

findParameters( days, flux, period, verbose=False, plot=0 ) [source]
Return a first guess for the parameters eccentricity, phase, longitude

Parameters

  • days : array
         time of observations
  • flux : array
         flux of observations
  • period : float
         the period (from findPeriod() )
  • verbose : bool
         print some things
  • plot : int
         0 dont plot
         1 plot and show the results
         2 plot but dont show the results

findRadius( time, yfit, kmin, ymed ) [source]
Find the radius of a star from the eclips duration

Parameters

  • time : array
         time values of yfit
  • yfit : array
         splines fit to the clipsing data
  • kmin : int
         index of (local) minimum in yfit
  • ymed : float
         median value of yfit