Frequency Plan

Frequency plan interface

Abstract interface for providing frequency plans.

The FreqPlanSource abstract base class provides the interface for getting the frequency plans for the different MOSAa as function of time. The interface is based on numpy arrays.

An implementation providing data from frequency plan files can be found in the lisainstrument.freqplan.fplan_source_interp module.

class lisainstrument.freqplan.fplan_source.FreqPlanSource[source]

Abstract base class for providing frequency plan data.

The interface consists of a single method beatnote_for_mosa() computing locking beatnodes as function of time for a given MOSA.

MOSAs are identified by enum class MosaID from the module orbiting.constellations_enums.

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

Get locking beatnotes as function of time for given MOSA

This returns a function that accepts 1D numpy arrays with times and returns a 1D numpy array with the locking beatnotes at the given times. Times refer to the [TODO: CHECK] time frame.

In case of constant beatnotes, the constant is returned as a ConstFuncOfTime instance, else as FuncOfTime.

Parameters:

mosa – which mosa to get locking for

Returns:

Locking beatnotes as function of time

Interpolated frequency plans

Implementation of FreqPlanSource based on interpolating data from FreqPlanFile

The FreqPlanSourceFile makes data in a FreqPlanFile avaialble via the higher level FreqPlanSource interface. This includes interpolating the data as needed. Currently, only linear interpolation is supported.

class lisainstrument.freqplan.fplan_source_interp.FreqPlanSourceFile(fpf: FreqPlanFile, locks: dict[MosaID, LockTypeID], lock_config: str, time_offset: float)[source]

Provides data in FreqPlanFile via high-level interface FreqPlanSource

The data in a FreqPlanFile is augmented with further parameters to specify locking configuration, the lock types of each MOSA, and a time offset. The time coordinate used in the interface is the one in the frequency plan file plus the constant time offset. To provide the frequency plan as a function of time, the data in the file is linearly interpolated.

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

Implements abstract method FreqPlanSource.beatnote_for_mosa

Frequency plan files

This module provides a class for reading frequency plan file data.

The FreqPlanFile class represents a frequency plan file, allowing to load the raw data (meaning not resampled) for a given locking configuration and MOSA.

class lisainstrument.freqplan.fplan_file.FreqPlanFile(path: Path | str)[source]

Represents a frequency plan file, format version 1.1.*

The interface allows loading of the sci and ref locking beatnotes and the sample times. To get the beatnotes, one has to provide the locking configuration and MOSA. The locking is currently specified via a string with possible values that are used in the file format. The MOSAs are specified using the MosaID enum class from orbiting.constellation_enums.

Instances can be used as context manager. Further, there is experimental support for pickling/unpickling instances in a multiprocessing context.

close() None[source]

Close file

property format_version: Version

The version of the file format

load_ref_hz(lock_config: str, mosa: MosaID) ndarray[tuple[int], dtype[number]][source]

Load RFI beatnotes

Although the data is only stored for left MOSAs, this method can be called for all MOSAs. For the case of a right MOSA, the correct result is obtained from the left MOSA on the same SC, which differs only by the sign.

Parameters:
  • lock_config – Name of locking configuration

  • mosa – Which MOSA to get data for

Returns:

beatnote samples [Hz] as 1D numpy array

load_sci_hz(lock_config: str, mosa: MosaID) ndarray[tuple[int], dtype[number]][source]

Load ISI beatnotes

Parameters:
  • lock_config – Name of locking configuration

  • mosa – Which MOSA to get data for

Returns:

beatnote samples [Hz] as 1D numpy array

property sample_period: float

Constant sampling period used in the file [s]

property sample_rate: float

Constant sample rate used in the file [Hz]

property time_samples: ndarray[tuple[int], dtype[number]]

Sample times as given in file without additional offsets.