c a program to write an iraf file to generate the imcombine command for c the spectra generated at the IRTF with Spex: 6 spectra, so 5 "skys" c which it will then create the imarith differences will not work for c images with numbers under 10! character*6 imcomb character*7 imarith character*1 c character*2 oo character*1 o,i,m,f integer a,b imcomb='imcomb' imarith='imarith' c=',' o='s' i='a' m='-' f='f' open(unit=10,file='ospec.cl',status='unknown') 10 print*,'Enter first image number (- to end):' read*,a if(a .lt. 0)goto 999 if(a .ge. 100)goto 25 15 oo='0' write(10,20)imcomb,i,oo,a+1,c,i,oo,a+2,c,i,oo,a+3,c,i,oo, 1a+4,c,i,oo,a+5,o,oo,a write(10,20)imcomb,i,oo,a,c,i,oo,a+2,c,i,oo,a+3,c,i,oo, 1a+4,c,i,oo,a+5,o,oo,a+1 write(10,20)imcomb,i,oo,a,c,i,oo,a+1,c,i,oo,a+3,c,i,oo, 1a+4,c,i,oo,a+5,o,oo,a+2 write(10,20)imcomb,i,oo,a,c,i,oo,a+1,c,i,oo,a+2,c,i,oo, 1a+4,c,i,oo,a+5,o,oo,a+3 write(10,20)imcomb,i,oo,a,c,i,oo,a+1,c,i,oo,a+2,c,i,oo, 1a+3,c,i,oo,a+5,o,oo,a+4 write(10,20)imcomb,i,oo,a,c,i,oo,a+1,c,i,oo,a+2,c,i,oo, 1a+3,c,i,oo,a+4,o,oo,a+5 write(10,21)imarith,i,oo,a,m,o,oo,a,f,oo,a write(10,21)imarith,i,oo,a+1,m,o,oo,a+1,f,oo,a+1 write(10,21)imarith,i,oo,a+2,m,o,oo,a+2,f,oo,a+2 write(10,21)imarith,i,oo,a+3,m,o,oo,a+3,f,oo,a+3 write(10,21)imarith,i,oo,a+4,m,o,oo,a+4,f,oo,a+4 write(10,21)imarith,i,oo,a+5,m,o,oo,a+5,f,oo,a+5 20 format(a6,1x,4(a1,a1,i2,a1),a1,a1,i2,1x,a1,a1,i2) goto 10 21 format(a7,1x,a1,a1,i2,1x,a1,1x,a1,a1,i2,1x,a1,a1,i2) 25 write(10,30)imcomb,i,a+1,c,i,a+2,c,i,a+3,c,i, 1a+4,c,i,a+5,o,a write(10,30)imcomb,i,a,c,i,a+2,c,i,a+3,c,i, 1a+4,c,i,a+5,o,a+1 write(10,30)imcomb,i,a,c,i,a+1,c,i,a+3,c,i, 1a+4,c,i,a+5,o,a+2 write(10,30)imcomb,i,a,c,i,a+1,c,i,a+2,c,i, 1a+4,c,i,a+5,o,a+3 write(10,30)imcomb,i,a,c,i,a+1,c,i,a+2,c,i, 1a+3,c,i,a+5,o,a+4 write(10,30)imcomb,i,a,c,i,a+1,c,i,a+2,c,i, 1a+3,c,i,a+4,o,a+5 write(10,31)imarith,i,a,m,o,a,f,a write(10,31)imarith,i,a+1,m,o,a+1,f,a+1 write(10,31)imarith,i,a+2,m,o,a+2,f,a+2 write(10,31)imarith,i,a+3,m,o,a+3,f,a+3 write(10,31)imarith,i,a+4,m,o,a+4,f,a+4 write(10,31)imarith,i,a+5,m,o,a+5,f,a+5 30 format(a6,1x,4(a1,i3,a1),a1,i3,1x,a1,i3) 31 format(a7,1x,a1,i3,1x,a1,1x,a1,i3,1x,a1,i3) goto 10 999 stop end