calling an iraf routine from c
douglas brenner wrote on Jul 23, 2008
Can it be done? How?
Thanks.
Thanks.
Mike Fitzpatrick wrote on Jul 23, 2008
In the sense that I suspect you're asking (e.g. invoking IMCOMBINE as a procedure call), then, no. There are lots of aspects to executing a task such as parameters, graphics, i/o redirection, etc that are supplied by the CL and have no equivalents in any existing C lib.
That said, you might have a look at creating a #!cl script (http://iraf.noao.edu/iraf/web/new_stuff/cl_host.html) as a way to create a host command out of the task you want, then calling it from C could be as simple as a system() command with an appropriately constructed command-line. Alternatively, your program might be restructured as something like a Python script that makes mixed use of C, IRAF and other components to achieve the same end. If all you really need is a quick and dirty way to rotate your image by 23.2 degrees then the #!cl trick is a quick way to call the task that'll do it.
Cheers,
-Mike
That said, you might have a look at creating a #!cl script (http://iraf.noao.edu/iraf/web/new_stuff/cl_host.html) as a way to create a host command out of the task you want, then calling it from C could be as simple as a system() command with an appropriately constructed command-line. Alternatively, your program might be restructured as something like a Python script that makes mixed use of C, IRAF and other components to achieve the same end. If all you really need is a quick and dirty way to rotate your image by 23.2 degrees then the #!cl trick is a quick way to call the task that'll do it.
Cheers,
-Mike
douglas brenner wrote on Jul 23, 2008
Thanks.
I looked at the FAQ section on Unix-shell scripts but didn't get anywhere. I'll take a look at the page you recommended.
I looked at the FAQ section on Unix-shell scripts but didn't get anywhere. I'll take a look at the page you recommended.
Last post on Jul 23, 2008