PHOEBE 2.0 Documentation

2.0 Docs

  • 1.0
  • 2.0a
  • ver: 2.0


IPython Notebook | Python Script

Single Star with Spots

Setup

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

Adding Spots

Let’s add one spot to our star. Since there is only one star, the spot will automatically attach without needing to provide component (as is needed in the binary with spots example

b.add_spot(radius=30, colat=80, long=0, relteff=0.9)
<ParameterSet: 5 parameters | qualifiers: colat, radius, colon, long, relteff>

Spot Parameters

A spot is defined by the colatitude and longitude of its center, its angular radius, and the ratio of temperature of the spot to the local intrinsic value.

NOTE: the parameter name was changed from “colon” to “long” in 2.0.2. For all further releases in 2.0.X, the “colon” parameter still exists but is read-only. Starting with 2.1.0, the “colon” parameter will no longer exist.

print b['spot']
ParameterSet: 6 parameters
            colat@spot01@feature: 80.0 deg
             long@spot01@feature: 0.0 deg
           radius@spot01@feature: 30.0 deg
          relteff@spot01@feature: 0.9
*           colon@spot01@feature: 0.0 deg
                colon@constraint: 1.000000 * {long@spot01@feature}

The ‘colat’ parameter defines the latitude on the star measured from its North Pole. The ‘long’ parameter measures the longitude of the spot - with longitude = 0 being defined as pointing towards the observer at t0.

NOTE: prior to version 2.0.2, the definition for the location of a spot on a single star was different and spots did not corotate correctly. If using spots, please make sure to be using 2.0.2 or later.

times = np.linspace(0, 10, 11)
b.set_value('period', 10)
b.add_dataset('mesh', times=times)
<ParameterSet: 2 parameters | contexts: compute, dataset>
b.run_compute(distortion_method='rotstar', irrad_method='none')
<ParameterSet: 331 parameters | qualifiers: loggs, pot, xs, zs, horizon_zs, mus, rs, nys, r_projs, horizon_xs, teffs, vzs, vxs, horizon_analytic_xs, volume, rpole, horizon_analytic_ys, ys, areas, nzs, vys, cosbetas, nxs, horizon_analytic_zs, tareas, vertices, horizon_ys, times, visibilities, normals, visible_centroids>
b.animate(x='xs', y='ys', facecolor='teffs')

If we set t0 to 5 instead of zero, then the spot will cross the line-of-sight at t=5 (since the spot’s longitude is 0).

b.set_value('t0', 5)
b.run_compute(distortion_method='rotstar', irrad_method='none')
Tue, 11 Jul 2017 14:03 BUNDLE       WARNING overwriting model: latest
<ParameterSet: 331 parameters | qualifiers: loggs, pot, xs, zs, horizon_zs, mus, rs, nys, r_projs, horizon_xs, teffs, vzs, vxs, horizon_analytic_xs, volume, rpole, horizon_analytic_ys, ys, areas, nzs, vys, cosbetas, nxs, horizon_analytic_zs, tareas, vertices, horizon_ys, times, visibilities, normals, visible_centroids>
b.animate(x='xs', y='ys', facecolor='teffs')

And if we change the inclination to 0, we’ll be looking at the north pole of the star. This clearly illustrates the right-handed rotation of the star. At time=t0=5 the spot will now be pointing in the negative y-direction.

b.set_value('incl', 0)
b.run_compute(distortion_method='rotstar', irrad_method='none')
Tue, 11 Jul 2017 14:04 BUNDLE       WARNING overwriting model: latest
<ParameterSet: 331 parameters | qualifiers: loggs, pot, xs, zs, horizon_zs, mus, rs, nys, r_projs, horizon_xs, teffs, vzs, vxs, horizon_analytic_xs, volume, rpole, horizon_analytic_ys, ys, areas, nzs, vys, cosbetas, nxs, horizon_analytic_zs, tareas, vertices, horizon_ys, times, visibilities, normals, visible_centroids>
b.animate(x='xs', y='ys', facecolor='teffs')