Closed David-McKenna closed 4 years ago
Hi David, just to be clear dreamBeam has not been tested (yet :-) with python3. I think this is a python3 issue between casacore and dB. Having said I really appreciate the python3 treatment :-) You might want to try with python2.7 just so that we are on the same page...
Hey Tobia,
I just spun up a docker container with python 2 and ran into the same error -- it looks like this is completely unrelated to dreamBeam, but is a side effect of python-casacore's pip wheel not containing all of the casa configs it relies upon, so a quick apt install python-casacore python3-casacore
seems to have resolved the issue in both Python 2 and 3, apologies for not looking into that sooner!
Cheers
Aha. Ya, there are a few external files that casacore needs. The warnings e.g. are due to an external ephemeris file. If you still get them you need to update (can help with details)
David, I tested this and I discovered that it is an issue in the later releases of python-casacore. I was running a version 2.2.1 before without problems, but when I switched to latest 3.3.1 I got the RuntimeError you quote above. I then discovered that if you do the exact same call a second time it works correctly. Therefore I put a try-except block around it for now as a workaround, until the casacore developers can fix this.
Also tested that it works with python3, at least "pointing_jones" command.
Hey Tobia,
Sorry for the slow response to this and the PR comments; I was a bit distracted near the end of last week and wasn't checking my email.
Cheers for looking into it, that's some odd behaviour, hopefully they can fix it soon.
And thanks for cleaning up that PR, I was looking for a quick fix rather than a proper implementation at the time, your improved code is definitely a better approach than what I submitted! I'll let you know if I run into any other py2/3 oddities in the meantime.
No probs David. I am just about to push intial documentation, which should help to get it to work; so hang in there :-)
Hey Tobia,
Same command as before with the pointing_jones.py script:
Raises an error after a call to casacore:
Unforetunately I'm not familiar with Casacore so I can't debug this issue too easily, but if you want me to try get the contents of the args before the call I'll have a look into it.
Cheers