; This program is written to retrieve the properties of a RTT150 observation ; For every fits file it will write to a text file : Date of observation 'DATE-OBS', AIRMASS 'AIRMASS', ; RA and DEC 'RA', 'DEC', exposure time 'EXPTIME', OBJECT, FILTER ;This script is written by ;Guver, T (050202) ra = STRARR(1) dec = STRARR(1) date = STRARR(1) airmass = INTARR(1) exptime = INTARR(1) object = STRARR(1) filter = STRARR(1) jd = DBLARR(1) obsfile = 'rtt150.dat' ;data_path = DIALOG_PICKFILE(/read, /file) ;data_dirs = FINDFILE(data_path) obj_key = '/data/abell/bdf/*.fit' fit_files = FINDFILE(obj_key) num_fit = N_ELEMENTS(fit_files) if (fit_files[0] NE '') THEN BEGIN for i=0, (num_fit -1L) DO BEGIN ; data = MRDFITS(fit_files[i], 0, head0) datef = SXPAR(head0, 'DATE-OBS') raf = SXPAR(head0, 'RA') decf = SXPAR(head0, 'DEC') airmassf = SXPAR(head0, 'AIRMASS') exptimef = SXPAR(head0, 'EXPTIME') objectf = SXPAR(head0, 'OBJECT') filterf = SXPAR(head0, 'FILTER') jdf = SXPAR(head0, 'JD') date = [date,datef] ra = [ra,raf] dec = [dec,decf] airmass = [airmass,airmassf] exptime = [exptime,exptimef] object = [object,objectf] filter = [filter,filterf] jd = [jdf,jd] endfor endif jds = jd[sort(jd)] dates = date[sort(jd)] objects = object[sort(jd)] ras = ra[sort(jd)] decs = dec[sort(jd)] filters = filter[sort(jd)] exptimes = exptime[sort(jd)] airmasss = airmass[sort(jd)] OPENW, lun, obsfile, /GET_LUN num_raws = N_ELEMENTS(jds) PRINTF, lun, '' PRINTF, lun, ' Properties of Exposures ' PRINTF, lun, ' ' PRINTF, lun, ' No Julian Date DATE-OBS OBJECT RA DEC FILTER EXP-TIME AIRMASS' PRINTF, lun, '-------------------------------------------------------------------------------------------------------------------------' PRINTF, lun, ' ' FOR i = 0, (num_raws - 1L) DO BEGIN PRINTF, lun,i+1, jds[i], dates[i], objects[i], ras[i], decs[i], filters[i], exptimes[i], airmasss[i], FORMAT='(I13.4, I13.4, A10, A15, A13, A13, A5, I12.2, I12.2)' ENDFOR CLOSE, lun FREE_LUN, lun end