Experiment#

class pride.experiment.Experiment(setup: str | pathlib.Path)#

VLBI experiment

load_sources(vex: pride.io.Vex) dict[str, pride.source.Source]#

Load sources from VEX file

Parses the SOURCE section of the VEX file and retrieves the name, type and coordinates of all the sources involved in the experiment. NearFieldSource and FarFieldSource objects are initialized for each source based on the ‘source_type’ read from the VEX, with the program raising an error if this attribute is not set.

Parameters:

vex – Interface to VEX file

Returns:

Dictionary with source name as key and Source object as value.

initialize_displacement_models() list[pride.displacements.core.Displacement]#

Initialize displacement models

Iterates over the ‘Displacements’ section of the configuration file and, for each of the names set to ‘true’, it looks for an equally named class in the ‘DISPLACEMENT_MODELS’ dictionary. If the class is not found, an error is raised indicating that a requested displacement is not available, otherwise, the displacement is initialized with the experiment. Initialization involves calling the ‘ensure_resources’ method of the displacement object.

Returns:

List of ‘empty’ (no resources loaded) displacement objects

initialize_delay_models() list[pride.delays.core.Delay]#

Initialize delay models

Iterates over the ‘Delays’ section of the configuration file and, for each value with ‘calculate’ set to ‘true’, it looks for an equally named class in the ‘DELAY_MODELS’ dictionary. If the class is not found, an error is raised indicating that a requested delay is not available, otherwise, the delay is initialized with the experiment. Initialization involves calling the ‘ensure_resources’ and ‘load_resources’ methods of the delay object.

Returns:

List of delay objects equiped with resources

collect_observation_bands_and_timestamps(vex: pride.io.Vex) tuple[dict[str, dict[str, pride.types.Band]], dict[str, dict[str, list[datetime.datetime]]]]#

Group scan data into observations

An Observation object collects all the scans of a source from a given station. This function goes over the SCHED section of the VEX file and groups the scan information per station and source. The output of this function is the input for observation initialization.

Parameters:

vex – Interface to VEX file

Return observation_bands:

Two-level dictionary containing the band

of each observation, indexed by station and source. :return observation_tstamps: Two-level dictionary containing the timestamps of each observation, indexed by station and source.

initialize_baselines(vex: pride.io.Vex, ignored_stations: list[str]) list[pride.experiment.baseline.Baseline]#

Initialize baselines

The function creates an empty Baseline object for each station involved in the experiment, and then populates them with all the observations performed from that station.

Information about observations is obtained by grouping the data of the scans listed in the VEX file per station-source pair. Check the __collect_observation_bands_and_timestamps function for more details.

Parameters:
  • vex – Interface to VEX file

  • ignored_stations – List of stations to ignore

Return baselines:

List of Baseline objects populated with observations.

load_clock_offsets()#

Load clock offset data from VEX

spice_kernels() Generator#

Context manager to load SPICE kernels

save_output() None#