Skip to content

Coordinates¤

Coordinate helpers used by trajectory/parallax calculations.

Classes¤

microlux.coordinates.Coordinates ¤

Bases: NamedTuple

A NamedTuple storing sky coordinates of the target source.

Attributes:

Name Type Description
ra str

Right ascension string in sexagesimal format (HH:MM:SS).

dec str

Declination string in sexagesimal format (DD:MM:SS).

get_degrees() ¤

Convert RA/Dec from sexagesimal strings to decimal degrees.

Returns

  • alpha: Right ascension in degrees.
  • delta: Declination in degrees.

get_EN_vector() ¤

Calculate East/North unit vectors on the sky plane.

Returns

  • north_projected: Unit vector toward North on the tangent plane.
  • east_projected: Unit vector toward East on the tangent plane.

Functions¤

microlux.coordinates.normalize_jd_for_ephemeris(times, time_ref, reduced_jd_cutoff: float = 2450000.0) ¤

Normalize reduced Julian dates for ephemeris calls.

Parameters

  • times: Observation epochs as a 1D array.
  • time_ref: Reference epoch.
  • reduced_jd_cutoff: Threshold used to detect reduced-JD input. Defaults to 2450000.0.

Returns

  • times_jd: Full-JD epochs for ephemeris lookup.
  • time_ref_jd: Full-JD reference epoch.

If times[0] < reduced_jd_cutoff, both outputs are shifted by reduced_jd_cutoff.


microlux.coordinates.velocity_of_Earth(full_BJD) ¤

Calculate Earth's barycentric velocity at a given epoch.

Parameters

  • full_BJD: Barycentric Julian Date in full-JD form (e.g., 245xxxx or 246xxxx).

Returns

  • velocity: Earth barycentric velocity vector in AU/day, shape (3,).

microlux.coordinates.annual_parallax_shift(times, time_ref, coords: Coordinates) ¤

Compute annual parallax displacement projected to North/East.

Parameters

  • times: Observation epochs in JD.
  • time_ref: Reference epoch in JD (typically t0_par).
  • coords: Source sky coordinates.

Returns

  • delta_s_projected: Array with shape (N, 2) where columns are [North, East] in AU.