Skip to content

Commit 8f4147b

Browse files
committed
Detail R1 and R3 requirements for VEX files
1 parent e527a01 commit 8f4147b

2 files changed

Lines changed: 78 additions & 3 deletions

File tree

docs/source/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from importlib import metadata
44
from pride import __version__
55

6+
# __version__ = "1.2.4"
67

78
BASE_DIR: Path = Path(__file__).parent.parent.parent
89
SOURCE_DIR: Path = BASE_DIR / "src"
@@ -53,6 +54,10 @@
5354
autoapi_root = "api"
5455
autoapi_add_toctree_entry = False
5556

57+
rst_epilog = f"""
58+
.. |__version__| replace:: {__version__}
59+
"""
60+
5661
# -- Options for HTML output -------------------------------------------------
5762
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
5863

docs/source/vex-requirements.rst

Lines changed: 73 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,77 @@ Requirements on VEX files
33

44
.. warning:: This document is a work in progress!
55

6-
In order to be processed with PRIDE, a VEX file must fulfill the following requirements
6+
In order to be compatible with PRIDE, a VEX file must comply with some additional requirements. The purpose of this page is to provide an overview of these requirements, and describe the expected behavior of the program when they are not met.
77

8-
* It must contain a ``$CLOCK`` section, specifying clock parameters for all the antennas involved in the experiment.
9-
* Each source must have an attribute ``source_type``, which must be set to either ``"target"`` or ``"calibrator"``.
8+
9+
.. rubric:: VEX files must comply with the following requirements:
10+
11+
1. Each source must have its ``source_type`` attribute set to ``"target"`` or ``"calibrator"``.
12+
2. The VEX file must contain a ``$CLOCK`` section.
13+
3. Consecutive scans should be separated by, at least, one second.
14+
15+
Each of these requirements is described with more detail in its corresponding section:
16+
17+
.. contents::
18+
:local:
19+
20+
21+
Source type specification [R1]
22+
------------------------------
23+
24+
When designing an experiment to observe a spacecraft, it is common to discretize its trajectory into a series of points, and treat each of them as an independent source. Although each of these sources is usually given a different name, the program should understand that they refer to the same object. Building upon the assumption that each VEX file can only contain observations of one near-field source, PRIDE relies on the ``source_type`` attribute of the sources to do this.
25+
26+
During the first steps of the processing, PRIDE parses the VEX file to identify all the sources involved in the experiment, and creates a data structure for each of them. Each source of ``calibrator`` type is assigned its own data structure, identified by the source name in the VEX file. However, all the sources of ``target`` type are grouped under a single data structure, identified by the target name the user specified in the configuration file. When the ``source_type`` attribute is not specified in the VEX file, or it takes an unexpected value, the program raises an error, and terminates the execution.
27+
28+
Presence of $CLOCK section [R2]
29+
--------------------------------
30+
31+
To be added in a future version
32+
33+
Separation between consecutive scans [R3]
34+
------------------------------------------
35+
36+
The ``$SCAN`` section of a VEX file contains a sequence of scans for the experiment. Each scan contains metadata about its reference epoch, its target, and operation mode; as well as collections of recording data for each of the involved stations.
37+
38+
.. code-block::
39+
:caption: Example of scan defintion in VEX file
40+
41+
scan No0028;
42+
start=2023y292d15h35m00s; mode=sess323.X256R; source=J1720-2258;
43+
station=Wb: 0 sec: 180 sec: 0.000000000 GB: : : 1;
44+
station=Ef: 0 sec: 180 sec: 0.000000000 GB: : &n : 1;
45+
station=Mc: 0 sec: 180 sec: 0.000000000 GB: : &n : 1;
46+
station=O6: 0 sec: 180 sec: 0.000000000 GB: : &n : 1;
47+
station=Tr: 0 sec: 180 sec: 0.000000000 GB: : &n : 1;
48+
station=Hh: 0 sec: 180 sec: 0.000000000 GB: : : 1;
49+
station=Wz: 1 sec: 180 sec: 0.000000000 GB: : &n : 1;
50+
endscan;
51+
52+
In what matters to this section, the relevant components of the scan are its reference epoch (2023y292d15h35m00s), and the time offsets of each of the stations, specified in the second and third columns. A station with offsets ``dt_start`` and ``dt_end``, will record data between ``ref_epoch + dt_start``, and ``ref_epoch + dt_end``. For the example shown above, all the stations will end their recordings 3 minutes after the reference epoch, but ``Wz`` will start one second later than the others.
53+
54+
We say that consecutive scans ``A`` and ``B`` overlap, when a station shared by both of them starts recording in ``B``, before it finishes recording in ``A``
55+
56+
.. math::
57+
58+
\text{ref_epoch}_A + dt_{\text{end,A}} \gt \text{ref_epoch}_B + dt_{\text{start,B}}
59+
60+
We say that the scans ``A`` and ``B`` are zero-gap, when a station shared by both of them starts recording in ``B`` exactly when it finishes recording in ``A``
61+
62+
.. math::
63+
64+
\text{ref_epoch}_A + dt_{\text{end,A}} = \text{ref_epoch}_B + dt_{\text{start,B}}
65+
66+
67+
An overlapping between scans results into an error that terminates the execution. However, when zero-gap scans are detected, PRIDE raises a warning, and increments the initial offset of the affected stations by one second.
68+
69+
.. dropdown:: Rationale for scan separation requirement
70+
71+
The internal architecture of PRIDE is built on top of a small set of concepts, which provide an abstract representation of a VLBI experiment. Three of these concepts are:
72+
73+
- Scan: Contains a collection of timestamps in which a source was recorded from a station
74+
- Observation: Collects the timestamps of all the scans associated with a station-source pair
75+
- Baseline: Collects the timestamps of all the scans associated with a station
76+
77+
The reason for these groupings is vectorization. Quantities that do not depend on the source, but only on the station and the epoch, (i.e. rotation matrix from ITRF to Topocentric frame) are calculated at the baseline level, resulting into a large array covering the time span of several observations. When an observation object needs the rotation matrix at one of its timestamps, it reads it from the baseline's array instead for calculating it. Our current implementation for the lookup method requires timestamps to be unique at the baseline level.
78+
79+
One of the precomputed quantities is the derivative of the rotation matrix between ITRF and the local topocentric frame, which is calculated numerically by considering the difference between the matrices at :math:`\pm` 1 seconds with respect to the timestamp. To ensure the uniqueness of timestamps at the baseline level, we need consecutive scans to be separated by more than one second, which is the justification for this requirement.

0 commit comments

Comments
 (0)