procedure mkcattmpl (input, outcat) ######################################################################### # This is a procedure to produce a catalog of RA, DEC, EPOCH # # values which are astrometrically accurate and can be later applied # # to all the images. [] # # # # Steve Allen (sla@lick.ucsc.edu) 1993 September 3 # # # # This IRAF cl script is Copyright (c) 1993,1994 Steven L. Allen # ######################################################################### string input {prompt = 'Input images'} file outcat {prompt = 'Output catalog'} struct *ilist # file structure pointers for reading lists begin string l_input # internal copies of input and outcat string ifile, ofile # temporary files containing expanded lists string in # loop variables for stepping thru file lists struct title, otitle int nin file outc # Pick names for the temporary files # Note that your variable tmp$ had better point to a big enough place ifile = mktemp ("tmp$moo") ofile = mktemp ("tmp$moo") # prompt the user for the query parameters if not on command line l_input = input outc = outcat # expand the input image templates # (i.e., the given names may have contained wildcard characters) sections (l_input, > ifile) # set file pointers to look at our input and outcat lists, and loop ilist = ifile otitle="" while (fscan (ilist, in) != EOF) { # grab the title out of the image hselect( in, 'title', yes) | scan (title) nin = nscan() if (nin < 1) { print( in//": has no title? No action taken.") # go on to the next image in the while loop } else if (title == otitle) { # don't bother repeating it } else { print(title) # print("'"//title//"' TELCO TELCO TELCO", print(title//"' TELCO TELCO TELCO", >> ofile) otitle=title } } delete (outc, ver-) print("# title ra dec epoch", > outc) sort ( ofile ) | unique( >> outc ) # clear this list so we don't remember its content in the par file ilist = "" # get rid of the two temporary files we created as workspace # delete (ifile//","//ofile , ver-) end