comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Noesys-Transform question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Noesys-Transform question [message #19447] Fri, 24 March 2000 00:00
Irene Barg is currently offline  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
------------------------------------------------------------ ------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Secret to resizing text widgets
Next Topic: pvwave

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:51:22 PDT 2025

Total time taken to generate the page: 0.00626 seconds