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: object

Construct a new instance of Model.

Parameters
light_curveLightCurve
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_factor larger than the estimated rotation_period

Methods Summary

__call__([point])

Evaluate the model with input parameters at point

optimize([start, plot])

Optimize the free parameters in Model using minimize via optimize

sample_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 point

Thanks x1000 to Daniel Foreman-Mackey for making this possible.

optimize(start=None, plot=False, **kwargs)[source] [edit on github]

Optimize the free parameters in Model using minimize via optimize

Thanks 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_smcMultiTrace

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

Returns
traceMultiTrace

Results of the NUTS sampler

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
traceMultiTrace