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 run run through a while loop before it even gets into the loop I get the error:ERROR: Newline while processing string
called as: `cl ()'My code is as follows:files /home/morrison/Solar_analogs/Flats/FLAT* >Flatfiles.lis
list = ""
list = "Flatfiles.lis"
c=""
c="1"
i=1
while(fscan(list,s3) !=EOF)
{
imgets(s3,"FILTER")
{
filter=imgets.value
};
if(filter=='V)
{
if(i<10)
{
nam="FLAT_Prompt2_09_04_09_282923_V_00"
};
if(i>=10 && i<100)
{
nam="FLAT_Prompt2_09_04_09_282923_V_0"
};
if(i>100)
{
nam="FLAT_Prompt2_09_04_09_282923_V_"
};
copy ("/home/morrison/Solar_analogs/Flats/"+nam+c+".fits", "/home/morrison/Solar_analogs/Flats/temp/")
imgets(s3,"EXPOSURE")
{
tim = real(imgets.value)
};
t=tim/expd
imarith(FLATDARK, "*",t,FDtemp)
imarith(s3, "-", "FDtemp",s3)
imstat(s3,fields="midpt",format-) | scan(y)
z=1/y
imarith(s3, "*",z,s3)
imdelete FDtemp
}
i=1+i
c=i
};imcombine /home/morrison/Solar_analogs/Flats/temp/* FLAT combine=average reject=none outtype=real
|