Thanks to visit codestin.com
Credit goes to github.com

Skip to content

IERS-A data emitted IERSDegradedAccuracyWarning in astropy 5.3.3 but throws ValueError in astropy 7 or later #19823

Description

@pllim

From https://groups.google.com/g/astropy-dev/c/m8pKTPvetF0

Heiko S.

We use astropy for user scripts in a telescope control system, otherwise erfa in the CS code. A change of Linux distribution brought us an upgrade of astropy from 5.3.3 to 7.01.

Our IERS data update strategy is to download IERS-A data regularly. So we aim for the highest precision. But if that fails (e.g. due to network access restrictions), and cached data is older than auto_max_age, then we would like to get only warnings logged by astropy.

This worked fine in the old version of astropy, with setting iers.conf.iers_degraded_accuracy = "warn", which yielded an IERSDegradedAccuracyWarning. It seems that with the inclusion of IERS-A data in astropy (commit 2da17a6 from #16187 that was follow-up for #14819), this config attribute is no longer applied to cached IERS-A data, but only to the IERS data that came already with the astropy installation. Instead of printing the warnings, astropy now fails with ValueError, which we don't want.

A possible workaround would be to set a very large auto_max_age, but then we don't even get the warnings that we actually like to see.

My question is, would it be possible to add a new config attribute that applies to cached IERS-A data, e.g. iers.conf.iers_degraded_accuracy_cached? Or to apply the existing attribute iers_degraded_accuracy to all IERS data sources (installation, previous download)? Or maybe I'm lacking imagination and one could get the old behavior back in a different way, without change in astropy?

Tim. Pickering

That data is now managed by the astropy-iers-data package. so to keep the data up to date, use pip to upgrade that package regularly. For our systems, I run a daily cron job to do that.

Marten van Kerkwijk

I think you are right that the different sources of IERS A data should be treated the same way, i.e., that the regression you are seeing should be considered a bug that we should fix.

(Indeed, if you are willing and able to write a PR that applies the existing iers_degraded_accuracy also to co-installed data, that would be very welcome!)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions