Repository navigation
Conversation
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #31
The constructor of Baseline takes a list of observations associated with a given station. Each
Observationobject includes atime.Timeobject 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
tstampsattribute of aBaselineobject is atime.Timeobject 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 eachobservation.tstampsobject, then merging them all into a singletime.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.