Let's first make sure we have the latest version of PHOEBE 2.1 installed. (You can comment out this line if you don't use pip for your installation or don't want to update to the latest release).
In [ ]:
!pip install -I "phoebe>=2.1,<2.2"
As always, let's do imports and initialize a logger and a new bundle. See Building a System for more details.
In [1]:
%matplotlib inline
In [2]:
import phoebe
from phoebe import u # units
import numpy as np
import matplotlib.pyplot as plt
logger = phoebe.logger()
b = phoebe.default_binary()
In [3]:
b.add_dataset('lc', times=phoebe.linspace(0,1,101))
Out[3]:
In [4]:
b.run_compute(irrad_method='none', model='no_spot')
Out[4]:
Let's add a spot to the primary component in our binary.
The 'colat' parameter defines the colatitude on the star measured from its North (spin) Pole. The 'long' parameter measures the longitude of the spot - with longitude = 0 being defined as pointing towards the other star at t0. See the spots tutorial for more details.
In [5]:
b.add_feature('spot', component='primary', feature='spot01', relteff=0.9, radius=30, colat=45, long=90)
Out[5]:
In [6]:
b.run_compute(irrad_method='none', model='with_spot')
Out[6]:
In [7]:
afig, mplfig = b.plot(show=True, legend=True)
In [ ]: