programming in IRAF
rohit wrote on May 07, 2007
Hello Mike (fitz),
I have been doing the following:
take a file,
rotate it by 45 degrees (using rotate command, (images:imgeo:rotate))
and filp it in x (imcopy <filename> [-*,*] <filename>)
Now, I have 50 such files. I would like to know how I should write a program in IRAF to run this sequence and execute it. Could you please give me an example program in CL, that I could mimic and write the above procedure?
Thanks!
I have been doing the following:
take a file,
rotate it by 45 degrees (using rotate command, (images:imgeo:rotate))
and filp it in x (imcopy <filename> [-*,*] <filename>)
Now, I have 50 such files. I would like to know how I should write a program in IRAF to run this sequence and execute it. Could you please give me an example program in CL, that I could mimic and write the above procedure?
Thanks!
Mike Fitzpatrick wrote on May 07, 2007
Trillian,
For script programming I'd suggest reading the Script Programmer's Guide (http://iraf.net/irafdocs/script/). In this case however, you can rotate and flip the images on the command line. For example
The '%' operator is used to do a substitution, in this case it creates the output file list by changing the 'img' of the filename to 'rfimg', the flip is done with an image section on input but the angle of rotation needs to be negative to get the safe effect.
If you were to write a script you would normally loop over a filename list and call the tasks individually but then you'd need to manage temp filenames and such for each step.
Cheers,
-Mike
For script programming I'd suggest reading the Script Programmer's Guide (http://iraf.net/irafdocs/script/). In this case however, you can rotate and flip the images on the command line. For example
cl> rotate img*.fits[-*,*] %img%rfimg%*.fits -45
The '%' operator is used to do a substitution, in this case it creates the output file list by changing the 'img' of the filename to 'rfimg', the flip is done with an image section on input but the angle of rotation needs to be negative to get the safe effect.
If you were to write a script you would normally loop over a filename list and call the tasks individually but then you'd need to manage temp filenames and such for each step.
Cheers,
-Mike
Last post on May 07, 2007