TTL Coefficient Source

TTL Source Interface

This module provides an interface for providing TTL coefficients as function of time.

The TTLSource class represents and abstract interface covering both static and time-varying TTL coefficients. The main purpose is for use inside the simulator, but it is also intended for reconstructing the TTL coefficients in postprocessing.

class lisainstrument.ttl.ttl_source.TTLSource[source]

Abstract interface for TTL coefficients as functions of time

The quantites are provided as callable functions wrapped in FuncOfTime instances. Constant functions are to be represented by ConstFuncOfTime instances. There are also convenience methods providing a simple numpy array based interface for use in postprocessing applications.

abstract c_ij_eta_rx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain receiving beam TTL coefficient along pitch angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

abstract c_ij_eta_tx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain outgoing beam TTL coefficient along pitch angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

abstract c_ij_phi_rx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain receiving beam TTL coefficient along yaw angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

abstract c_ij_phi_tx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain outgoing beam TTL coefficient along yaw angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

eval_c_ij_eta_rx(mosa: MosaID | str, t: ndarray) ndarray[source]

Evaluate c_ij_eta_rx for given MOSA and time grid

Parameters:
  • mosa – For which MOSA to return TTL coefficient.

  • t – Array with time grid

Returns:

TTL coefficient samples for given times

eval_c_ij_eta_tx(mosa: MosaID | str, t: ndarray) ndarray[source]

Evaluate c_ij_eta_tx for given MOSA and time grid

Parameters:
  • mosa – For which MOSA to return TTL coefficient.

  • t – Array with time grid

Returns:

TTL coefficient samples for given times

eval_c_ij_phi_rx(mosa: MosaID | str, t: ndarray) ndarray[source]

Evaluate c_ij_phi_rx for given MOSA and time grid

Parameters:
  • mosa – For which MOSA to return TTL coefficient.

  • t – Array with time grid

Returns:

TTL coefficient samples for given times

eval_c_ij_phi_tx(mosa: MosaID | str, t: ndarray) ndarray[source]

Evaluate c_ij_phi_tx for given MOSA and time grid

Parameters:
  • mosa – For which MOSA to return TTL coefficient.

  • t – Array with time grid

Returns:

TTL coefficient samples for given times

abstract property tstart: float

Start of valid time window [s]

abstract property tstop: float

End of valid time window [s]

Static TTL Source

This module provides a trivial implementation of the TTLSource interface returning static values

class lisainstrument.ttl.ttl_source_static.StaticTTLCoeffs(*, c_ij_phi_rx: dict[MosaID, float], c_ij_phi_tx: dict[MosaID, float], c_ij_eta_rx: dict[MosaID, float], c_ij_eta_tx: dict[MosaID, float])[source]

Data class holding static TTL coefficients

class lisainstrument.ttl.ttl_source_static.TTLSourceStatic(coeffs: StaticTTLCoeffs, tstart: float, tstop: float)[source]

Implmentation of TTLSource interface to represent static TTL

c_ij_eta_rx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain receiving beam TTL coefficient along pitch angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

c_ij_eta_tx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain outgoing beam TTL coefficient along pitch angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

c_ij_phi_rx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain receiving beam TTL coefficient along yaw angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

c_ij_phi_tx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain outgoing beam TTL coefficient along yaw angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

property tstart: float

Start of valid time window [s]

property tstop: float

End of valid time window [s]

Time-dependent TTL Source

This module provides an implementation of the TTLSource interface based on interpolating time series

class lisainstrument.ttl.ttl_source_interp.TTLCoefficients(*, t_sample: ndarray, order: int, c_ij_phi_rx: dict[MosaID, ndarray], c_ij_phi_tx: dict[MosaID, ndarray], c_ij_eta_rx: dict[MosaID, ndarray], c_ij_eta_tx: dict[MosaID, ndarray])[source]

Time series for 24 coefficients for a linear tilt-to-length model [m/rad].

c_ij_eta_rx: dict[MosaID, ndarray]

Local (received beam) pitch TTL coefficients [m/rad] per MOSA.

c_ij_eta_tx: dict[MosaID, ndarray]

Distant (sent beam) pitch TTL coefficients [m/rad] per MOSA.

c_ij_phi_rx: dict[MosaID, ndarray]

Local (received beam) yaw TTL coefficients [m/rad] per MOSA.

c_ij_phi_tx: dict[MosaID, ndarray]

Distant (sent beam) yaw TTL coefficients [m/rad] per MOSA.

order: int

Interpolation order used for the TTL coefficients in the instrument simulation.

t_sample: ndarray

Sampling times of the irregularly spaced time-varying TTL coefficients.

class lisainstrument.ttl.ttl_source_interp.TTLSourceInterp(c_ij_phi_rx: dict[MosaID, TimeSeriesNumpy], c_ij_phi_tx: dict[MosaID, TimeSeriesNumpy], c_ij_eta_rx: dict[MosaID, TimeSeriesNumpy], c_ij_eta_tx: dict[MosaID, TimeSeriesNumpy], order: int = 5)[source]

Implmentation of TTLSource representing time-varying interpolated TTL coefficients

This uses spline interpolation to provide TTL coefficients as function based on interpolated sampled values.

c_ij_eta_rx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain receiving beam TTL coefficient along pitch angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

c_ij_eta_tx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain outgoing beam TTL coefficient along pitch angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

c_ij_phi_rx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain receiving beam TTL coefficient along yaw angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

c_ij_phi_tx(mosa: MosaID) FuncOfTime | ConstFuncOfTime[source]

Obtain outgoing beam TTL coefficient along yaw angle.

Parameters:

mosa – For which MOSA to return TTL coefficient.

Returns:

TTL coefficient as function of time

property tstart: float

Start of valid time window [s]

property tstop: float

End of valid time window [s]

lisainstrument.ttl.ttl_source_interp.make_ttl_source_interp(ttldata: TTLCoefficients) TTLSourceInterp[source]

Set up interpolating TTL source from TTLCoefficients instance

Reading TTL Coefficient files

This module provides a reader for files with time-varying TTL coefficients.

lisainstrument.ttl.ttl_file_reader.load_ttl_file(path: str | Path) TTLCoefficients[source]

Read TTL samples from file

Creating TTL Coefficient files

This module provides a dataclass and a writer for files with time-varying TTL coefficients.

lisainstrument.ttl.ttl_file_writer.create_ttl_file(data: TTLCoefficients, path: str | Path) None[source]

This function (same name as module) provides a writer for files with time-varying TTL coefficients.