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]:
import phoebe
from phoebe import u # units
import numpy as np
import matplotlib.pyplot as plt
logger = phoebe.logger()
b = phoebe.default_binary()
Let's add one pulsation to each of our stars in the binary.
A pulsation is a feature, and needs to be attached directly to a component upon creation. Providing a tag for 'feature' is entirely optional - if one is not provided it will be created automatically.
In [2]:
b.add_feature('pulsation', component='primary', feature='puls01')
Out[2]:
In [3]:
#b.add_feature('pulsation', component='secondary', feature='puls02')
Pulsations are defined by a frequency and amplitude
In [4]:
print b['puls01']
In [5]:
b.set_value(qualifier='l', feature='puls01', value=0)
In [6]:
b.set_value(qualifier='m', feature='puls01', value=0)
In [7]:
b.add_dataset('lc', times=np.linspace(0,1,21))
Out[7]:
In [8]:
b.run_compute(irrad_method='none', pbmesh=True)
Out[8]:
In [9]:
plt.clf()
b['model'].animate()
Out[9]:
In [ ]: