Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
It appears that the UNIT keyword in the spawn code is not yet implemented. For example, in attempting to read a compressed FITS file:
HGDL> result2 = mrdfits("data_2010-07-26_00-12-00_magnetogram.fits",1,hdr)
Keyword parameter UNIT not allowed in call to: SPAWN
% Keyword parameter UNIT not allowed in call to: SPAWN
% Error occurred at: FXPOSIT 197 /usr/local/Healpix_2.15a//src/idl/zzz_external/astron/fxposit.pro
% MRDFITS 2664 /usr/local/Healpix_2.15a//src/idl/zzz_external/astron/mrdfits.pro
% Execution halted at: MRDFITS 197 /usr/local/Healpix_2.15a//src/idl/zzz_external/astron/mrdfits.pro
This is a limitation I've run into several times, and its not clear to me how to create a hack to get around it. In this case, the code to read the fits file wants to launch a subprocess to uncompress the image (via funpack). I'm using GDL 0.9 on an Ubuntu box. It would be great to see SPAWN fixed, but in the short term are there any suggestions for getting around this problem? As a temporary replacement, I'd need a way of running a program external to GDL, and feeding its output through a pipe so that it can be read via a unit in GDL.
Well, it was a bit of a pain to figure out how, but I hacked GDL to implement the UNIT keyword in the SPAWN command - its just too useful!
Also, on a related note, I have also implemented numpy support in the GDL PYTHON command. That is, a python function can return a numpy array object into GDL via the PYTHON command. This was not really all that difficult. I can create and post diff upon request.
Hello, please do post the two patches on the tracker! Thanks!
The patch file is the result of the diff command:
diff -b -B -r -d gdl-0.9 gdl-0.9_ggh-added-spawn-unit_ggh-added-numpy
The patch file is here:
I've just added the SPAWN-UNIT patch to the CVS.
Please do test it if possible.
Just for the record, all NumPy related fixes were already in the CVS.