ratt-ru / QuartiCal

CubiCal, but with greater power.
MIT License
7 stars 4 forks source link

Cannot read leap second table TAI_UTC - `casadata` dependency for parallactic angles #330

Open JSKenyon opened 4 months ago

JSKenyon commented 4 months ago

Describe the bug QuartiCal will fail if parallactic angles are enabled on a system which doesn't have the casadata files and a properly configured .casarc as the data files will not be found. @AKHughes1994 reported this issue in #328.

To Reproduce Run QC on a system without/with a misconfigured .casarc file.

Workaround Download the measures data and add/update .casarc. The following is an example but be careful if .casarc already exists. You could also adjust the paths accordingly if you didn't want the data to live in ~/measures.

https://github.com/ratt-ru/QuartiCal/blob/09829908551ce18211e546a9053023c50b5bce7b/.github/workflows/ci.yaml#L81-L83

Expected behavior QuartiCal should work/provide an informative error message.

Version Python3.10, main

bennahugo commented 4 months ago

The casadata from pip I think is meant for casatools 6. Unfortunately casacore and casatools seems to be using a different mechanism for specifying data paths (essentially .casarc has been replaced by a python configuration script for some reason I don't quite fathom). We should probably completely ditch casa tooling - parang is dead simple to compute with e.g. ephem.

On Wed, Feb 28, 2024 at 10:28 AM JSKenyon @.***> wrote:

Describe the bug QuartiCal will fail if parallactic angles are enabled on a system which doesn't have the casadata files and a properly configured .casarc as the data files will not be found. @AKHughes1994 https://github.com/AKHughes1994 reported this issue in #328 https://github.com/ratt-ru/QuartiCal/discussions/328.

To Reproduce Run QC on a system without/with a misconfigured .casarc file.

Workaround Download the measures data and add/update .casarc. The following is an example but be careful if .casarc already exists. You could also adjust the paths accordingly if you didn't want the data to live in ~/measures.

https://github.com/ratt-ru/QuartiCal/blob/09829908551ce18211e546a9053023c50b5bce7b/.github/workflows/ci.yaml#L81-L83

Expected behavior QuartiCal should work/provide an informative error message.

Version Python3.10, main

— Reply to this email directly, view it on GitHub https://github.com/ratt-ru/QuartiCal/issues/330, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4RE6RJWMVBDY5XJHPC4STYV3TEVAVCNFSM6AAAAABD5R2MYWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2TQMZYHAZTQNA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Benjamin Hugo

JSKenyon commented 4 months ago

If you have an example of this lying around I would be very interested. The measures stuff is the source of many headaches. I did look at both skyfield and astropy at some point, but I didn't really know how to evaluate their relative accuracy. I like skyfield but the coordinate conversion was fiddly.

o-smirnov commented 4 months ago

We should probably completely ditch casa tooling

Yes! Yes! Yes!

JSKenyon commented 4 months ago

See https://github.com/skyfielders/python-skyfield/issues/819 for reference.

bennahugo commented 4 months ago

See updating custom location: https://casadocs.readthedocs.io/en/stable/notebooks/external-data.html

Why they ditched a simple configuration file for a full blown python script is quite beyond me. casatools doesn't even detect standard casacore-data installed by debian anymore from my experiences updating docker tests (unless you provide the config file).

bennahugo commented 4 months ago

E.g.: https://github.com/ratt-ru/montblanc/blob/65e959599b7a1e831442259713a26179019b67f2/.ci/withoutnvcc.py3.10.docker#L125-L126