transientskp / tkp

A transients-discovery pipeline for astronomical image-based surveys
http://docs.transientskp.org/
BSD 2-Clause "Simplified" License
19 stars 14 forks source link

U/swinbank/fix test #570

Open jdswinbank opened 4 years ago

jdswinbank commented 4 years ago

Well, there's a smoking gun — the error is coming from TestEphemeris because casacore can't find its TAI_UTC data table:

======================================================================
1276ERROR: test_invalid_ephemeris (test_brightsource.TestEphemeris)
1277----------------------------------------------------------------------
1278Traceback (most recent call last):
1279  File "/home/travis/build/transientskp/tkp/tests/test_quality/test_brightsource.py", line 21, in test_invalid_ephemeris
1280    self.assertFalse(tkp.quality.brightsource.check_for_valid_ephemeris(dm))
1281  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/tkp/quality/brightsource.py", line 31, in check_for_valid_ephemeris
1282    measures.direction("SUN"), measures.direction("SUN")
1283  File "/home/travis/virtualenv/python2.7_with_system_site_packages/local/lib/python2.7/site-packages/casacore/measures/__init__.py", line 962, in separation
1284    return _measures.separation(self, m0, m1)
1285RuntimeError: 2019-10-12 23:31:16   SEVERE  MeasTable::dUTC(Double) (file /build/casacore-3.1.1/measures/Measures/MeasTable.cc, line 4281)  Cannot read leap second table TAI_UTC

Out of time to look at this further for now. @gijzelaerr , I think (??) this data should be provided by the casacore-data package — any idea why it's not being found?

gijzelaerr commented 4 years ago

maybe it is outdated?

gijzelaerr commented 4 years ago

ah yes, this uses my new binary wheel of python-casacore, which isn't configured to look at the right spot. a .casacorerc (i think) file with the path to the casacore-data content needs to be created.

gijzelaerr commented 4 years ago

https://github.com/casacore/python-casacore/issues/181

tammojan commented 4 years ago

a .casacorerc (i think) file with the path to the casacore-data content needs to be created.

Almost right: it should be ~/.casarc. See description in casacore/python-casacore#181