Welcome to iraf.net Sunday, May 12 2024 @ 08:57 AM GMT


 Forum Index > Help Desk > Systems New Topic Post Reply
 imgets problem in cl
   
morrisonss
 09/18/2009 03:12PM (Read 4002 times)  
+----
Newbie

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

 
Profile Email
 Quote
fitz
 09/18/2009 03:12PM  
AAAAA
Admin

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

 
Profile Email
 Quote
morrisonss
 09/18/2009 03:12PM  
+----
Newbie

Status: offline


Registered: 09/18/2009
Posts: 12
works thanks

 
Profile Email
 Quote
   
Content generated in: 0.07 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login