Single Star with Pulsations

NOTE: pulsations are currently being tested but not yet supported

Setup

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_star()


/usr/local/lib/python2.7/dist-packages/IPython/kernel/__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated. You should import from ipykernel or jupyter_client instead.
  "You should import from ipykernel or jupyter_client instead.", ShimWarning)
WARNING: Constant u'Gravitational constant' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING:astropy:Constant u'Gravitational constant' is already has a definition in the u'si' system
WARNING: Constant u'Solar mass' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING:astropy:Constant u'Solar mass' is already has a definition in the u'si' system
WARNING: Constant u'Solar radius' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING:astropy:Constant u'Solar radius' is already has a definition in the u'si' system
WARNING: Constant u'Solar luminosity' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING:astropy:Constant u'Solar luminosity' is already has a definition in the u'si' system
WARNING: developer mode enabled, to disable 'rm ~/.phoebe_devel_enabled' and restart phoebe or phoebe._devel_enabled=False to temporarily disable
/usr/local/lib/python2.7/dist-packages/astropy/units/quantity.py:732: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  return super(Quantity, self).__eq__(other)

Adding Pulsations


In [2]:
b.add_feature('pulsation', component='starA', feature='puls01', m=0, l=0)


Out[2]:
<ParameterSet: 5 parameters | qualifiers: freq, radamp, m, teffext, l>

In [3]:
b.add_feature('pulsation', component='starA', feature='puls02', m=1, l=1)


Out[3]:
<ParameterSet: 5 parameters | qualifiers: freq, radamp, m, teffext, l>

Pulsation Parameters

Pulsations are defined by a frequency and amplitude


In [4]:
print b['puls01']


ParameterSet: 5 parameters
           radamp@puls01@feature: 0.1
             freq@puls01@feature: 1.0 1 / d
                l@puls01@feature: 0.0
                m@puls01@feature: 0.0
          teffext@puls01@feature: False

In [5]:
print b['puls02']


ParameterSet: 5 parameters
           radamp@puls02@feature: 0.1
             freq@puls02@feature: 1.0 1 / d
                l@puls02@feature: 1.0
                m@puls02@feature: 1.0
          teffext@puls02@feature: False

In [6]:
b.add_dataset('lc', times=np.linspace(0,3,21))


Out[6]:
<ParameterSet: 9 parameters | kinds: LC, LC_dep>

In [7]:
b.run_compute(distortion_method='rotstar', pbmesh=True)


/home/kyle/.local/lib/python2.7/site-packages/phoebe/backend/universe.py:3013: ComplexWarning: Casting complex values to real discards the imaginary part
  new_coords[:,0] = coords_for_computations[:,0] + xi_r * np.sin(theta) * np.cos(phi)
/home/kyle/.local/lib/python2.7/site-packages/phoebe/backend/universe.py:3014: ComplexWarning: Casting complex values to real discards the imaginary part
  new_coords[:,1] = coords_for_computations[:,1] + xi_r * np.sin(theta) * np.sin(phi)
/home/kyle/.local/lib/python2.7/site-packages/phoebe/backend/universe.py:3015: ComplexWarning: Casting complex values to real discards the imaginary part
  new_coords[:,2] = coords_for_computations[:,2] + xi_r * np.cos(theta)
/home/kyle/.local/lib/python2.7/site-packages/phoebe/backend/universe.py:3044: ComplexWarning: Casting complex values to real discards the imaginary part
  new_coords[:,0] = coords_for_observations[:,0] + xi_r * np.sin(theta) * np.cos(phi)
/home/kyle/.local/lib/python2.7/site-packages/phoebe/backend/universe.py:3045: ComplexWarning: Casting complex values to real discards the imaginary part
  new_coords[:,1] = coords_for_observations[:,1] + xi_r * np.sin(theta) * np.sin(phi)
/home/kyle/.local/lib/python2.7/site-packages/phoebe/backend/universe.py:3046: ComplexWarning: Casting complex values to real discards the imaginary part
  new_coords[:,2] = coords_for_observations[:,2] + xi_r * np.cos(theta)
Out[7]:
<ParameterSet: 648 parameters | kinds: MESH, LC>

In [8]:
b['model'].animate(facecolor='teffs', edgecolor=None)


/home/kyle/.local/lib/python2.7/site-packages/phoebe/frontend/plotting.py:242: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if pckwargs['edgecolors'] in ['none', 'None', None] and pckwargs['facecolors'] not in ['none', 'None', None]:
/home/kyle/.local/lib/python2.7/site-packages/phoebe/frontend/plotting.py:242: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  if pckwargs['edgecolors'] in ['none', 'None', None] and pckwargs['facecolors'] not in ['none', 'None', None]:
/usr/local/lib/python2.7/dist-packages/matplotlib/collections.py:590: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  if self._edgecolors == str('face'):
Out[8]:


Once Loop Reflect

In [ ]: