PHOEBE 2.0 Documentation

2.0 Docs

  • 1.0
  • 2.0a
  • ver: 2.0


Prev: Wilson-Devinney Style Meshing Next: Binary with Spots
.

IPython Notebook | Python Script

Detached Binary: Roche vs Rotstar

Setup

%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()
WARNING: Constant u'Gravitational constant' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING: Constant u'Solar mass' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING: Constant u'Solar radius' is already has a definition in the u'si' system [astropy.constants.constant]
WARNING: Constant u'Solar luminosity' is already has a definition in the u'si' system [astropy.constants.constant]
/Library/Python/2.7/site-packages/astropy/units/quantity.py:782: FutureWarning: comparison to None will result in an elementwise object comparison in the future.
  return super(Quantity, self).__eq__(other)

Adding Datasets

Now we’ll create an empty mesh dataset at quarter-phase so we can compare the difference between using roche and rotstar for deformation potentials:

b.add_dataset('mesh', times=[0.75], dataset='mesh01')
<ParameterSet: 2 parameters | contexts: compute, dataset>

Running Compute

Let’s set the radius of the primary component to be large enough to start to show some distortion when using the roche potentials.

b['rpole@primary@component'] = 1.8

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

b.run_compute(irrad_method='none', distortion_method='roche', model='rochemodel')
<ParameterSet: 62 parameters | components: primary, secondary>
b.run_compute(irrad_method='none', distortion_method='rotstar', model='rotstarmodel')
<ParameterSet: 62 parameters | components: primary, secondary>

Plotting

axs, artists = b['rochemodel'].plot()
../../_images/detached_rotstar_14_0.png
axs, artists = b['rotstarmodel'].plot()
../../_images/detached_rotstar_15_0.png
Prev: Wilson-Devinney Style Meshing Next: Binary with Spots
.
Last update: 06/07/2017 11:30 a.m. (CET)