Skip to content

Combining time stamps in Baseline constructor - #32

Merged
alfonsoSR merged 3 commits into
developfrom
fix/31
Sep 29, 2026
Merged

alfonsoSR merged 3 commits into
developfrom
fix/31

Conversation

@alfonsoSR

Copy link
Copy Markdown
Owner

Fixes #31

The constructor of Baseline takes a list of observations associated with a given station. Each Observation object includes a time.Time object with a list of time stamps from all the scans associated with observations performed from a given station. These time stamps are in UTC at the instantaneous, tectonic-corrected position of the station.

The tstamps attribute of a Baseline object is a time.Time object containing the time stamps of all the observations performed from that baseline, in UTC at the tectonic-corrected location of the station, and sorted from first to last. When multiple observations are available for a given baseline, combining and sorting their time stamps requires first removing the location information from each observation.tstamps object, then merging them all into a single time.Time, and then updating this last object with the location information.

In version 1.2.11, we found an issue (#31) with this process. The code would only work when a baseline had multiple observations, and fail otherwise. Having fixed this, this test is meant to ensure that the Baseline constructor works regardless of whether the baseline has one or many observations.

The constructor of Baseline takes a list of observations associated with a given station. Each `Observation` object includes a `time.Time` object with a list of time stamps from all the scans associated with observations performed from a given station. These time stamps are in UTC at the instantaneous, tectonic-corrected position of the station.

The `tstamps` attribute of a `Baseline` object is a `time.Time` object containing the time stamps of all the observations performed from that baseline, in UTC at the tectonic-corrected location of the station, and sorted from first to last. When multiple observations are available for a given baseline, combining and sorting their time stamps requires first removing the location information from each `observation.tstamps` object, then merging them all into a single `time.Time`, and then updating this last object with the location information.

In version 1.2.11, we found an issue (#31) with this process. The code would only work when a baseline had multiple observations, and fail otherwise. This branch fixes this issue by modifying the approach to combining the time stamps of the different observations in the constructor of Baseline and defining a new unit test to ensure that the solution works in both scenarios (multiple observations per baseline or a single one)
@alfonsoSR
alfonsoSR merged commit 5d525cf into develop Sep 29, 2026
11 of 18 checks passed
@alfonsoSR
alfonsoSR deleted the fix/31 branch September 29, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

[BUG]: Issue with numpy when running pypride main

1 participant