RampTableManager#

class RampTableManager#

Bases: object

Handles ramp-frequency table integration for real DSN measurement models.

Provides static utilities to locate the correct ramp-table interval for a query epoch and to integrate the piecewise-linear transmit frequency over an observation window, supporting multi-segment and day-spanning cases.

Methods

frequency_at(ramp_table, t_sec, t_doy[, ...])

Transmit frequency of the ramp table at one epoch.

integrate(ramp_table, t1_q_sec, t2_q_sec, ...)

Integrate the piecewise-linear transmit frequency over a query window.

Notes

This class is a work-in-progress; the interface may change as additional DSN data types are supported.

References

[1]

Moyer, T. D. Formulation for Observed and Computed Values of Deep Space Network Data Types for Navigation. Monograph 2, Deep Space Communications and Navigation Series, JPL/Wiley, 2000.

static frequency_at(ramp_table: dict, t_sec: float, t_doy: float, t_year: int = None, t_sec_l: float = 0.0) → float#

Transmit frequency of the ramp table at one epoch.

Parameters:
ramp_tabledict

Ramp-table data, as integrate() reads it.

t_secfloat

Epoch in seconds of day. It may run past either end of t_doy.

t_doyfloat

Day-of-year of t_sec.

t_yearint, optional

Year of t_doy, needed to cross a new year.

t_sec_lfloat, optional

Low part of t_sec [s].

Returns:
float

Frequency of the ramp segment holding the epoch, extrapolated linearly from its record [Hz].

Raises:
RampTableManager.RampCoverageError

If the ramp table is empty or the epoch precedes its first record.

RampTableManager.RampTableYearError

If the ramp table or the epoch crosses a new year and the years are not given.

Notes

The frequency at the start of a zero-width integrate() window, so the segment lookup, day mapping and year handling are the same.

static integrate(ramp_table: dict, t1_q_sec: float, t2_q_sec: float, t1_q_doy: float, t2_q_doy: float, t1_q_year: int = None, t2_q_year: int = None, t1_q_sec_l: float = 0.0, t2_q_sec_l: float = 0.0)#

Integrate the piecewise-linear transmit frequency over a query window.

Parameters:
ramp_tabledict

Ramp-table data with five entries (indexed 0–4): seconds of day, day-of-year, reference frequency [Hz], frequency rate [Hz/s], and ramp-type flag. An optional sixth entry holds the year of each record (None when unknown).

t1_q_secfloat

Start of the integration window in seconds of day.

t2_q_secfloat

End of the integration window in seconds of day.

t1_q_doyfloat

Day-of-year corresponding to t1_q_sec.

t2_q_doyfloat

Day-of-year corresponding to t2_q_sec. Either day may run past the ends of its year (day 0, day 366 of a common year).

t1_q_year, t2_q_yearint, optional

Years of t1_q_doy and t2_q_doy. Used, together with the ramp years, to cross a new year.

t1_q_sec_l, t2_q_sec_lfloat, optional

Low parts of t1_q_sec and t2_q_sec [s], for window ends built as (high, low) pairs with EpochArray._add_duration().

Returns:
f_intfloat

Integrated frequency over the query window, in Hz s.

auxdict

Auxiliary debug quantities (segment boundaries, per-segment frequencies, day-span flag, etc.).

Raises:
RampTableManager.RampCoverageError

If the ramp table is empty or t1 precedes its first record.

RampTableManager.RampTableYearError

If the ramp table or the window crosses a new year and the ramp or query years are not given.

Notes

Ramp records and query epochs are mapped onto one continuous time axis counted from the first ramp day, so windows and ramp segments may cross midnight, and a new year when the years are given. The last ramp record is extrapolated past its epoch.

The window ends stay (high, low) pairs and every width is a difference of nearby epochs, so the integral keeps the window to ~1e-13 s. A float second of day resolves only ~7e-12 s at 5e4 s, and f_T times that is ~0.05 cycles at X band, ~1 mHz on 60 s Doppler.

exception RampCoverageError#

Bases: Exception

The ramp table does not cover the requested integration window.

Raised by integrate() when the table is empty or the window starts before the first ramp record, where the transmit frequency is undefined. Integrating anyway would return a zero count, and a computed measurement of exactly 0.0 that downstream code cannot distinguish from a real one.

exception RampTableYearError#

Bases: ValueError

The ramp table or the window crosses a new year, but no years were given.

Raised by integrate(). Days of year alone cannot place day 1 after day 365 (or 366), so the integration would be a year off.