sorcha.ephemeris.pixel_dict

Classes

PixelDict

Class with methods needed during the ephemerides generation

Functions

lagrange3(t0, t1, t2, t)

Calculate the coefficients for

Module Contents

lagrange3(t0, t1, t2, t)[source]

Calculate the coefficients for second-order Lagrange interpolation for measured points at times t0, t1, and t2 and for an array of times t.

These coefficients can be reused for any number of input vectors.

Parameters:
  • t0 (float) -- Time t0

  • t1 (float) -- Time t1

  • t2 (float) -- Time t2

  • t (1D array) -- Times for the interpolation

Returns:

  • L0 (1D array) -- interpolation coefficient at t0

  • L1 (1D array) -- interpolation coefficient at t1

  • L2 (1D array) -- interpolation coefficient at t2

class PixelDict(jd_tdb, sim_dict, ephem, obsCode, observatory, picket_interval=1.0, nside=128, nested=True, n_sub_intervals=101)[source]

Class with methods needed during the ephemerides generation Interfaces directly with the ASSIST+Rebound simulation objects as well as healpix

nside = 128[source]
picket_interval = 1.0[source]
n_sub_intervals = 101[source]
obsCode[source]
nested = True[source]
sim_dict[source]
ephem[source]
observatory[source]
t0[source]
r_obs_0[source]
tp[source]
r_obs_p[source]
tm[source]
r_obs_m[source]
pixel_dict[source]
rho_hat_m_dict[source]
rho_hat_0_dict[source]
rho_hat_p_dict[source]
get_observatory_position(t)[source]

Computes the barycentric position of the observatory (in au)

Parameters:

t (float) -- Epoch for the position vector

Returns:

Barycentric position of the observatory (x,y,z)

Return type:

array (3,)

get_object_unit_vectors(desigs, r_obs, t, lt0=0.01)[source]

Computes the unit vector (in the equatorial sphere) that point towards the object - observatory vector for a list of objects, at a given time

Parameters:
  • desigs (list) -- List of designations (consistent with the simulation dictionary)

  • r_obs (array (3 entries)) -- Observatory location

  • t (float) -- Time of the observation

  • lt0 (float) -- Initial guess (in days) for light-time correction (default: 0.01 days)

Returns:

rho_hat_dict -- Dictionary of unit vectors

Return type:

dict

get_all_object_unit_vectors(r_obs, t, lt0=0.01)[source]

Computes the unit vector (in the equatorial sphere) that point towards the object - observatory vector for all objects, at a given time

Parameters:
  • r_obs (array (3 entries)) -- Observatory location

  • t (float) -- Time of the observation

  • lt0 (float) -- Initial guess (in days) for light-time correction (default: 0.01 days)

Returns:

rho_hat_dict -- Dictionary of unit vectors

Return type:

dict

get_interp_factors(tm, t0, tp, n_sub_intervals)[source]

Computes the Lagrange interpolation factors at a set of 3 times for an equally spaced grid of points with a chosen number of sub-intervals :param tm: First reference time :type tm: float :param t0: Second reference time :type t0: float :param tp: Third reference time :type tp: float :param n_sub_intervals: Number of sub-intervals for the Lagrange interpolation (default: 101) :type n_sub_intervals: int

Returns:

  • Lm (2D array) -- Lagrange coefficients at tm

  • L0 (2D array) -- Lagrange coefficients at t0

  • Lp (2D array) -- Lagrange coefficient at tp

interpolate_unit_vectors(desigs, jd_tdb)[source]

Interpolates the unit vectors for a list of designations towards the new target time

Parameters:
  • desigs (list) -- List of designations (consistent with the simulation dictionary)

  • jd_tdb (float) -- Target time

Returns:

unit_vector_dict -- Dictionary of unit vectors

Return type:

dict

compute_pixel_traversed()[source]

Computes the healpix pixels traversed by all the objects during between times tm and tp

update_pickets(jd_tdb)[source]

Updates the picket interpolation vectors for the new reference time

Parameters:

jd_tdb (float) -- Target time

get_designations(jd_tdb, ra, dec, ang_fov)[source]

Get the object designations that are within an angular radius of a topocentric unit vector at a given time.

Parameters:
  • jd_tdb (float) -- Target time

  • ra (float) -- right ascension (degrees)

  • dec (float) -- declination (degrees)

  • ang_fov (float) -- Field of view radius

Returns:

desigs -- List of designations

Return type:

list