jaxoplanet.starry.surface#

Classes#

Surface

Surface map object.

Module Contents#

class jaxoplanet.starry.surface.Surface(*, y: jaxoplanet.starry.ylm.Ylm | None = None, inc: jaxoplanet.types.Scalar | None = 0.5 * jnp.pi, obl: jaxoplanet.types.Scalar | None = None, u: collections.abc.Iterable[jaxoplanet.types.Array] = (), period: jaxoplanet.types.Scalar | None = None, amplitude: jaxoplanet.types.Array = 1.0, normalize: bool = True, phase: jaxoplanet.types.Array = 0.0, radius: jaxoplanet.types.Array = 1.0, shear: jaxoplanet.types.Array = None)[source]#

Bases: equinox.Module

Surface map object.

Parameters:
  • y (Optional(Ylm)) – spherical harmonic expansion of the map. Defaults to a uniform map with amplitude 1.0.

  • inc (Optional[Scalar]) – inclination of the map relative to line of sight. Defaults to pi/2 [angular unit].

  • obl (Optional[Scalar]) – obliquity of the map [angular unit]. Defaults to None.

  • u (Optional[Array]) – polynomial limb-darkening coefficients of the map.

  • period (Optional[Scalar]) – rotation period of the map [time unit]. Defaults to None.

  • amplitude (Optional[float]) – amplitude of the map; this Scalar is proportional to the luminosity of the map and multiplies all flux-related observables. Defaults to 1.0.

  • normalize (Optional(bool)) – whether to normalize the coefficients of the spherical harmonics. If True, Ylm is normalized and the amplitude of the map is set to y[(0, 0)]. Defaults to True.

  • phase (Optional[float]) – initial phase of the map rotation around the polar axis. Defaults to 0.0.

Example

import numpy as np
import jax
from jaxoplanet.starry.visualization import show_surface
from jaxoplanet.starry.surface import Surface
from jaxoplanet.starry.ylm import Ylm

jax.config.update("jax_enable_x64", True)

np.random.seed(30)
y = Ylm.from_dense(np.random.rand(20))
m = Surface(y=y, u=[0.5, 0.1], inc=0.9, obl=-0.3)
show_surface(m)
y: jaxoplanet.starry.ylm.Ylm[source]#

Ylm object representing the spherical harmonic expansion of the map

u: tuple[jaxoplanet.types.Array, Ellipsis][source]#

Tuple of limb darkening coefficients.

period: jaxoplanet.types.Array | None[source]#

Rotation period of the map in days (attribute subject to change). None if not rotating.

amplitude: jaxoplanet.types.Array[source]#

Amplitude of the map, a Scalar proportional to map luminosity.

normalize: bool[source]#

Boolean to specify whether the Ylm coefficients should be normalized

phase: jaxoplanet.types.Array[source]#

Initial phase of the map rotation around polar axis

radius: jaxoplanet.types.Array[source]#

Radius of the map in solar radii

shear: jaxoplanet.types.Array[source]#

Differential rotation shear of the map

property inc[source]#
property obl[source]#
property veq[source]#

Equatorial velocity of the map in Rsun/day.

property udeg: int[source]#

Order of the polynomial limb darkening.

property ydeg: int[source]#
property vdeg: int[source]#
property deg[source]#

Total degree of the spherical harmonic expansion (udeg + ydeg).

render(theta: float | None = None, res: int = 400, rv: bool = False)[source]#

Returns the intensity map projected onto the x-y plane (sky).

Parameters:
  • theta (float, optional) – rotation angle of the map. Defaults to 0.0.

  • res (int, optional) – resolution of the render. Defaults to 400.

Returns:

square 2D array representing the intensity map (with nans outside the map disk).

Return type:

ArrayLike

intensity(lat: float, lon: float)[source]#

Returns the intensity of the map at a given latitude and longitude.

Parameters:
  • lat (float) – latitude in the rest frame of the map

  • lon (float) – longitude in the rest frame of the map

Returns:

intensity of the map at the given latitude and longitude

Return type:

float

rotational_phase(time: jaxoplanet.types.Array) jaxoplanet.types.Array | None[source]#

Returns the rotational phase of the map at a given time.

Parameters:

time (ArrayLike) – time in same units as the period

Returns:

rotational phase of the map at the given time

Return type:

ArrayLike