| class EclipsingStarModel( NonLinearModel ) | [source] |
|---|
Model for the light curve of an eclipsing double star, as a function of time, t.
| par | symbol | name | description | limits | comment |
|---|---|---|---|---|---|
| p0 | e | eccentricity | of the elliptic orbit | 0<e<1 | 0 is circular |
| p1 | P | period | of the velocity variation | P>0 | |
| p2 | T | phase | phase until t = 0 | 0<T<2π | |
| p3 | i | inclination | of orbit (close to 90) | 0<i<π | |
| p4 | ω | longitude | from north to periastron | 0<ω<2π | |
| p5 | r1 | radius1 | radius of star 1 | 0<r1<1 | |
| p6 | r2 | radius2 | radius of star 2 | 0<r2<1 | |
| p7 | f1 | lumen1 | luminosity of star 1 | ||
| p8 | f2 | lumen2 | luminosity of star 2 | ||
| p9 | fs | spot | spot illumination | fs >= 0 | 0 is no spot |
| p10 | m1 | mass1 | relative mass of star 1 | 0 < m1 < 1 | m2 = 1 - m1 |
The amplitude (semimajor axis) is set to 1.0. Both stellar radii are given as a fraction of the amplitude. The mass of star 2 is ( 1 - m1 ). The mass ratio is used in calculating the tidal distortion.
When the sum of the radii, p5 + p6, is larger than the periastron distance, 1 - p0, the stars clash.
When the model is constructed as circular, the parameter p0 becomes 0 by definition and p4 looses its meaning. They are removed from the model.
This class uses StellarOrbitModel to find the true orbit
The parameters are initialized at
[0.0, 1.0, 0.0, pi/2, 0.0, 0.1, 0.1, 1.0, 1.0, 0.0, 0.5].
It is a non-linear model.
For the mathematics of this model and further explanation see ../EclipsingStars.md
(Partial) derivatives were obtained with the help of
https://www.derivative-calculator.net
Muchas Gracias
Attributes
- storbit : StellarOrbitModel
to calculate the true stellar orbit - circular : bool
whether the orbit is circular (eccentricity == phase == longitude == 0) - spot : bool
apply spot illumination and tidal distortion - tides : bool
apply tidal distortion - occultation : bool
True: eclipses stricty enforced - fixpar : lambda function
to provide parameters for StellarOrbitModel
Examples
esm = EclipsingStarModel( spot=True, tides=True )
print( esm.npars )
10
| EclipsingStarModel( circular=False, spot=False, tides=False, occultation=True, copy=None, **kwargs ) | [source] |
|---|
Radial velocity model.
Number of parameters depends on the settings of ( False or True ) of
circular spot tides
( 9 or 6 ) + ( 0 or 1 ) + ( 0 or 1 )
Parameters
- circular : bool
stellar orbit is circular: eccentricity = 0 ==> lonod = 0 - spot : bool or number
apply spot illumination; more pronounced when spot > 1 - tides : bool
apply tidal distortion - occultation : bool (True)
eclipses are stricty enforced - copy : EclipsingStarModel
model to copy
| copy( ) | [source] |
|---|
| distanceConstraint( logL, problem, allpars, lowLhood ) | [source] |
|---|
Parameters
- logL : float
log Likelihood obtained with allpars - problem : Problem
to solve - allpars : array
all parameters involved in the problem - lowLhood : float
present value of the likelihood constraint
| logCombiPrior( allpars ) | [source] |
|---|
Parameters
- allpars : array
all parameters involved in the problem
| baseResult( xdata, params ) | [source] |
|---|
Parameters
- xdata : array_like
values at which to calculate the result - params : array_like
values for the parameters.
| lightCurve( xy, z, params, debug=0 ) | [source] |
|---|
Parameters
- xy : array
distance between the stars in the sky plane - z : array
distance of star 2 to the sky plane - params : array
of the model - debug : int
debug partial derivativesin stages
| visibleFraction( xy, z, r1, r2 ) | [source] |
|---|
If z is positive, star 2 is in front of star 1
If z is negative, star 2 is behind star 1
Parameters
- xy : array
distance between overlapping circles - z : array
distance of star 2 to the sky plane - r1 : float or array
radius of star 1 - r2 : float or array
radius of star 2
| VFderivative( xy, z, r1, r2 ) | [source] |
|---|
Parameters
- xy : array
distance between overlapping circles - z : array
distance of star 2 to the sky plane - r1 : float or array
radius of star 1 - r2 : float or array
radius of star 2
Returns
( dV1dx, dV2dx, dV1dz, dV2dz )
derivatives of the visibility to xy and z
| VFpartial( xy, z, r1, r2 ) | [source] |
|---|
Parameters
- xy : array
distance between overlapping circles - z : array
distance of star 2 to the sky plane - r1 : float or array
radius of star 1 - r2 : float or array
radius of star 2
Returns
( dV1dr1, dV2dr1, dV1dr2, dV2dr2 )
partials of the visibility to r1 and r2
| overlap( xy, r1, r2 ) | [source] |
|---|
https://scipython.com/books/book2/chapter-8-scipy/problems/overlapping-circles/
Parameters
- xy : array
distance between overlapping circles - r1 : float or array
radius of circle 1 - r2 : float or array
radius of circle 2
| spotIllumination( xy, z, params ) | [source] |
|---|
The algoritm is taken from DOI: 10.5817/OEJV2025-0258
Parameters
- xy : array
distance between the stars in the sky plane - z : array
distance of star 2 to the sky plane - params : array
parameters of the model
| tidalDistortion( xy, z, params ) | [source] |
|---|
See equation. (1.468) from
https://farside.ph.utexas.edu/teaching/355/Surveyhtml/node69.html
(for as long as it lasts)
Parameters
- xy : array
distance between the stars in the sky plane - z : array
distance of star 2 to the sky plane - params : array
parameters of the model
Returns
( a1, b1, a2, b2 )
apparent stretch and squeeze of both stars
| basePartial( xdata, params, parlist=None ) | [source] |
|---|
Parameters
- xdata : array
values at which to calculate the result - params : array
values for the parameters. - parlist : array
list of indices active parameters (or None for all)
| baseDerivative( xdata, params ) | [source] |
|---|
Parameters
- xdata : array
times at which to calculate the result - params : array
values for the parameters.
| OVpartial( xy, r1, r2 ) | [source] |
|---|
Parameters
- xy : array
projected distance between stars - r1 : array
radius of star 1 - r2 : array
radius of star 2
| SIpartial( xy, z, params, surface=(1,1) ) | [source] |
|---|
If no spot illumination is requested, the dF*dfs are returned as zero.
Parameters
- xy : array
distance between the stars in the sky plane - z : array
distance of star 2 to the sky plane - params : array
values for the parameters. - surface : tuple of arrays
normalized surface areas of the stars
Returns
( dF1dr1, dF1dr2, dF1df1, dF1df2, dF1dfs,
dF2dr1, dF2dr2, dF2df1, dF2df2, dF2dfs )
| LCpartial( xy, z, params ) | [source] |
|---|
Parameters
- xy : array
distance between the stars in the sky plane - z : array
distance of star 2 to the sky plane - params : array
parameters of the model
| TDpartial( xy, z, params, TDresult=None ) | [source] |
|---|
Parameters
- xy : array
distance between the stars in the sky plane - z : array
distance of star 2 to the sky plane - params : array
parameters of the model - TDresult : None or tuple
result of a call to tidalDistortion
Returns
- ( da1dm, db1dm, da2dm, db2dm, da1dr, db1dr, da2dr, db2dr ) : 8 arrays
Partials of the normalized projected axes to the parameters
| OVderivative( xy, r1, r2 ) | [source] |
|---|
Parameters
- xy : array
projected distance between stars - r1 : array
radius of star 1 - r2 : array
radius of star 2
| LCderivative( xy, z, params ) | [source] |
|---|
Parameters
- xy : array
distance between the stars in the sky plane - z : array
distance of star 2 to the sky plane - params : array
parameters of the model
| SIderivative( xy, z, params, surface=(1,1) ) | [source] |
|---|
Parameters
- xy : float
distance between the stars in the sky plane - z : float
distance of star 2 to the sky plane - params : array_like
values for the parameters. - surface : tuple of 2 array
normalized surface areas of the stars
Returns
( dF1dx, dF2dx, dF1dz, dF2dz )
| TDderivative( xy, z, params, TDresult=None ) | [source] |
|---|
Parameters
- xy : array
distance between the stars in the sky plane - z : array
distance of star 2 to the sky plane - params : array
parameters of the model - TDresult : tuple
result of call tp tidalDostortion
Returns
( da1dx, db1dx, da2dx, db2dx, da1dz, db1dz, da2dz, db2dz )
derivatives of apparent major and minor axes to xy and z
| baseName( ) | [source] |
|---|
| reportParameters( param, stdevs=None, toMags=False ) | [source] |
|---|
Parameters
- param : array
to be converted and printed - stdevs : array
to be converted and printed - toMags : bool or float (False)
true convert luminosities to magnitudes
float true and use number as scaling factor
| Methods inherited from NonLinearModel |
|---|
| Methods inherited from Model |
|---|
- chainLength( )
- isNullModel( )
- isolateModel( k )
- addModel( model )
- subtractModel( model )
- multiplyModel( model )
- divideModel( model )
- pipeModel( model )
- appendModel( model, operation )
- correctParameters( params )
- result( xdata, param=None )
- operate( res, pars, next )
- derivative( xdata, param, useNum=False )
- selectPipe( ndim, ninter, ndout )
- pipe_0( dGd, dHdG )
- pipe_1( dGd, dHdG )
- pipe_2( dGd, dHdG )
- pipe_3( dGd, dHdG )
- pipe_4( dGdx, dHdG )
- pipe_5( dGdx, dHdG )
- pipe_6( dGdx, dHdG )
- pipe_7( dGdx, dHdG )
- pipe_8( dGdx, dHdG )
- pipe_9( dGdx, dHdG )
- shortName( )
- getNumberOfParameters( )
- numDerivative( xdata, param )
- numPartial( xdata, param )
- isDynamic( )
- hasPriors( isBound=True )
- getPrior( kpar )
- setPrior( kpar, prior=None, **kwargs )
- getParameterName( kpar )
- getParameterUnit( kpar )
- getIntegralUnit( )
- setLimits( lowLimits=None, highLimits=None )
- getLimits( )
- hasLimits( fitindex=None )
- unit2Domain( uvalue, kpar=None )
- domain2Unit( dvalue, kpar=None )
- partialDomain2Unit( dvalue )
- nextPrior( )
- getLinearIndex( )
- testPartial( xdata, params, silent=True )
- strictNumericPartial( xdata, params, parlist=None )
- assignDF1( partial, i, dpi )
- assignDF2( partial, i, dpi )
- strictNumericDerivative( xdata, param )
| Methods inherited from FixedModel |
|---|
| Methods inherited from BaseModel |
|---|