Noesys-Transform question [message #19447] |
Fri, 24 March 2000 00:00 |
Irene Barg
Messages: 4 Registered: December 1998
|
Junior Member |
|
|
Hello,
System: Mac G4, 450MHz 512MB RAM OS9
IDL 5.2, Noesys V2.0, Transform V3.5
I want to call an external C routine from Transform. The
online documentation for Transform, "Using External Functions"
says ..."External functions are limited in the number and
types of argumenst they can accept." Specifically, Transform
only supports passing arguments of the following data structure:
typedef struct scope_array
{
float cval, /* constant value of kind = DS_CONSTANT */
*rows, /* axis scale values along matrix row */
*cols, /* axis scale values along matrix column */
*vals; /* matrix of dependent data */
long ncols, /* number of cols in matrix */
nrows; /* number of rows in matrix */
char kind; /* DS_ERROR, DS_CONSTANT, DS_ARRAY */
}
scope_array;
You call your external function like:
xfn(scope_array *left,scope_array *right,scope_array *answer)
The first two arguments must be of type Transform dataset.
Is this the only supported means of calling external routines?
I want to read a FITS file with extensions, and Transform
only supports SIMPLE FITS. I would like to call an external
C routine, pass it a filename and pointers to a Transform
Notebook and Dataset. The external routine would open the
extended FITS file, go to the EXTENSION I want, and pass back a
pointer to the FITS HEADER and DATA (via the pointers passed
to the external routine). The above "scope_array" will not let
me do this. A more general approach would be to do something
similar to CALL EXTERNAL in IDL.
Can anyone offer any suggestions on how I might do this?
Thanks,
-- irene
------------------------------------------------------------ ------
Irene Barg Email: ibarg@as.arizona.edu
Steward Observatory Phone: 520-621-2602
University of Arizona FAX: 520-621-1891
Tucson, AZ 85721 http://nickel.as.arizona.edu/~barg
------------------------------------------------------------ ------
|
|
|