Model¶
-
class
dot.Model(light_curve, rotation_period, n_spots, scale_errors=1, skip_n_points=1, latitude_cutoff=10, rho_factor=250, verbose=False, min_time=None, max_time=None, contrast=0.7, partition_lon=False)[source] [edit on github]¶ Bases:
objectConstruct a new instance of
Model.- Parameters
- light_curve
LightCurve - rotation_periodfloat
Stellar rotation period
- n_spotsint
Number of spots
- latitude_cutofffloat
Don’t place spots above/below this number of degrees from the pole
- verbosebool
Allow PyMC3 dialogs to print to stdout
- partition_lonbool
Enforce strict partitions on star in longitude for sampling
- skip_n_pointsint (optional)
Skip every n points for faster runs
- min_timefloat or None (optional)
Minimum time to consider in the model
- max_timefloat or None (optional)
Maximum time to consider in the model
- contrastfloat or None (optional)
Starspot contrast
- rho_factorfloat (optional)
Scale up the GP length scale by a factor
rho_factorlarger than the estimatedrotation_period
- light_curve
Methods Summary
__call__([point])Evaluate the model with input parameters at
pointoptimize([start, plot])Optimize the free parameters in
Modelusingminimizeviaoptimizesample_nuts(trace_smc, draws[, cores, …])Sample the posterior distribution of the model given the data using the No U-Turn Sampler.
sample_smc(draws[, random_seed])Sample the posterior distribution of the model given the data using Sequential Monte Carlo.
Methods Documentation
-
__call__(point=None, **kwargs)[source] [edit on github]¶ Evaluate the model with input parameters at
pointThanks x1000 to Daniel Foreman-Mackey for making this possible.
-
optimize(start=None, plot=False, **kwargs)[source] [edit on github]¶ Optimize the free parameters in
ModelusingminimizeviaoptimizeThanks x1000 to Daniel Foreman-Mackey for making this possible.
-
sample_nuts(trace_smc, draws, cores=96, target_accept=0.99, **kwargs)[source] [edit on github]¶ Sample the posterior distribution of the model given the data using the No U-Turn Sampler.
- Parameters
- trace_smc
MultiTrace Results from the SMC sampler
- drawsint
Draws for the SMC sampler
- coresint
Run on this many cores
- target_acceptfloat
Increase this number up to unity to decrease divergences
- trace_smc
- Returns
- trace
MultiTrace Results of the NUTS sampler
- trace
-
sample_smc(draws, random_seed=42, **kwargs)[source] [edit on github]¶ Sample the posterior distribution of the model given the data using Sequential Monte Carlo.
- Parameters
- drawsint
Draws for the SMC sampler
- random_seedint
Random seed
- parallelbool
If True, run in parallel
- coresint
If
parallel, run on this many cores
- Returns
- trace
MultiTrace
- trace