BayesicFitting

Model Fitting and Evidence Calculation

View project on GitHub



class StellarOrbitModel( NonLinearModel )Source

Model for the radial velocity variations of a star caused by a orbiting planet.

  The algorithm was taken from Boule
     Cory Boule etal. (2017) J. of Double Star Observations Vol 13 p.189.
     http://www.jdso.org/volume13/number2/Harfenist189-199.pdf

par symbol description limits comment
p0 e eccentricity of the elliptic orbit 0<e<1 0 = circular orbit
p1 a semi major axis a>0
p2 P period of the orbit P>0
p3 T phase since periastron passage 0<T<2π
p4 i inclination of the orbit wrt sky 0<i<π 0 = pi = in sky plane
p5 Ω position angle from North
to the line of nodes 0<Ω<π 0 = north
p6 ω longitude from the node (in p5)
to the periastron 0<ω<2π 0 = periastron in node

Due to the fact that the orbit can be mirrored in the sky plane, one of p5 or p6 has to be limited to [0,pi] and the other to [0,2pi].

The parameters are initialized at [0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0]. It is a non-linear model.

This class uses Kepplers2ndLaw to find the radius and anomaly.

Attributes

  • keppler : Kepplers2ndLaw()
         to calculate the radius and true anomaly
  • ndout : int
         The number of outputs is 2. Use MultipleOutputProblem.
  • spherical : bool
         if True return the results in spherical coordinates.
  • cyclic : { 1 : 2*pi }
         Only if spherical, indicating that result[:,1] is cyclic.

Attributes from Model

     npchain, parameters, stdevs, xUnit, yUnit

Attributes from FixedModel

     npmax, fixed, parlist, mlist

Attributes from BaseModel

     npbase, ndim, priors, posIndex, nonZero, tiny, deltaP, parNames

Examples

sm = StellarOrbitModel( )
print( sm.npars )
7

StellarOrbitModel( copy=None, spherical=True, **kwargs )

Radial velocity model.

Number of parameters is 5

Parameters

  • copy : StellarOrbitModel
         model to copy
  • spherical : bool (True)
         produce output in sperical coordinates (rho,phi)
         otherwise in rectilinear coordinates (x,y)
  • fixed : dictionary of {int:float}
         int list if parameters to fix permanently. Default None.
         float list of values for the fixed parameters.
         Attribute fixed can only be set in the constructor.

copy( )

Copy method.

baseResult( xdata, params )
Returns the result of the model function.

Parameters

  • xdata : array_like
         values at which to calculate the result
  • params : array_like
         values for the parameters.

The parameters are explained in the StellarOrbitModel constructor.

toRect( rp )
Return (x,y) coordinates from (rho,phi)

Parameters

  • rp : array
         rp[:,0] : separation of the stars
         rp[:,1] : angle from north (down) CCW to east (right)

toSpher( xy )
Return (rho,phi) coordinates from (x,y)

Parameters

  • xy : array
         xy[:,0] : x position
         xy[:,1] : y position

baseDerivative( xdata, params )
Returns the derivative (df/dx) of the model function.

Parameters

  • xdata : array_like
         values at which to calculate the result
  • params : array_like
         values for the parameters.

The parameters are explained in the StellarOrbitModel constructor.

basePartial( xdata, params, parlist=None )
Returns the partials at the xdata value.
The partials are x ( xdata ) to degree-th power.

Parameters

  • xdata : array_like
         values at which to calculate the result
  • params : array_like
         values for the parameters. (not used for linear models)
  • parlist : array_like
         list of indices active parameters (or None for all)

The parameters are explained in the StellarOrbitModel constructor.

baseName( )
Returns a string representation of the model.

baseParameterUnit( k )
Return the unit of a parameter. (TBC)

Parameters

  • k : int
         the kth parameter.
Methods inherited from NonLinearModel
Methods inherited from Model
Methods inherited from FixedModel
Methods inherited from BaseModel