View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

creating image names and making a file of them within script

smp wrote on Oct 15, 2008

Hi,

I want to do this in my procedure script:

1. Create image names.
2. Make a file of these image names
3. use this file as "result" parameter in imarith task

(I have used pset parameter in script; so that
operand2=zerocombine.output
is coming when imarith is called. This is not the problem.)


I tried like this:


procedure trial (flat_list,......)
     :
string flat_list
struct imglist

begin
   string myfile,imname 
     :
     : 
 for(n=1;n<=5;n=n+1)
   {
     printf("bias_sub_flat_%d.fits\n",n, > myfile)     # creating image names & saving them in file "myfile"
   }

  imglist = myfile
  while(fscan(imglist,imname) != EOF)
     {  print(imname)  }        # just for check 

imarith(operand1=flat_list,op="-",operand2=zerocombine.output,result=myfile,verbose=no)
      :
      :


But this does not work.

Please help.

Regards
smp

Francisco Valdes wrote on Oct 15, 2008

I doesn't seem you got a reply. The only thing I see is that for lists of filenames in a file the syntax is "@file". When the filename is in a variable, as in your script, you do something like "@"//myfile when specifying the value to a task like imarith.

Yours,
Frank Valdes

Last post on Oct 15, 2008