Welcome to iraf.net Sunday, May 12 2024 @ 08:57 AM GMT
morrisonss |
09/18/2009 03:12PM (Read 4002 times)
|
|
|
Status: offline
Registered: 09/18/2009
Posts: 12
|
I am working on a script for creating master calibration images for some photometry that I am working on. When I try to use imgets to retrieve the exposure time from the header files i get the error:**: }
\t ^
ERROR: syntax error
called as: `imgets (image=/home/morrison/Solar_analogs/Darks/DARK_Prompt2_09_02_09_282290__001.fits, param=EXPOSURE)'I am not sure what is causing this error. My .cl script for the section with the error is as follows:files /home/morrison/Solar_analogs/Darks/DARK* >Biasfiles.lis
list = "Biasfiles.lis"
while(fscan(list,s1) != EOF)
{
imgets(s1, "EXPOSURE")
tim = real(imgets.value)
if(tim==0)
{
copy s1 /home/morrison/Solar_analogs/Darks/biastemp/s1
}
}
files /home/morrison/Solar_analogs/Darks/biastemp > Biasfiles.lis
imcombine Biasfiles.lis BIAS combine=average reject=avsigclip
|
|
|
|
fitz |
09/18/2009 03:12PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Two things: There is a quirk of the CL that an 'if' statement sometimes needs to be followed by a semicolon to avoid expecting an 'else'. For example,[code:1:35edd2a54d]
while (..) {
if (...) {
}
;
}
[/code:1:35edd2a54d]Another problem is the 'copy' command where the literal path needs to be concatenated with the 's1' variable, i.e.[code:1:35edd2a54d]copy (s1, "/home/morrison/Solar_analogs/Darks/biastemp/" // s1)[/code:1:35edd2a54d]-Mike
|
|
|
|
morrisonss |
09/18/2009 03:12PM
|
|
|
Status: offline
Registered: 09/18/2009
Posts: 12
|
works thanks
|
|
|
|
| |
|
Content generated in: 0.07 seconds |
|