procedure lbcexam (imroot) string imroot ="last" {prompt="Root name ('lbc[rb]*'),'lastR', or 'lastB'"} int chipnr =2 {prompt="Chip to examine",min=1,max=4} # @(#) lbcexam Author: R.A. Jansen -- Dec 12 2012 # @(#) # @(#) Simple task to run 'imexamine' on one of the four chips in an LBC # @(#) camera (default is CCD#2). Root names should begin with "lbcb" or # @(#) "lbcr" for Blue and Red cameras, and appending extension ".fits" to # @(#) the rootname is OK, but not necessary. Special root names "lastR" # @(#) and "lastB" attempt to identify the latest LBC-Blue or LBC-Red MEF # @(#) file written to disk and will examine it. Note that a DS9 window # @(#) must be running that is tied to your IRAF session. It won't disrupt # @(#) the automated display of incoming data via the 'RB_Science' script. begin string imr, img, ctmp int ccd, i, j, k imr = imroot ccd = chipnr # Capture special root names... ctmp = "" if ( imr == "lastB" ) { print ("!\ls -1 lbcb*.fits | sort | tail -1") | cl | scan(ctmp) if (ctmp != "") imr = ctmp } if ( imr == "lastR" ) { print ("!\ls -1 lbcr*.fits | sort | tail -1") | cl | scan(ctmp) if (ctmp != "") imr = ctmp } i = strlen(imr) j = strlen(imr)-4 k = strlen(imr)-5 if ( substr(imr,j,i) == ".fits" ) imr = substr(imr,1,k) # Print selected header information... hselect (imr//"[0]", "$I,telra,teldec,exptime,filter", yes) # Run 'imexam' on the requested CCD frame... img = imr//".fits["//str(ccd)//"]" imexamine (img, 1) end