sorcha.ephemeris.simulation_geometry

Functions

ecliptic_to_equatorial(v[, rot_mat])

Converts an ecliptic-aligned vector to an equatorially-aligned vector

equatorial_to_ecliptic(v[, rot_mat])

Converts an equatorially-aligned vector to an ecliptic-aligned vector

integrate_light_time(sim, ex, t, r_obs[, lt0, iter, ...])

Performs the light travel time correction between object and observatory iteratively for the object at a given reference time

get_hp_neighbors(ra_c, dec_c, search_radius[, nside, ...])

Queries the healpix grid for pixels near the given RA/Dec with a given search radius

ra_dec2vec(ra, dec)

Converts a RA/Dec pair to a unit vector on the sphere

vec2ra_dec(vec)

Decomposes a unit vector on the sphere into a RA/Dec pair

barycentricObservatoryRates(et, obsCode, observatories)

Computes the position and rate of motion for the observatory in barycentric coordinates

Module Contents

ecliptic_to_equatorial(v, rot_mat=ECL_TO_EQ_ROTATION_MATRIX)[source]

Converts an ecliptic-aligned vector to an equatorially-aligned vector

Parameters:
  • v (array (3 entries)) -- vector

  • rot_mat (2D array (3x3 matrix), default=ECL_TO_EQ_ROTATION_MATRIX) -- Rotation matrix. Default is the matrix that computes the ecliptic to equatorial conversion

Returns:

v -- Rotated vector

Return type:

array (3 entries)

equatorial_to_ecliptic(v, rot_mat=EQ_TO_ECL_ROTATION_MATRIX)[source]

Converts an equatorially-aligned vector to an ecliptic-aligned vector

Parameters:
  • v (array (3 entries)) -- vector

  • rot_mat (2D array (3x3 matrix), default=EQ_TO_ECL_ROTATION_MATRIX) -- Rotation matrix. Default is the matrix that computes the equatorial to ecliptic conversion

Returns:

v -- Rotated vector

Return type:

array (3 entries)

integrate_light_time(sim, ex, t, r_obs, lt0=0, iter=3, speed_of_light=SPEED_OF_LIGHT)[source]

Performs the light travel time correction between object and observatory iteratively for the object at a given reference time

Parameters:
  • sim (simulation) -- Rebound simulation object

  • ex (simulation extras) -- ASSIST simulation extras

  • t (float) -- Target time

  • r_obs (array (3 entries)) -- Observatory position at time t

  • lt0 (float, default=0) -- First guess for light travel time

  • iter (int, default=3) -- Number of iterations

  • speed_of_light (float, default=SPEED_OF_LIGHT) -- Speed of light for the calculation (default is SPEED_OF_LIGHT constant)

Returns:

  • rho (array) -- Object-observatory vector

  • rho_mag (float) -- Magnitude of rho vector

  • lt (float) -- Light travel time

  • target (array) -- Object position vector at t-lt

  • vtarget (array) -- Object velocity at t-lt

get_hp_neighbors(ra_c, dec_c, search_radius, nside=32, nested=True)[source]

Queries the healpix grid for pixels near the given RA/Dec with a given search radius

Parameters:
  • ra_c (float) -- Target RA

  • dec_c (float) -- Target dec

  • search_radius (float) -- Radius for the query

  • nside (int, default=32) -- healpix nside

  • nested (boolean, default=True) -- Defines the ordering scheme for the healpix ordering. True (default) means a NESTED ordering

Returns:

res -- List of healpix pixels

Return type:

list

ra_dec2vec(ra, dec)[source]

Converts a RA/Dec pair to a unit vector on the sphere :param ra: Target RA :type ra: float :param dec: Target dec :type dec: float

Returns:

Unit vector

Return type:

array

vec2ra_dec(vec)[source]

Decomposes a unit vector on the sphere into a RA/Dec pair :param vec: Unit vector :type vec: array

Returns:

  • ra (float) -- Target RA

  • dec (float) -- Target dec

barycentricObservatoryRates(et, obsCode, observatories, Rearth=RADIUS_EARTH_KM, delta_et=10)[source]

Computes the position and rate of motion for the observatory in barycentric coordinates

Parameters:
  • et (float) -- JPL ephemeris time

  • obsCode (str) -- MPC observatory code

  • observatories (Observatory) -- Observatory object with spherical representations for the obsCode

  • Rearth (float, default=RADIUS_EARTH_KM) -- Radius of the Earth units[km]

  • delta_et (float, default=10) -- Difference in ephemeris time (in seconds) to derive the rotation matrix from the fixed Earth equatorial frame to J2000

Returns:

  • array -- Position of the observatory (baricentric)

  • array -- Velocity of the observatory (baricentric)