jaxoplanet.starry.surface#
Classes#
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.ModuleSurface 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]#
Ylmobject representing the spherical harmonic expansion of the map
- 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.
- 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