jaxoplanet.starry.ylm#
A module to manipulate vectors in the spherical harmonic basis.
The spherical harmonics basis is a set of orthogonal functions defined on the unit sphere. In jaxoplanet, this basis is used to represent the intensity at the surface of a spherical body, such as a star or a planet. We say that \(y\) represents the intensity of a surface in the spherical harmonics basis if the specific intensity at the \((x,y)\) on the surface can be written as:
where \(\tilde{y}_n\) is the spherical harmonic basis, arranged in increasing degree and order:
where \(Y_{l, m} = Y_{l, m}(x, y)\) is the spherical harmonic of degree \(l\) and order \(m\). For reference, in this basis the coefficient of the spherical harmonic \(Y_{l, m}\) is located at the index
Classes#
Ylm object containing the spherical harmonic coefficients. |
Functions#
|
Return the matrix B+. This expands the |
|
The sigmoid spot profile. |
|
spot expansion in the spherical harmonics basis. |
|
Module Contents#
- class jaxoplanet.starry.ylm.Ylm(data: collections.abc.Mapping[tuple[int, int], jaxoplanet.types.Array] | None = None)[source]#
Bases:
equinox.ModuleYlm object containing the spherical harmonic coefficients.
- Parameters:
data (Mapping[tuple[int, int], Array], optional) – dictionary of spherical harmonic coefficients. Defaults to {(0, 0): 1.0}.
- data: dict[tuple[int, int], jaxoplanet.types.Array][source]#
coefficients of the spherical harmonic expansion of the map in the form {(l, m): coefficient}
- diagonal: bool[source]#
Whether are orders m of the spherical harmonic coefficients are zero. Diagonal if only the degrees “l” are non-zero.
- property shape: tuple[int, Ellipsis][source]#
The number of coefficients in the basis. This sets the shape of the output of todense.
- property indices: list[tuple[int, int]][source]#
List of (l,m) indices of the spherical harmonic coefficients.
- static index(l: jaxoplanet.types.Array, m: jaxoplanet.types.Array) jaxoplanet.types.Array[source]#
Convert the degree and order of the spherical harmonic to the corresponding index in the coefficient array.
- normalize() Ylm[source]#
Return a new Ylm instance with coefficients normalized to \(Y_{0,0}\).
- Returns:
Ylm instance with normalized coefficients.
- Raises:
ValueError – if the (0, 0) coefficient is zero.
- tosparse() jax.experimental.sparse.BCOO[source]#
Return a sparse (jax.experimental.sparse.BCOO) spherical harmonic coefficients vector where the spherical harmonic \(Y_{l, m}\) is located at the index \(n = l^2 + l + m\).
- todense() jaxoplanet.types.Array[source]#
Return a dense spherical harmonic coefficients vector where the spherical harmonic \(Y_{l, m}\) is located at the index \(n = l^2 + l + m\).
- jaxoplanet.starry.ylm.Bp(ydeg, npts: int = 1000, eps: float = 1e-09, smoothing=None)[source]#
Return the matrix B+. This expands the spot profile b in Legendre polynomials. From rodluger/ mapping_stellar_surfaces/blob/paper2-arxiv/paper2/figures/spot_profile.py and _spot_setup in starry/_core/core.py.