PHOEBE 2.1 Documentation

2.1 Docs

Prev: Sun (single rotating star) Next: Complete Binary Animation

IPython Notebook | Python Script

Minimal Example to Produce a Synthetic Light Curve


%matplotlib inline

As always, let’s do imports and initialize a logger and a new bundle. See Building a System for more details.

import phoebe
from phoebe import u # units
import numpy as np
import matplotlib.pyplot as plt

logger = phoebe.logger()

b = phoebe.default_binary()

Adding Datasets

Now we’ll create an empty lc dataset:

b.add_dataset('lc', times=np.linspace(0,1,201), dataset='mylc')
<ParameterSet: 15 parameters | contexts: compute, dataset>

Running Compute

Now we’ll compute synthetics at the times provided using the default options

<ParameterSet: 2 parameters | qualifiers: fluxes, times>


Now we can simply plot the resulting synthetic light curve.

afig, mplfig = b['mylc@model'].plot(show=True)
afig, mplfig = b['mylc@model'].plot(x='phases', show=True)
Prev: Sun (single rotating star) Next: Complete Binary Animation
Last update: 10/29/2018 9:20 a.m. (CET)