Starlink / starlink-pywrapper

Idiomatic access to Starlink applications from Python.
14 stars 2 forks source link

Calls to get_adam_hds_values result in starlink.hds.error #3

Open pscicluna opened 1 year ago

pscicluna commented 1 year ago

Hi! The title pretty much describes the issue, but I'll elaborate a bit.

I'm doing SCUBA-2 reduction using the wrappers. This involves traversing the directory tree as we make different products and move them around. tmpADAM* is produced at the start of the whole script in the root of the directory structure, which we subsequently move away from to be in the same dir as the actual data. Every call to a starlink command results in an error from get_adam_hds_values of starlink.hds.error: HDS file is invalid. HDS control header is corrupt

For the most part, I don't care about the return of the method, so I can just wrap the calls in a

try: 
    ... 
except starlink.hds.error as e: 
    pass

but in the rare cases where I do actually want the return information in python this is a problem. Do you have any idea what the cause could be and how to either work around it or stop it completely?

sfgraves commented 1 year ago

It definitely shouldn't be raising an error every time it runs -- it sounds like the hds library is not working, which is used to open the tmpADAM*/.sdf file and read the output file. Without that part working I don't think there's any way to access the return information.

Currently I'm having some issues getting the starlink-pyndf stuff to build on my non-intel Mac, so I don't have a solution right now. What system are you running on? If its linux I'll see if I can get a working build there to test.

pscicluna commented 1 year ago

I'm encountering this issue on CANFAR, running Ubuntu 20.04.4 LTS. STARLINK seems to run fine, just this bug keeps showing up.