;+ ; :Description: ; Read in the lab-measured UVIS EUV or FUV sensitivity values. ; ; Outputs: ; wcal: wavelength ; ucal: sensitivity at each wavelength ; ucalerror: uncertainty in sensitivity ; ; Keyword Parameters: ; CHANNEL: either 'EUV' or 'FUV' ; WDIR: path to data files ; ; Restrictions: ; Requires these data files: ; EUV_1999_Lab_Cal.dat ; FUV_1999_Lab_Cal.dat ; ; Modification history: ; June 8, 2015: Accommodate dimensional difference between EUV and FUV file contents, GMH ;- pro get_uvis_lab_sensitivity, wcal, ucal, ucalerror, channel=channel, wdir=wdir ; ; read sensitivity data ; ; this is the full-slit, low-resolution, monochromatic extended source sensitivity measured in the laboratory in 1997, and updated in 1999 ; S = 1.e9 / 4./ !pi * Atelescope * Aslit / focal_length^2 * QE_UVIS ; where: ; Atelescope = telescope area (4 cm^2) ; Aslit = the full area of the entrance slit (0.15mm * 6mm) ; focal_length = telescope focal length (100mm) ; QE_UVIS = the QE of the instrument (I believe this includes detector QE and transmission/reflection/grating losses) ; S has units of (counts/second) / (kilorayleigh) ; if keyword_set(wdir) eq 0 then wdir='' get_lun,uu filename_lab_cal = wdir + channel + '_1999_Lab_Cal.dat' ; 'EUV_1999_Lab_Cal.dat' or 'FUV_1999_Lab_Cal.dat' case channel of 'EUV': begin dat_dim = 14*3 wcal_dim = 14 end 'FUV': begin dat_dim = 13*6 wcal_dim = 26 end endcase openr,uu,filename_lab_cal x=' ' readf,uu,x dat=fltarr(dat_dim) readf,uu,dat free_lun,uu wcal=fltarr(wcal_dim) ucalerror=wcal ucal=wcal for k=0,12 do wcal(k)=dat(k*6) for k=0,12 do ucal(k)=dat(k*6+1) for k=0,12 do ucalerror(k)=dat(k*6+2) for k=13,25 do wcal(k)=dat((k-13)*6+3) for k=13,25 do ucal(k)=dat((k-13)*6+4) for k=13,25 do ucalerror(k)=dat((k-13)*6+5) end