cosmicrays
douglas brenner wrote on Sep 02, 2008
The following script works
#! /scisoft/all/packages/iraf/irafbin/bin.macintel/cl.e -f
noao
imred
crutil
printf ("cosmicrays input = DARKS/DARK_D_71.fits[1] output = /Users/dsb/DATA/1.1.1/Processed/tmp.fits interactive = no\n") | cl()
logout
but this one with wild cards doesn't
#! /scisoft/all/packages/iraf/irafbin/bin.macintel/cl.e -f
noao
imred
crutil
printf ("cosmicrays input = DARKS/*.fits[1] output = /Users/dsb/DATA/1.1.1/Processed/*.fits interactive = no\n") | cl()
logout
How do I do all the files in one directory and place the results in another?
Thanks
#! /scisoft/all/packages/iraf/irafbin/bin.macintel/cl.e -f
noao
imred
crutil
printf ("cosmicrays input = DARKS/DARK_D_71.fits[1] output = /Users/dsb/DATA/1.1.1/Processed/tmp.fits interactive = no\n") | cl()
logout
but this one with wild cards doesn't
#! /scisoft/all/packages/iraf/irafbin/bin.macintel/cl.e -f
noao
imred
crutil
printf ("cosmicrays input = DARKS/*.fits[1] output = /Users/dsb/DATA/1.1.1/Processed/*.fits interactive = no\n") | cl()
logout
How do I do all the files in one directory and place the results in another?
Thanks
douglas brenner wrote on Sep 02, 2008
Use lists and stop wasting these people's time.
Francisco Valdes wrote on Sep 02, 2008
There are two ways that output wildcards can be generated based on the input. For those tasks where an output image list is allowed there is an IRAF replacement syntax that first matches against existing files and then modifies those names. This is done with %something%something%. The first something is used to match files and then the second something replaces it.
abc?%ABC%DEF%*.fits
matches abc?ABC*.fits and then replaces the ABC with DEF. The replacement can occur anywhere in a wildcard template and there can be more than one.
Another way is to prepend to a wildcard:
NEW//*.fits
Unfortunately you cannot append.
As someone else noted, you can also just prepare lists for the input and output.
Yours,
Frank Valdes
abc?%ABC%DEF%*.fits
matches abc?ABC*.fits and then replaces the ABC with DEF. The replacement can occur anywhere in a wildcard template and there can be more than one.
Another way is to prepend to a wildcard:
NEW//*.fits
Unfortunately you cannot append.
As someone else noted, you can also just prepare lists for the input and output.
Yours,
Frank Valdes
Last post on Sep 02, 2008