;+ ; NAME: GET_MAT ; ; PURPOSE: To return from a list of image files, the names of the image files ; along with the mean of the images and the internal and CCD temperature ; at which the images were aquired. ; ; CATEGORY: ; ; CALLING SEQUENCE: ; GET_TEMP, FILENAME ; INPUTS: ; FILENAME: A STRING ARRAY containing the path and filenames of the ; image files. ; ; KEYWORD PARAMETERS: ; None. ; ; OUTPUTS: ; FLTEMP: An ARRAY OF the STRUCTURE TEMPERATURE, which contains the following ; information: The file name, the mean CCD temperature, the mean internal ; temperature, and the value of the mean of the image. ; ; COMMON BLOCKS: ; None. ; ; SIDE EFFECTS: ; None. ; ; RESTRICTIONS: ; The files selected must be image files. ; ; PROCEDURE: ; The image and header information contained in the files namedfile names ; in the STRING ARRAY FILENAME, is located and read by the procedure RDKIMG. ; From the header information, the mean internal and CCD temperatures are ; extracted and then stored with the name of the file in the STRUCTURE ; TEMPERATURE. Also, the mean of the image is computed and stored in TEMPERATURE. ; This process is done in a loop for each file name contained in FILENAME. ; ; ; MODIFICATION HISTORY: ; Written May 1994, by T A Oliynyk. ;- FUNCTION get_temp,filename files=expose(filename) fltemp=REPLICATE({temperature, Name: '', ccdt: 0.0, intt: 0.0 ,mean: 0.0 },N_ELEMENTS(files)) FOR i=0,N_ELEMENTS(files)-1 DO BEGIN rdkimg,files(i),header,image Kih=gethd(header) t=Kih.misc.temp.tcf.mean tdc=t/10. it=Kih.misc.temp.tei.mean itdc=it/10. fltemp(i).Name=STRMID(files(i),20,12) fltemp(i).ccdt=tdc fltemp(i).intt=itdc fltemp(i).mean=mean(image) ENDFOR RETURN, fltemp END