ChebyValues¶
- class rubin_sim.moving_objects.ChebyValues¶
Bases:
object
Calculates positions, velocities, deltas, vmags and elongations, given a series of coefficients generated by ChebyFits.
Methods Summary
get_ephemerides
(times[, obj_ids, extrapolate])Find the ephemeris information for 'obj_ids' at 'time'.
read_coefficients
(cheby_fits_file)Read coefficients from output file written by ChebyFits.
set_coefficients
(cheby_fits)Set coefficients using a ChebyFits object.
Methods Documentation
- get_ephemerides(times, obj_ids=None, extrapolate=False)¶
Find the ephemeris information for ‘obj_ids’ at ‘time’.
Implicit in how this is currently written is that the segments are all expected to cover the same start/end time range across all objects. They do not have to have the same segment length for all objects.
- Parameters:
- times
float
ornp.ndarray
The time to calculate ephemeris positions.
- obj_ids
np.ndarray
, opt The object ids for which to generate ephemerides. If None, then just uses all objects.
- extrapolate
bool
, opt If True, extrapolate beyond ends of segments if time outside of segment range. If False, return ValueError if time is beyond range of segments.
- times
- Returns:
- ephemerides
np.ndarray
The ephemeris positions for all objects. Note that these may not be sorted in the same order as obj_ids.
- ephemerides
- read_coefficients(cheby_fits_file)¶
Read coefficients from output file written by ChebyFits.
- Parameters:
- cheby_fits_file
str
The filename of the coefficients file.
- cheby_fits_file
- set_coefficients(cheby_fits)¶
Set coefficients using a ChebyFits object. (which contains a dictionary of obj_id, t_start, t_end, ra, dec, delta, vmag, and elongation lists).
- Parameters:
- cheby_fits
rubin_sim.movingObjects.chebyFits
ChebyFits object, with attribute ‘coeffs’ - a dictionary of lists of coefficients.
- cheby_fits