Welcome to iraf.net Friday, April 26 2024 @ 04:52 PM GMT
guille |
03/03/2006 03:16PM (Read 4142 times)
|
|
|
Status: offline
Registered: 03/03/2006
Posts: 1
|
Hi thereI am working on a script and need to build image names within it in order to use them with an IRAF task (say, "continuum")I managed to get this working, but would like to avoid creating lists, if possiblefor (i=1;i<=32;i+=1) {
print ("Mask1_0907S0151_",i//".0001.fits", >> "inconti")
print ("c"//"Mask1_0907S0151_",i//".0001.fits", >> "outconti")
continuum @inconti @outconti function="spline3" order=8 inter- high_reject=2 low_reject=2
del inconti
del outcontiany hint? btw: any IRAF doc regarding syntax for task parameters? ("help declarations" was not very useful for me...)
Guillermo Bosch | Tel:+54-221-4236593/4
Facultad de Cs. Astronomicas y Geofisica | Fax:+54-221-4236591
Paseo del Bosque
|
|
|
|
fitz |
03/03/2006 03:16PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
I'd suggest having a look at the 'Script Programmer's Guide' (https://iraf.net/irafdocs/script/) if you haven't already, but your script could be easily rewritten as something like for(i=1; i<=32; i+=1) {
print ("Mask1_0907S0151_%d.0001.fits\n", i) | scan (s1)
continuum (s1, "c"//s1, ......)
}where the printf() formats the filename into the string variable 's1', and you simply prepend a 'c' to the filename using the '//' concatenation operator. For image names where the number has leading zeroes this also allows you to zero-fill the number using e.g. '%04d' as the format (for a 4-digit number). For tasks which take a list wildcard may also be used (e.g. "foo*.0001.fits") and in the case of spectra many tasks take an aperture parameter. Hope this helps.-Mike
[/url]
|
|
|
|
| |
|
Content generated in: 0.11 seconds |
|