Skip to content

Commit

Permalink
Increasing LST tolerance, updating docstrings and fixing CHANGELOG.
Browse files Browse the repository at this point in the history
  • Loading branch information
kartographer committed Nov 4, 2023
1 parent 5f3cd4b commit 01c5b3d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 21 deletions.
23 changes: 13 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,23 @@ All notable changes to this project will be documented in this file.

## [Unreleased]

## [2.4.1] - 2023-10-13

### Added
- Added a `check_surface_based_positions` positions method for verifying antenna
positions are near surface of whatever celestial body their positions are referenced to
(either the Earth or Moon, currently).

### Changed
- Increased the tolerance to 75 mas (equivalent to 5 ms time error) for a warning about
values in `lst_array` not conforming to exceptations for `UVData`, `UVCal`, and `UVFlag`
(was 1 mas) inside of `check`. Additionally, added a keyword to `check` enable the
tolerance value to be user-specified.
- Changed the behavior of checking of telescope location to look at the combination of
`antenna_positions` and `telescope_location` together for `UVData`, `UVCal`, and `UVFlag`.
Additionally, failing this check results in a warning (was an error).

## [2.4.1] - 2023-10-13

### Added
- Added a `uvw_track_generator` method within `utils` for calculating the expected
uvws (and a few other values) without needing to instantiate a whole `UVData` object.
- Added a convenience function called `compare_value` in `UVParameter` that enables
Expand All @@ -23,14 +34,6 @@ file to the new `mwa_metafits_file` parameter.
- Support for setting the astrometry library for various object methods including `set_lsts_from_time_array`, file read methods and others.
- Properly round-trip the telescope frame through UVH5, UVFITS and MS files.

### Changed
- Increased the tolerance to 15 mas for a warning about values in `lst_array` not conforming
to exceptations for `UVData`, `UVCal`, and `UVFlag` (was 1 mas) inside of `check`, additionally
adding a keyword to enable the tolerance value to be specified.
- Changed the behavior of checking of telescope location to look at the combination of
`antenna_positions` and `telescope_location` together for `UVData`, `UVCal`, and `UVFlag`.
Additionally, failing this check results in a warning (was an error).

### Fixed
- A bug in apparent coordinate calculation that resulted in small errors/loss of
precision due to the way times were passed when using `erfa` astrometry library.
Expand Down
7 changes: 5 additions & 2 deletions pyuvdata/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,11 @@

# standard angle tolerance: 1 mas in radians.
RADIAN_TOL = 1 * 2 * np.pi * 1e-3 / (60.0 * 60.0 * 360.0)
# standard lst time tolerance: 1 ms (15 mas in radians)
LST_RAD_TOL = 1 * 2 * np.pi * 1e-3 / (86400.0)
# standard lst time tolerance: 5 ms (75 mas in radians), based on an expected RMS
# accuracy of 1 ms at 7 days out from issuance of Bulletin A (which are issued once a
# week with rapidly determined parameters and forecasted values of DUT1), the exact
# formula for which is t_err = 0.00025 (MJD-<Bulletin A Release Data>)**0.75 (in secs).
LST_RAD_TOL = 2 * np.pi * 5e-3 / (86400.0)

# fmt: off
# polarization constants
Expand Down
8 changes: 5 additions & 3 deletions pyuvdata/uvcal/uvcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1216,9 +1216,11 @@ def check(
Tolerance level at which to test LSTs against their expected values. If
provided as a float, must be in units of radians. If set to None, the
default precision tolerance from the `lst_array` parameter is used (1 mas).
Default value is 15 mas, which is set by the predictive uncertainty in IERS
calculations of DUT1 (of order 1 ms), which for some observatories sets the
precision with which these values are written.
Default value is 75 mas, which is set by the predictive uncertainty in IERS
calculations of DUT1 (RMS is of order 1 ms, with with a 5-sigma threshold
for detection is used to prevent false issues from being reported), which
for some observatories sets the precision with which these values are
written.
Returns
-------
Expand Down
8 changes: 5 additions & 3 deletions pyuvdata/uvdata/uvdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -3241,9 +3241,11 @@ def check(
Tolerance level at which to test LSTs against their expected values. If
provided as a float, must be in units of radians. If set to None, the
default precision tolerance from the `lst_array` parameter is used (1 mas).
Default value is 15 mas, which is set by the predictive uncertainty in IERS
calculations of DUT1 (of order 1 ms), which for some observatories sets the
precision with which these values are written.
Default value is 75 mas, which is set by the predictive uncertainty in IERS
calculations of DUT1 (RMS is of order 1 ms, with with a 5-sigma threshold
for detection is used to prevent false issues from being reported), which
for some observatories sets the precision with which these values are
written.

Returns
-------
Expand Down
8 changes: 5 additions & 3 deletions pyuvdata/uvflag/uvflag.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,11 @@ def check(
Tolerance level at which to test LSTs against their expected values. If
provided as a float, must be in units of radians. If set to None, the
default precision tolerance from the `lst_array` parameter is used (1 mas).
Default value is 15 mas, which is set by the predictive uncertainty in IERS
calculations of DUT1 (of order 1 ms), which for some observatories sets the
precision with which these values are written.
Default value is 75 mas, which is set by the predictive uncertainty in IERS
calculations of DUT1 (RMS is of order 1 ms, with with a 5-sigma threshold
for detection is used to prevent false issues from being reported), which
for some observatories sets the precision with which these values are
written.
Returns
-------
Expand Down

0 comments on commit 01c5b3d

Please sign in to comment.