Permalink
Browse files

package of input and procedure files - first commit

  • Loading branch information...
0 parents commit 2a1f79a47f2fa7deb09c02487dc5f5bca1273485 @skendrew committed Mar 29, 2010
17 .project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>METISpublic</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.rsi.idldt.core.IDLBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.rsi.idldt.core.IDLNature</nature>
+ </natures>
+</projectDescription>
200,002 atm/high_and_dry_lm_100.dat
200,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
200,002 atm/high_and_dry_lm_100000.dat
200,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
200,002 atm/high_and_dry_lm_3000.dat
200,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
300,002 atm/high_and_dry_n_100.dat
300,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
300,002 atm/high_and_dry_n_100000.dat
300,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
300,002 atm/high_and_dry_n_3000.dat
300,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
300,002 atm/high_and_dry_n_50000.dat
300,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
200,002 atm/paranal_lm_100.dat
200,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
200,002 atm/paranal_lm_100000.dat
200,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
200,002 atm/paranal_lm_3000.dat
200,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
300,002 atm/paranal_n_100.dat
300,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
300,002 atm/paranal_n_100000.dat
300,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
300,002 atm/paranal_n_3000.dat
300,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
300,002 atm/paranal_n_50000.dat
300,002 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
22 ee_files/EnsquaredEnergy_AO_LMN_V10.dat
@@ -0,0 +1,22 @@
+;column 1: width of the square integration aperture in masec
+;column 2,3,4: ensquared energy % L,M,N-band
+5.0000000 0.062456673 0.033509755 0.012060011
+10.000000 0.21788149 0.12500257 0.047097352
+15.000000 0.39309437 0.25077863 0.10183637
+20.000000 0.52272436 0.38117655 0.17130146
+25.000000 0.58556053 0.49075717 0.24946225
+30.000000 0.60400598 0.56576053 0.32999066
+35.000000 0.61530154 0.60620379 0.40701530
+40.000000 0.64255755 0.62260646 0.47576417
+45.000000 0.68577516 0.62961045 0.53301029
+50.000000 0.73159241 0.63965695 0.57727103
+55.000000 0.76741958 0.65918883 0.60875441
+60.000000 0.78866467 0.68819701 0.62908558
+65.000000 0.79788601 0.72231183 0.64087788
+70.000000 0.80058199 0.75581672 0.64723003
+75.000000 0.80160740 0.78410595 0.65123312
+80.000000 0.80346031 0.80486099 0.65555837
+85.000000 0.80633728 0.81801828 0.66217413
+90.000000 0.80944282 0.82504486 0.67221274
+95.000000 0.81245998 0.82805925 0.68598074
+100.00000 0.81594993 0.82911846 0.70308430
24 ee_files/atlas_eeav.dat
@@ -0,0 +1,24 @@
+LTAO ensquared energies. Created from ATLAS data, converted to square geometry
+These are averages of outer & inner circle values
+created 15/10/09
+Rref (mas) L_ee M_ee N_ee
+ 5.0000000 5.1094618 3.5437394 1.4291218
+ 10.000000 17.233686 10.790127 3.3324576
+ 15.000000 31.329165 21.856188 6.0966337
+ 20.000000 43.892221 32.591584 10.772178
+ 25.000000 51.833950 42.587550 15.591156
+ 30.000000 58.483249 51.193588 20.749011
+ 35.000000 61.578390 56.814831 26.485381
+ 40.000000 64.243724 61.861181 30.724546
+ 45.000000 66.428211 64.685428 35.685048
+ 50.000000 68.612699 67.509675 40.645550
+ 55.000000 70.468186 69.893921 44.461552
+ 60.000000 72.323673 72.278168 48.277554
+ 65.000000 74.179161 74.662415 52.093557
+ 70.000000 76.034648 77.046662 55.909559
+ 75.000000 77.137665 78.373842 58.287941
+ 80.000000 78.116148 79.526076 60.428396
+ 85.000000 79.094632 80.678310 62.568851
+ 90.000000 80.073115 81.830544 64.709305
+ 95.000000 81.051598 82.982779 66.849760
+ 100.00000 82.030081 84.135013 68.990215
41 metis_bandic.pro
@@ -0,0 +1,41 @@
+function metis_bandic, x, band
+
+;this is a transmission curve for the dichroic splitting the L/M from the N band. Based on the
+; MIRI MRS dichroic for channel 1a, obtained from Alistair
+; output is an array of [transmission, reflectivity, emissivity] for the relevant band
+
+
+@metis_sens_param ;-> so it knows the file locations
+
+bandicfile=profiles_dir+'bandic_prof.dat'
+readcol, bandicfile, format='d,d,d', skipline=1, wave, ref, trans, /silent
+
+;convert from percentage to decimal
+ref=ref/100.
+trans=trans/100.
+
+;ref+trans+em=1
+em=1.-ref-trans
+
+;interpolate these onto the wavelength grid
+ref=interpol(ref, wave, x)
+trans=interpol(trans, wave, x)
+em=interpol(em, wave, x)
+
+
+for i=0l, n_elements(x)-1 do begin
+ if (x[i] lt 1.5) then begin
+ ref[i]=0.
+ trans[i]=0.
+ em[i]=0.
+ endif
+endfor
+
+; now need to switch trans and ref for LM bands
+if ((band eq 'l') or (band eq 'm')) then profs=[[ref], [trans], [em]] else profs=[[trans], [ref], [em]]
+
+
+
+return, profs
+
+end
33 metis_dqe.pro
@@ -0,0 +1,33 @@
+function metis_dqe, l, band
+
+; this function calculates the quantum efficiency of METIS detectors.
+; based on experimental curves for the detector types.
+; arguments:
+; l - wavelength grid in micron
+; band - band of observation - 'l', 'm' or 'n'
+
+dqe=dblarr(n_elements(l))
+
+if (band eq 'l') or (band eq 'm') then begin
+for i=0l, n_elements(l)-1 do begin
+ if ((l[i] gt 1.) and (l[i] le 5.3)) then dqe[i] = 0.7 else begin
+ if ((l[i] gt 5.3) and (l[i] le 5.5)) then dqe[i] = 0.5 else dqe[i] = 0.0
+ endelse
+endfor
+endif else begin
+for i=0l, n_elements(l)-1 do begin
+ if (l[i] lt 8.) then dqe[i] = (0.06*(l[i]-3.))+0.3 else begin
+ if ((l[i] gt 8.) and (l[i] le 14.)) then dqe[i]=0.6 else begin
+ if ((l[i] gt 14.) and (l[i] le 19.)) then dqe[i]=0.7 else begin
+ if ((l[i] gt 19.) and (l[i] le 24.)) then dqe[i]=0.6 else dqe[i]=(-0.092*(l[i]-24.))+0.6
+ endelse
+ endelse
+ endelse
+endfor
+endelse
+
+dqe=dqe*1.2
+
+return, dqe
+
+end
27 metis_ifu_param.pro
@@ -0,0 +1,27 @@
+
+;pro metis_sens_ifu_param
+;parameters file for sensitivity calculations
+;
+;provisional temperatures
+hspec_temp_lm=80. ; Kelvin
+hspec_temp_n=25.
+
+;SPO path
+spo_no_surf=7 ;# of "normal" reflective optics, e.g. re-imaging & fold mirrors
+spo_ref_surf=0.99
+slicer_ref=0.99 ;to be multiplied by slicing loss, calculated in code
+slices_lm=24.
+slices_n=15.
+
+;SMO path
+smo_no_surf=6 ;# "normal" surfaces
+smo_ref_surf=0.99
+no_grating=2
+grating_eff=0.8^no_grating
+
+;sampling parameters
+samp_spat_lm=9 ;mas/px
+samp_spec_lm=7.2 ;mas/px
+samp_spat_n=22 ;mas/px
+samp_spec_n=17.6 ;mas/px
+
331 metis_ifu_sn.pro
@@ -0,0 +1,331 @@
+function metis_ifu_sn, sig, time, lref, band, site, aomode, OVHD=ovhd, TEL_EM=tel_em,$
+ EXTENDED=extended
+
+;*************************************************************************************
+;* SENSITIVITY CODE FOR IFU MODE OF METIS, THE MID-IR INSTRUMENT FOR THE EUROPEAN ELT *
+;* Written by Sarah Kendrew, Leiden Observatory, 2009 *
+;* Questions? Email me: kendrew@strw.leidenuniv.nl *
+;*************************************************************************************
+;
+; USE OF THIS CODE
+; ================
+; Anyone is welcome to use this code to look at the likely performance of a mid-IR instrument on a 42-m telescope, and I'm happy to
+; advise on appropriate usage. A paper will be published at the 2010 SPIE conference, so if your work with this code results in a
+; publication, please cite Kendrew et al, 2010 in press. If you have a great idea to make novel use of this code and would like to
+; collaborate, let me know.
+;
+; DEPENDENCIES
+; ============
+; To run this code you need the following additional files:
+; - Atmospheric profiles paranal_lm_100000.dat, paranal_n_100000.dat, high_and_dry_lm_100000.dat, high_and_dry_n_100000.dat
+; - Parameter files metis_pre_param.pro (pre-optics params), metis_sens_param.pro (general telescope params),
+; metis_ifu_param.pro
+; - Encircled energy lookup tables, EnsquaredEnergy_AO_LMN_V10.dat for SCAO and atlas_eeav.dat for LTAO
+; - DQE calculation function: metis_dqe.pro
+; - IFU resolving power calculation: metis_ifures.pro
+; - Window background calculation: metis_winbgr.pro
+; - Instrument throughput calculation: metis_thru.pro
+;
+; INPUTS
+; ======
+; sig input signal, in mJy. the code will calculate the S/N of this signal as well as sensitivity of the IFU
+; time total clock time, in seconds. for e.g. sensitivity for S/N in 1 hour, set time=3600.
+; lref reference wavelength, in micron. must lie within selected band
+; band observation band, options: 'l', 'm' or 'n'. this should correspond to lref.
+; site site of observation. options: 'low' or 'high'
+; aomode mode of adaptive optics used. options: 'scao' for single-conjugate natural guide star AO, 'ltao' for laser tomography AO
+;
+; OPTIONAL KEYWORDS
+; =================
+; OVHD overhead. if this keyword is set, a 20% overhead will be applied, i.e. time = time*0.8.
+; TEL_EM telescope emissivity. default is 0.1 (10%). this is an important parameter in the calculation, vary it to see the effect.
+; EXTENDED extended source. see the accompanying tech note for a detailed explanation of how this works.
+;
+; OUTPUT
+; ======
+; There are two possible outputs coded into the program.
+; 1. line sensitivity @ reference wavelength (lref) -> this gives a single number at the chosen line position, in W/m2
+; 2. a 2D array of wavelength [um] vs. line sensitivity [W/m2] for the typical wavelength coverage range around the reference line.
+; this is useful for plotting.
+
+
+
+;*******************************************************
+; INITIAL CHECKS AND PARAMETERS
+;*******************************************************
+
+; check operating system
+os = !version.os_family
+if os eq 'Windows' then begin
+ graphics = 'win'
+endif else begin
+ graphics = 'x'
+endelse
+
+print, 'Your operating system is: ', os
+
+
+if keyword_set(extended) then begin
+ if not keyword_set(rh) then begin
+ print, 'Source type: EXTENDED, CONSTANT SURFACE BRIGHTNESS (mJy/arcsec^2)'
+ endif else begin
+ print, 'Source type: EXTENDED (mJy)
+ endelse
+endif else begin
+ print, 'Source type: POINT (mJy)'
+endelse
+
+if keyword_set(rh) and not keyword_set(extended) then begin
+ print, 'Cant have half-light radius for a point source!'
+ return, 0
+endif
+
+
+; read in common parameters (including file locations)
+@metis_sens_param
+; read in pre-optics parameters
+@metis_pre_param
+;read in IFU-specific parameters
+@metis_ifu_param
+
+
+if site eq 'low' then tel_t=286.3 else tel_t=270.
+win_temp=tel_t
+
+if not keyword_set(tel_em) then tel_em=0.1
+
+; set clock
+t=systime(1)
+
+; BAND CHECKS
+case band of
+ 'l': begin
+ fspat=9.7d
+ fspec=12.2d
+ rp=100000
+ rd_noise=lm_rd_noise ; as specified in parameter file [e-/pixel]
+ dark=lm_dark ; pick dark current value for LM band
+ pix_size=lm_pix_size
+ scale_spat=samp_spat_lm
+ scale_spec=samp_spec_lm
+ well=lm_well
+ fileband='lm' ; for the atmosphere filename...
+ lrange=[3.,4.2]
+ end
+
+ 'm': begin
+ fspat=9.7d ; formerly 9.73
+ fspec=12.2d
+ rp=100000
+ rd_noise=lm_rd_noise ; as specified in parameter file [e-/pixel]
+ dark=lm_dark
+ pix_size=lm_pix_size
+ scale_spat=samp_spat_lm
+ scale_spec=samp_spec_lm
+ well=lm_well
+ fileband='lm' ; for the atmosphere filename....
+ lrange=[4.5, 5.5]
+ end
+
+ 'n': begin
+ fspat=6.65d
+ fspec=8.38d
+ rp=50000
+ rd_noise=nq_rd_noise ; as specified in parameter file
+ dark=nq_dark
+ pix_size=nq_pix_size
+ scale_spat=samp_spat_n
+ scale_spec=samp_spec_n
+ well=nq_well
+ fileband=band ; for the atmsophere filename....
+ lrange=[7.5, 14.]
+ end
+
+ else: print, "Band not recognised"
+
+endcase
+
+if (band eq 'n') then pltx=[lref-0.06, lref+0.06] else pltx=[lref-0.03, lref+0.03]
+
+
+; READ IN ATMOSPHERIC PROFILES
+;------------------------------
+
+if site EQ 'low' then begin
+ atfile=atm_dir+'paranal_'+fileband+'_'+strcompress(string(rp), /remove_all)+'.dat'
+ readcol, atfile, F='D,D,x,D',l, trans, em, /silent
+ name='paranal'
+endif else if site EQ 'high' then begin
+ atfile=atm_dir+'high_and_dry_'+fileband+'_'+strcompress(string(rp), /remove_all)+'.dat'
+ readcol, atfile ,F='D,D,x,D', l, trans, em, /silent
+ name='high_and_dry'
+endif
+print, 'Atmosphere data read'
+
+;perform some unit conversions on the emissivity values (from photons/s/um/m^2/arcsec^2 to W/cm^2/sr/um)
+;em=em*(h*c/l)*4.25d10. UNITS WOMAN, UNITS! PAY ATTENTION!
+em_l=em*(h*c/(l*1d-6))*1d-4*4.25d10
+
+; clip these arrays to wavelength range of interest
+em_l=em_l[where((l gt lrange[0]) and (l le lrange[1]))]
+trans=trans[where((l gt lrange[0]) and (l le lrange[1]))]
+l=l[where((l gt lrange[0]) and (l le lrange[1]))]
+
+
+; calculate resolution element
+delta_l=metis_ifures(band, l, 'ifu')
+
+; find reference wavelength location
+diff=l-lref
+tmp=min(diff,ref, /absolute)
+print, 'delta_l @ lref = ', delta_l[ref]*1000., ' nm'
+print, 'atmospheric transmission @ lref = ', trans[ref]
+
+!p.charsize=2.
+;plot, l, delta_l
+
+;spectral sampling: 2.5 pixels per delta_l optimised at 4.7 and 12.8 um
+pix_spec=2.5 ; amend this later
+
+;spatial pixels: sampling optimised at 3.7 um for LM-band, 9 um for N-band
+; for extended sources: calculate per spaxel
+if (band eq 'n') then pix_spat=2.*(l/9.) else pix_spat=2.*(l/3.7)
+
+;calculate # pixels per diffraction element using pixel scale from design and diffraction limited core
+npix=ceil(pix_spat*pix_spec)
+
+;calculate S/N reference area, in mas^2. if seeing limited then size of seeing disk, else 1.22l/D
+;if aomode eq 'noao' then sn_area=1000*0.8*(lc/0.5)^(-0.2) else sn_area=pix_scale*pix_spat*pix_spec
+sn_size=npix*scale_spat*1d-3*scale_spec*1d-3
+
+print, '# spatial pixels in sn area @ lref = ', pix_spat[ref]
+print, 'sn size @ lref = ', sn_size[ref], ' arcsec^2'
+
+
+;look up EE using appropriate AO mode
+;but now sn_size and ee_snsize are vectors of different length -> need to lookup element by element
+if keyword_set(extended) then begin
+ if keyword_set(rh) then ee=0.5 else ee=1.
+endif else begin
+ if aomode eq 'ltao' then begin
+ ee_file='ee_files/atlas_eeav.dat'
+ readcol, ee_file, f='f,d,d,d', ee_snsize, ee_l, ee_m, ee_n, /silent
+ endif else begin
+ ee_file='ee_files/EnsquaredEnergy_AO_LMN_V10.dat'
+ readcol, ee_file, format='f,d,d,d', ee_snsize, ee_l, ee_m, ee_n, /silent
+ endelse
+
+ ee_list=dblarr(n_elements(ee_snsize))
+
+ case band of
+ 'l': ee_list=ee_l
+ 'm': ee_list=ee_m
+ 'n': ee_list=ee_n
+ ; 'q': ee_list=ee_q
+ end
+
+;but now sn_size and ee_snsize are vecors of different length -> need to lookup element by element
+ diff=ee_snsize-sqrt(sn_size[ref]*1d6)
+ tmp=min(diff, loc, /absolute)
+ if aomode eq 'ltao' then ee=ee_list[loc]/100. else ee=ee_list[loc]
+endelse
+
+print, 'ee = ', ee
+
+; calculate telescope transmission
+if (tel_em gt 0.1) then tel_thru=1.-tel_em else tel_thru=mir_ref^no_mir
+print, 'telescope transmission = ', tel_thru
+
+; calculate throughput
+obsmode='hspec'
+thru=metis_thru(obsmode, band, l)
+print, 'throughput of instrument @ lref = ', thru[ref]
+
+
+; calculate dqe
+dqe=metis_dqe(l, band)
+print, 'DQE in filter band @ lref = ', dqe[ref]
+
+; calculate efficiency
+eff=thru*tel_thru*dqe*pcg
+
+print, 'total efficiency including DQE, pcg, telescope, and instrument @ lref = ', eff[ref]
+
+; total conversion factor [e-/s per W/cm2/um] (eff_area is in cm2)
+conv=eff*delta_l*eff_area*l/1.985d-19
+
+; flux from object
+fobj=sig*3.*1d-19*trans/l^2 ; convert flux from mJy to [W/cm2/um]
+
+; BACKGROUNDS
+; telescope background = blackbody ftn @ ambient T * telescope emissivity
+tel_bgrsr=planck(l*1d4, tel_t)*1d-3/!dpi ; in W/cm2/sr/um
+tel_bgr=tel_bgrsr/4.25d10 ; in W/cm2/arcsec2/um
+tel_bgr=tel_bgr*tel_em
+
+; atmosphere background = emissivity from the atm file * telescope throughput
+emeff=em_l*tel_thru/4.25d10 ; in W/cm2/arcsec2/um
+
+; entrance window background
+win_bgr=metis_winbgr(l, tel_t) ; in W/cm2/arcsec2/um
+
+; add telescope and sky
+sky=tel_bgr+emeff+win_bgr ; in W/cm2/um/arcsec2
+
+; add in overhead to the clock time if specified
+if keyword_set(ovhd) then time=time*0.8
+
+nskypers=sky*sn_size*conv ; electrons per s in sn area
+
+; # detected electrons from object in sn area
+if keyword_set(extended) then begin
+ nobjpers=fobj*sn_size*conv
+endif else begin
+ nobjpers=fobj*ee*conv ; electrons per s in sn area
+endelse
+
+; calculate integration time to ensure background limited (i.e. not read noise limited)
+dit=2*rd_noise^2/((nskypers[ref]/npix[ref])-dark)
+
+frames=round(time/dit)
+nsky=nskypers*dit ; electrons per DIT in sn area
+print, 'optimal dit = ', dit, ' s'
+print, '# frames = ', frames
+
+
+; # detected electrons from object in s/n reference area
+if keyword_set(extended) then nobj=fobj*sn_size*conv*dit else nobj=fobj*ee*conv*dit
+print, 'flux from object in sn area at ', lref, ' um = ', fobj[ref], ' W/cm2/um'
+print, '# electrons from object in sn area at ', lref, ' um = ', nobj[ref], ' e-/DIT'
+
+; calculate signal to noise
+sn=sqrt(frames)*nobj/sqrt(nsky+(npix*rd_noise^2)+(npix*dark*dit))
+print, 'S/N at ', lref, ' um = ', sn[ref]
+
+trange=[dit-dit*0.9, dit+dit*0.9]
+exptime=findgen(1000)+10.
+
+
+;calculate minimum detectable flux in 1 hr to s/n of 10.
+if keyword_set(extended) then minflx=10.*emp_fac*sqrt(nsky+(npix*rd_noise^2)+(npix*dit*dark))/(sn_size*trans*conv*dit*sqrt(frames)) $
+ else minflx=10.*emp_fac*sqrt(nsky+(npix*rd_noise^2)+(npix*dit*dark))/(ee*trans*conv*dit*sqrt(frames)) ; in W/cm2/um
+
+minsig=minflx*lref^2/3./1d-19 ; CONTINUUM SENSITIVITY in mJy
+minsig_line=minflx*delta_l*1d4 ; LINE SENSITIVITY in W/m2
+
+
+print, 'continuum sensitivity at s/n 10 in 1 hr at ', lref, ' um', minsig[ref], ' mJy'
+print, 'line sensitivity at s/n 10 in 1 hr at ', lref, ' um = ', minsig_line[ref], ' W/m2'
+
+!p.thick=2.
+!p.charsize=1.
+!p.charthick=1.5
+
+plottitle='Line sensitivity, '+ band+ '-band'
+plot, l, minsig_line, /ylog, yrange=[1d-22, 1d-18],title=plottitle, xtitle='micron', ytitle='w/m2'
+
+
+;out=[[l], [minsig_line]] ;IF WANT SENSITIVITY OVER FULL WAVELENGTH RANGE
+out=minsig_line[ref] ;IF WANT SENSITIVITY AT REFERENCE WAVELENGTH ONLY
+return, out
+end
48 metis_ifures.pro
@@ -0,0 +1,48 @@
+function metis_ifures, band, x, mode
+
+; this function computes the delta_l for the IFU mode of METIS, according to the optical design
+; parameters of the instrument
+; INPUTS:
+; - band: band of observation, can be 'l', 'm', 'n' or 'q' (q not supported yet)
+; - x : wavelength scale in micron
+; - xrange: the wavelength range of the observation band in micron. vector of 2 elements.
+; written on 26/08/09 by S. Kendrew, kendrew@strw.leidenuniv.nl
+
+@metis_sens_param
+
+if (band eq 'l') then begin
+ infile=profiles_dir+'metis_ifures_lm.dat'
+ readcol, infile, f='d,d', wave, res, /silent
+ xrange=[3., 4.2]
+endif else if (band eq 'm') then begin
+ infile=profiles_dir+'metis_ifures_lm.dat'
+ readcol, infile, f='d,d', wave, res, /silent
+ xrange=[4.5, 5.5]
+endif else begin
+ infile=profiles_dir+'metis_ifures_n.dat'
+ readcol, infile, f='d,d', wave, res, /silent
+ xrange=[7., 14.]
+endelse
+
+; res is given in units of 1000 so do x 1000.
+res=res*1000.
+
+; interpolate onto wavelength grid
+resint=interpol(res, wave, x)
+dx=x/resint
+
+;plot, x, res
+;oplot, x, resint, col=255
+
+if (mode eq 'img') then begin
+loc=where((x lt min(wave)) or (x gt max(wave)))
+if (loc ne -1) then begin
+resint[loc]=mean(res)
+dx[loc]=mean(dx[where(x le max(wave)) or (x ge min(wave))])
+endif
+endif
+
+return, dx
+
+
+end
36 metis_img_param.pro
@@ -0,0 +1,36 @@
+
+;pro metis_sens_img_param
+;parameters file for sensitivity calculations for the IMAGER
+
+;
+;
+;no_surf=15 ;number of cold surfaces. 4 pre-optics+3 de-rotator+3 collimator+2 folding mirrors+3 camera
+;ref_surf=0.99 ;reflectance per cold surface
+;window_trans=0.95
+;no_dichroic=1
+;dichroic_trans=0.8^no_dichroic
+;;pix_spat=3.d ;no. pixels per spatial res element. assume nyquist sampled.
+;thru=ref_surf^no_surf*window_trans*dichroic_trans
+;
+;pix_scale_lm=8.6 ; mas/pixel
+;pix_scale_nq=17.2 ; mas/pixel
+;;pix_spec=2. ; for testing - REMOVE
+;
+;print, 'imager throughput = ', thru
+
+img_no_surf=7 ;number of cold surfaces after pre-optics
+img_ref_surf=0.99 ;reflectance per cold surface
+img_thru=img_ref_surf^img_no_surf
+img_em=1.-img_ref_surf
+img_temp_lm=85.
+img_temp_n=25.
+;FOR TESTING
+;img_pix_scale_lm=10.
+;###
+img_pix_scale_lm=8.6 ; mas/pixel
+img_pix_scale_nq=17.2 ; mas/pixel
+
+
+
+;end
+
342 metis_img_sn.pro
@@ -0,0 +1,342 @@
+function metis_img_sn, sig, time, band, site, aomode, OVHD=ovhd, TEL_EM=tel_em, $
+ EXTENDED=extended, RH=rh
+
+;*****************************************************************************************
+;* SENSITIVITY CODE FOR IMAGER MODE OF METIS, THE MID-IR INSTRUMENT FOR THE EUROPEAN ELT *
+;* Written by Sarah Kendrew, Leiden Observatory, 2009 *
+;* Questions? Email me: kendrew@strw.leidenuniv.nl *
+;*****************************************************************************************
+;
+; USE OF THIS CODE
+; ================
+; Anyone is welcome to use this code to look at the likely performance of a mid-IR instrument on a 42-m telescope, and I'm happy to
+; advise on appropriate usage. A paper will be published at the 2010 SPIE conference, so if your work with this code results in a
+; publication, please cite Kendrew et al, 2010 in press. If you have a great idea to make novel use of this code and would like to
+; collaborate, let me know.
+;
+; DEPENDENCIES
+; ============
+; To run this code you need the following additional files:
+; - Atmospheric profiles paranal_lm_100.dat, paranal_n_100.dat, high_and_dry_lm_100.dat, high_and_dry_n_100.dat
+; - Parameter files metis_pre_param.pro (pre-optics params), metis_sens_param.pro (general telescope params),
+; metis_imgparam.pro (imager-specific parameters)
+; - Encircled energy lookup tables, EnsquaredEnergy_AO_LMN_V10.dat for SCAO and atlas_eeav.dat for LTAO
+; - DQE calculation function: metis_dqe.pro
+; - Window background calculation: metis_winbgr.pro
+; - Instrument throughput calculation: metis_thru.pro
+; - Filter specifications: filters.dat in profiles/ directory. These are based on ISAAC and VISIR filters on VLT.
+
+; INPUTS
+; ======
+; sig input signal, in mJy. the code will calculate the S/N of this signal as well as sensitivity of the IFU
+; time total clock time, in seconds. for e.g. sensitivity for S/N in 1 hour, set time=3600.
+; band observation band, options: 'l', 'm' or 'n'. this should correspond to lref.
+; site site of observation. options: 'low' or 'high'
+; aomode mode of adaptive optics used. options: 'scao' for single-conjugate natural guide star AO, 'ltao' for laser tomography AO
+;
+; OPTIONAL KEYWORDS
+; =================
+; OVHD overhead. if this keyword is set, a 20% overhead will be applied, i.e. time = time*0.8.
+; TEL_EM telescope emissivity. default is 0.1 (10%). this is an important parameter in the calculation, vary it to see the effect.
+; EXTENDED extended source. see the accompanying tech note for a detailed explanation of how this works.
+; RH half-light radius of an extended object (in arcsec)
+;
+; OUTPUT
+; ======
+; - the minimum detectable signal with a S/N of 10. within the time you've specified in the input in mJy
+
+
+;*******************************************************
+; INITIAL CHECKS AND PARAMETERS
+;*******************************************************
+
+; check operating system
+os = !version.os_family
+if os eq 'Windows' then begin
+ graphics = 'win'
+endif else begin
+ graphics = 'x'
+endelse
+
+print, 'Your operating system is: ', os
+
+; read in common parameters
+@metis_sens_param
+; read in pre-optics parameters
+@metis_pre_param
+;read in imager-specific parameters
+@metis_img_param
+
+if site eq 'low' then tel_t=286.3 else tel_t=270.
+win_temp=tel_t
+
+if not keyword_set(tel_em) then tel_em=0.10
+
+if keyword_set(extended) then begin
+ if not keyword_set(rh) then begin
+ print, 'Source type: EXTENDED, CONSTANT SURFACE BRIGHTNESS (mJy/arcsec^2)'
+ endif else begin
+ print, 'Source type: EXTENDED (mJy)
+ endelse
+endif else begin
+ print, 'Source type: POINT (mJy)'
+endelse
+
+if keyword_set(rh) and not keyword_set(extended) then begin
+ print, 'Cant have half-light radius for a point source!'
+ return, 0
+endif
+
+; set clock
+t=systime(1)
+
+; read in filters file. for now these are single-band filters, not a full set of "scientifically interesting"
+; ones. just read in effective filter width for now. given in um.
+
+filtersfile=profiles_dir+'filters.dat'
+readcol, filtersfile, format='x,d,d', lc, dl, skipline=3, /silent
+
+
+; BAND CHECKS
+case band of
+ 'l': begin
+ f1=10.286d
+ rd_noise=lm_rd_noise ; as specified in parameter file [e-/pixel]
+ dark=lm_dark ; pick dark current value for LM band
+ pix_scale=img_pix_scale_lm ; dito pixel scale
+ delta_l=dl[0] ; dito band width
+ lc=lc[0]
+ pix_size=lm_pix_size
+ well=lm_well
+ fileband='lm' ; for the atmosphere filename...
+ end
+
+ 'm': begin
+ f1=10.286d ; formerly 9.73
+ rd_noise=lm_rd_noise ; as specified in parameter file [e-/pixel]
+ dark=lm_dark
+ pix_scale=img_pix_scale_lm
+ delta_l=dl[1] ; dito band width
+ lc=lc[1]
+ pix_size=lm_pix_size
+ well=lm_well
+ fileband='lm' ; for the atmosphere filename....
+ end
+
+ 'n': begin
+ f1=8.571d ; formerly 6.67
+ rd_noise=nq_rd_noise ; as specified in parameter file
+ dark=nq_dark
+ pix_scale=img_pix_scale_nq
+ delta_l=dl[2]
+ lc=lc[2]
+ pix_size=nq_pix_size
+ well=nq_well
+ fileband=band ; for the atmsophere filename....
+ end
+
+ else: print, "Band not recognised"
+
+endcase
+
+
+; READ IN ATMOSPHERIC PROFILES
+;------------------------------
+resfile=100
+lowfile=atm_dir+'paranal_'+fileband+'_'+strcompress(string(resfile),/remove_all)+'.dat'
+highfile=atm_dir+'high_and_dry_'+fileband+'_'+strcompress(string(resfile),/remove_all)+'.dat'
+
+if site EQ 'low' then begin
+ readcol, lowfile, F='D,D,x,D',l, trans, em, /silent
+ tel_t=286.d
+ name='paranal'
+endif else if site EQ 'high' then begin
+ readcol, highfile,F='D,D,x,D', l, trans, em, /silent
+ tel_t=270.0d
+ name='high_and_dry'
+endif
+if not keyword_set(silent) then begin
+ print, 'atmosphere data read'
+endif
+
+;perform some unit conversions on the emissivity values (from photons/s/um/m^2/arcsec^2 to W/cm^2/sr/um)
+em_l=em*(h*c/(l*1d-6))*1d-4*4.25d10
+
+; clip these arrays to where trans is non-zero
+ em_l=em_l[where((l gt (lc-(delta_l/2))) and (l le lc+(delta_l/2)))]
+ trans=trans[where((l gt (lc-(delta_l/2))) and (l le lc+(delta_l/2)))]
+ l=l[where((l gt (lc-(delta_l/2))) and (l le lc+(delta_l/2)))]
+
+
+; effective transmission in this filter band is:
+transeff=mean(trans)
+if not keyword_set(silent) then begin
+print, 'effective atmospheric transmission in filter = ', transeff
+endif
+
+; extended sources: calculate the surface flux per arcsec^2
+if keyword_set(extended) then begin
+ sig=sig/!dpi/rh^2
+ if not keyword_set(silent) then begin
+ print, 'Extended source: flux/area = ', sig, ' mJy/arcsec^2'
+ endif
+endif
+
+;calculate S/N reference area, in arcsec^2.
+;option 1 extended and rh set: define as square of side 2*half-light radius
+;option 2 extended, const surf brightness: 1 arcsec^2
+;option 3 point source, define as square of side lambda/D
+
+;calculate # pixels in S/N area using pixel scale
+;for the point source case we want to enforce a strictly square geometry, as
+;here the EE is most important, hence slightly complicated-looking formula
+if keyword_set (extended) then begin
+ if keyword_set(rh) then npix=ceil(!dpi*rh^2/(pix_scale*1d-3)^2) else npix = ceil(1./(pix_scale*1d-3)^2)
+endif else npix=(ceil((lc*1d-6)/42.*206265*1d3/pix_scale))^2
+
+print, 'number of px in s/n area = ', npix
+
+if keyword_set(extended) then begin
+ if keyword_set(rh) then sn_size=!dpi*rh^2 else sn_size=1.
+endif else sn_size=npix*(pix_scale*1d-3)^2
+
+print, 'size of s/n area = ', sn_size, ' arcsec^2'
+
+;look up EE using appropriate AO mode
+if keyword_set(extended) then begin
+ if keyword_set(rh) then ee=0.5 else ee=1.
+endif else begin
+ if aomode eq 'ltao' then begin
+ ee_file='ee_files/atlas_eeav.dat'
+ readcol, ee_file, f='f,d,d,d', ee_snsize, ee_l, ee_m, ee_n, /silent
+ endif else begin
+ ee_file='ee_files/EnsquaredEnergy_AO_LMN_V10.dat'
+ readcol, ee_file, format='f,d,d,d', ee_snsize, ee_l, ee_m, ee_n, /silent
+ endelse
+
+ ee_list=dblarr(n_elements(ee_snsize))
+
+ case band of
+ 'l': ee_list=ee_l
+ 'm': ee_list=ee_m
+ 'n': ee_list=ee_n
+ ; 'q': ee_list=ee_q
+ end
+
+ ;but now sn_size and ee_snsize are vecors of different length -> need to lookup element by element
+ diff=ee_snsize-sqrt(sn_size*1d6)
+ tmp=min(diff, loc, /absolute)
+ if aomode eq 'ltao' then ee=ee_list[loc]/100. else ee=ee_list[loc]
+endelse
+
+print, 'ref = ', sqrt(sn_size*1d6), ' mas'
+
+print, 'ee = ', ee
+
+; calculate telescope transmission
+if (tel_em gt 0.1) then tel_thru=1.-tel_em else tel_thru=mir_ref^no_mir
+if keyword_set(pol) then tel_thru=tel_thru*pol_thru
+print, 'telescope transmission = ', tel_thru
+
+; calculate throughput
+obsmode='img'
+if keyword_set(pol) then thru=metis_thru(obsmode, band, l, /pol) else thru=metis_thru(obsmode, band, l)
+print, 'mean throughput of instrument = ', mean(thru)
+
+; calculate dqe
+dqe=metis_dqe(l, band)
+print, 'mean DQE in filter band = ', mean(dqe)
+
+plot, l, dqe
+
+; calculate efficiency
+eff=mean(thru)*tel_thru*mean(dqe)*pcg
+print, 'total efficiency including DQE, pcg, telescope, and instrument = ', eff
+
+; total conversion factor
+conv=eff*delta_l*eff_area*lc/1.985d-19
+
+print, ' conv = ', conv
+
+; flux from object
+fobj=sig*transeff*3.*1d-19/lc^2 ; convert flux from mJy to [W/cm2/um] or .../arcsec^2 for extended
+
+; for extended sources we need to calculate the total flux over the sn area as is resolved
+if keyword_set(extended) then fobj2=fobj*sn_size
+
+
+; BACKGROUNDS
+; telescope
+tel_bgrsr=planck(l*1d4, tel_t)*1d-3/!dpi ; in W/cm2/sr/um
+tel_bgr=mean(tel_bgrsr/4.25d10) ; in W/cm2/arcsec2/um
+tel_bgr=tel_bgr*tel_em
+
+; atmosphere
+emeff=mean(em_l/4.25d10)*tel_thru
+
+;window
+win_bgr=metis_winbgr(l, tel_t)
+win_bgr=mean(win_bgr)
+
+; add telescope and sky
+sky=tel_bgr+emeff+win_bgr ; in W/cm2/um/arcsec2
+
+; add in overhead to the clock time if specified
+if keyword_set(ovhd) then begin
+ if keyword_set(pol) then time=time*0.65 else time=time*0.8
+endif
+
+; # detected electrons from sky & telescope
+nskypers=sky*sn_size*conv ; electrons per s in sn area (1 arcsec^2 if extended source)
+dit=well/(nskypers/npix)
+frames=round(time/dit)
+nsky=nskypers*dit ; electrons per DIT in sn area
+print, 'optimal dit = ', dit, ' s'
+print, '# frames = ', frames
+
+print, '# electrons from sky in sn area = ', nsky, ' e-/DIT'
+
+if keyword_set(ditcheck) then begin
+ print, 'Optimal DIT to avoid detector saturation is: ', dit, ' s'
+ return, dit
+endif
+
+; # detected electrons from object in s/n reference area
+nobj=fobj*ee*conv*dit
+if keyword_set(extended) then begin
+ print, '# electrons from object per DIT = ', nobj, ' e-';/arcsec^2'
+ print, 'flux from object in sn area = ', fobj, ' W/cm2/um';/arcsec^2'
+ endif else begin
+ print, '# electrons from object per DIT = ', nobj, ' e-'
+ print, 'flux from object in sn area = ', fobj, ' W/cm2/um'
+endelse
+
+sn=sqrt(frames)*nobj/sqrt(nsky+(npix*rd_noise^2)+(npix*dark*dit))
+
+print, '# electrons from sky in sn area = ', nsky, ' e-/DIT'
+print, 'read noise from sn area = ', npix*rd_noise^2, ' e-/DIT'
+print, 'dark current from sn area = ', npix*dark*dit, ' e-/DIT'
+if keyword_set(extended) then begin
+ print, 's/n = ', sn
+ endif else begin
+ print, 's/n =', sn
+endelse
+
+;calculate minimum detectable flux in 1 hr to s/n of 10.
+minflx=10.*sqrt(nsky+(npix*rd_noise^2)+(npix*dit*dark))/(ee*conv*dit*sqrt(frames)*transeff) ; in W/cm2/um
+minsig=minflx*emp_fac*lc^2/3./1d-19
+if keyword_set(extended) then begin
+ if keyword_set(rh) then begin
+ print, 'sensitivity at s/n 10 in 1 hr = ', minsig*1000., ' microJy in half-light radius of ', rh, 'arsec'
+ endif else begin
+ print, 'sensitivity at s/n 10 in 1 hr = ', minsig*1000., ' microJy/arcsec^2'
+ endelse
+endif else begin
+ print, 'sensitivity at s/n 10 in 1 hr = ', minsig*1000., ' microJy'
+endelse
+
+
+out=minsig
+
+return, out
+end
335 metis_mres_sn.pro
@@ -0,0 +1,335 @@
+function metis_mres_sn, sig, time, band, site, aomode, OVHD=ovhd, TEL_EM=tel_em, $
+ EXTENDED=extended, RH=rh
+
+;*************************************************************************************
+;* SENSITIVITY CODE FOR MEDIUM-RESOLUTION SLIT SPECTROSCOPY MODE OF METIS *
+;* METIS IS THE MID-IR INSTRUMENT FOR THE EUROPEAN ELT *
+;* Written by Sarah Kendrew, Leiden Observatory, 2009 *
+;* Questions? Email me: kendrew@strw.leidenuniv.nl *
+;*************************************************************************************
+;
+; USE OF THIS CODE
+; ================
+; Anyone is welcome to use this code to look at the likely performance of a mid-IR instrument on a 42-m telescope, and I'm happy to
+; advise on appropriate usage. A paper will be published at the 2010 SPIE conference, so if your work with this code results in a
+; publication, please cite Kendrew et al, 2010 in press. If you have a great idea to make novel use of this code and would like to
+; collaborate, let me know.
+;
+; DEPENDENCIES
+; ============
+; To run this code you need the following additional files:
+; - Atmospheric profiles paranal_lm_3000.dat, paranal_n_3000.dat, high_and_dry_lm_3000.dat, high_and_dry_n_3000.dat
+; - Parameter files metis_pre_param.pro (pre-optics params), metis_sens_param.pro (general telescope params),
+; metis_img_param.pro
+; - Encircled energy lookup tables, EnsquaredEnergy_AO_LMN_V10.dat for SCAO and atlas_eeav.dat for LTAO
+; - DQE calculation function: metis_dqe.pro
+; - Window background calculation: metis_winbgr.pro
+; - Instrument throughput calculation: metis_thru.pro
+; - Grism profiles: grisms.dat in profiles/ directory
+
+; INPUTS
+; ======
+; sig input signal, in mJy. the code will calculate the S/N of this signal as well as sensitivity of the IFU
+; time total clock time, in seconds. for e.g. sensitivity for S/N in 1 hour, set time=3600.
+; band observation band, options: 'l', 'm' or 'n'. this should correspond to lref.
+; site site of observation. options: 'low' or 'high'
+; aomode mode of adaptive optics used. options: 'scao' for single-conjugate natural guide star AO, 'ltao' for laser tomography AO
+;
+; OPTIONAL KEYWORDS
+; =================
+; OVHD overhead. if this keyword is set, a 20% overhead will be applied, i.e. time = time*0.8.
+; TEL_EM telescope emissivity. default is 0.1 (10%). this is an important parameter in the calculation, vary it to see the effect.
+; EXTENDED extended source. see the accompanying tech note for a detailed explanation of how this works.
+; RH helf-light radius (only valid if keyword EXTENDED also set!)
+;
+; OUTPUT
+; ======
+; The output is a 2-element vector. First element is the continuum sensitivity in mJy, the second is the line sensitivity
+; at a reference wavelength lref specified in the initial code checks, in W/m2. Default reference lines are
+; L-band: Br-alpha @ 4.05 um
+; M-band: CO @ 4.66 um
+; N-band: [NeII] @ 12.81 um
+
+
+;*******************************************************
+; INITIAL CHECKS AND PARAMETERS
+;*******************************************************
+
+; check operating system
+os = !version.os_family
+if os eq 'Windows' then begin
+ graphics = 'win'
+endif else begin
+ graphics = 'x'
+endelse
+
+print, 'Your operating system is: ', os
+
+if not keyword_set(tel_em) then tel_em=0.1
+
+if keyword_set(extended) then begin
+ if not keyword_set(rh) then begin
+ print, 'Source type: EXTENDED, CONSTANT SURFACE BRIGHTNESS (mJy/arcsec^2)'
+ endif else begin
+ print, 'Source type: EXTENDED (mJy)
+ endelse
+endif else begin
+ print, 'Source type: POINT (mJy)'
+endelse
+
+if keyword_set(rh) and not keyword_set(extended) then begin
+ print, 'Cant have half-light radius for a point source!'
+ return, 0
+endif
+
+
+; read in common parameters
+@metis_sens_param
+; read in pre-optics parameters
+@metis_pre_param
+;read in imager-specific parameters
+@metis_img_param
+
+
+if site eq 'low' then tel_t=286.3 else tel_t=270.
+win_temp=tel_t
+
+; set clock
+t=systime(1)
+
+; read in filters file. for now these are single-band filters, not a full set of "scientifically interesting"
+; ones. just read in effective filter width for now. given in um.
+
+grismfile=profiles_dir+'grisms.dat'
+readcol, grismfile, f='d,d,d', lmin, lmax, grismrp, /silent
+
+; BAND CHECKS
+case band of
+ 'l': begin
+ f1=10.286d
+ f2=10.286d
+ rd_noise=lm_rd_noise ; as specified in parameter file [e-/pixel]
+ dark=lm_dark ; pick dark current value for LM band
+ pix_scale=img_pix_scale_lm ; dito pixel scale
+ lmin=lmin[0]
+ lmax=lmax[0]
+ res=grismrp[0]
+ lref=4.05
+ lslit=3. ; wavelength for slit width reference - from optical design
+ pix_size=lm_pix_size
+ well=lm_well
+ fileband='lm' ; for the atmosphere filename
+ end
+
+ 'm': begin
+ f1=10.286d
+ f2=10.286d
+ rd_noise=lm_rd_noise ; as specified in parameter file [e-/pixel]
+ dark=lm_dark
+ pix_scale=img_pix_scale_lm
+ lmin=lmin[0]
+ lmax=lmax[0]
+ lref=4.65
+ lslit=3. ; wavelength for slit width reference
+ res=grismrp[0]
+ pix_size=lm_pix_size
+ well=lm_well
+ fileband='lm' ; for the atmosphere filename....
+ end
+
+ 'n': begin
+ f1=8.571d
+ f2=8.571d
+ rd_noise=nq_rd_noise ; as specified in parameter file
+ dark=nq_dark
+ pix_scale=img_pix_scale_nq
+ lmin=lmin[3]
+ lmax=lmax[3]
+ res=grismrp[3]
+ lref=12.81
+ lslit=7. ; wavelength for slit width reference
+ pix_size=nq_pix_size
+ well=nq_well
+ ;dit=ndit
+ fileband=band ; for the atmsophere filename....
+ end
+
+
+ else: print, "Band not recognised"
+
+endcase
+
+
+; READ IN ATMOSPHERIC PROFILES
+;------------------------------
+lowfile=atm_dir+'paranal_'+fileband+'_3000.dat'
+highfile=atm_dir+'high_and_dry_'+fileband+'_3000.dat'
+
+if site EQ 'low' then begin
+ readcol, lowfile, F='D,D,x,D',l, trans, em, /silent
+ tel_t=286.3d
+ name='paranal'
+endif else if site EQ 'high' then begin
+ readcol, highfile,F='D,D,x,D', l, trans, em, /silent
+ tel_t=270.0d
+ name='high_and_dry'
+endif
+print, 'atmosphere data read'
+
+
+;perform some unit conversions on the emissivity values (from photons/s/um/m^2/arcsec^2 to W/cm^2/sr/um)
+;em=em*(h*c/l)*4.25d10. UNITS WOMAN, UNITS! PAY ATTENTION!
+em_l=em*(h*c/(l*1d-6))*1d-4*4.25d10
+
+; clip these arrays to the region of interest
+em_l=em_l[where((l gt lmin) and (l le lmax))]
+trans=trans[where((l gt lmin) and (l le lmax))]
+l=l[where((l gt lmin) and (l le lmax))]
+;plot, l, trans
+
+; calculate delta_l
+print, 'resolving power = ', res
+delta_l=l/res
+
+
+;# pixels in S/N area: spectral sampling is 2px/dl, spatial calculated from pixel scale
+;npix=2.*lref*1d-6*206265./42./(pix_scale*1d-3)
+
+if keyword_set(extended) then begin
+ if keyword_set(rh) then begin
+ npix=(2*lslit*1d-6*206265/42./(pix_scale*1d-3))*(2*rh/(pix_scale*1d-3))
+ endif else begin
+ npix=(2*lslit*1d-6*206265/42./(pix_scale*1d-3))*(1./(pix_scale*1d-3))
+ endelse
+endif else begin
+ npix=(lref*1d-6*206265./42./(pix_scale*1d-3))*(2*lslit*1d-6*206265/42./(pix_scale*1d-3))
+endelse
+
+npix=ceil(npix)
+
+print, 'npix = ', npix
+
+;calculate S/N reference area, in arcsec^2. Is equal to width of slit (2l/D) x psf FWHM (1.22l/D)
+sn_size=npix*(pix_scale*1d-3)^2
+
+print, 'sn_size = ', sn_size, ' arcsec^2'
+
+diff=l-lref
+tmp=min(diff, line, /absolute)
+print, 'wavelengh at position lines = ', l[line]
+
+;look up EE using appropriate AO mode
+if keyword_set(extended) then begin
+ if keyword_set(rh) then ee=0.5 else ee=1.
+endif else begin
+ if aomode eq 'ltao' then begin
+ ee_file='ee_files/atlas_eeav.dat'
+ readcol, ee_file, f='f,d,d,d', ee_snsize, ee_l, ee_m, ee_n, /silent
+ endif else begin
+ ee_file='ee_files/EnsquaredEnergy_AO_LMN_V10.dat'
+ readcol, ee_file, format='f,d,d,d', ee_snsize, ee_l, ee_m, ee_n, /silent
+ endelse
+
+ ee_list=dblarr(n_elements(ee_snsize))
+
+ case band of
+ 'l': ee_list=ee_l
+ 'm': ee_list=ee_m
+ 'n': ee_list=ee_n
+ ; 'q': ee_list=ee_q
+ end
+
+ ;but now sn_size and ee_snsize are vecors of different length -> need to lookup element by element
+ diff=ee_snsize-sqrt(sn_size*1d6)
+ tmp=min(diff, loc, /absolute)
+ if aomode eq 'ltao' then ee=ee_list[loc]/100. else ee=ee_list[loc]
+endelse
+
+print, 'ref = ', sqrt(sn_size*1d6), ' mas'
+
+print, 'ee = ', ee
+
+; calculate telescope transmission
+if (tel_em gt 0.1) then tel_thru=1.-tel_em else tel_thru=mir_ref^no_mir
+print, 'telescope transmission = ', tel_thru
+
+; calculate throughput
+obsmode='img'
+thru=metis_thru(obsmode, band, l)
+print, 'mean throughput of instrument = ', mean(thru)
+plot, l, thru, /ynozero, xtitle='micron', title=band
+
+
+; calculate dqe
+dqe=metis_dqe(l, band)
+print, 'mean DQE in filter band = ', mean(dqe)
+
+; calculate efficiency
+eff=thru*tel_thru*mean(dqe)*pcg
+print, 'mean total efficiency including DQE, pcg, telescope, and instrument = ', mean(eff)
+
+; total conversion factor
+conv=eff*delta_l*eff_area*lref/1.985d-19
+
+; flux from object
+fobj=sig*trans*3.*1d-19/lref^2 ; convert flux from mJy to [W/cm2/um]
+
+; BACKGROUNDS
+; telescope
+tel_bgrsr=planck(l*1d4, tel_t)*1d-3/!dpi ; in W/cm2/sr/um
+tel_bgr=tel_bgrsr*tel_em/4.25d10 ; in W/cm2/arcsec2/um
+
+;plot, l, tel_bgr, /ylog, yrange=[1d-18, 1d-13]
+
+; atmosphere
+em_l=em_l/4.25d10*tel_thru
+
+;window background
+win_bgr=metis_winbgr(l, tel_t)
+
+; add telescope and sky
+sky=tel_bgr+em_l+win_bgr ; in W/cm2/um/arcsec2
+
+; add in overhead to the clock time if specified
+if keyword_set(ovhd) then time=time*0.8
+
+; # detected electrons from sky & telescope
+nskypers=sky*sn_size*conv ; electrons per s per resolution element
+
+dit=well/max(nskypers/npix)
+frames=round(time/dit)
+nsky=nskypers*dit ; electrons per DIT in sn area
+print, 'optimal dit = ', dit, ' s'
+print, '# frames = ', frames
+print, 'max # electrons from sky in sn area = ', max(nsky), ' e-/DIT'
+
+; # detected electrons from object in s/n reference area
+nobj=fobj*ee*conv*dit
+sn=sqrt(frames)*nobj/sqrt(nobj+nsky+(npix*rd_noise^2)+(npix*dark*dit))
+
+
+;calculate minimum detectable flux in 1 hr to s/n of 10.
+minflx=10.*emp_fac*sqrt(nsky+(npix*rd_noise^2)+(npix*dit*dark))/(ee*trans*conv*dit*sqrt(frames)) ; in W/cm2/um
+minsig=minflx*l^2/3./1d-19
+minsig_line=minflx*delta_l*1d4
+
+if keyword_set(extended) then begin
+ if keyword_set(rh) then begin
+ print, 'sensitivity at s/n 10 in 1 hr = ', minsig[line]*1000., ' microJy in half-light radius of ', rh, 'arsec'
+ print, 'line sensitivity at s/n in 1 hr = ', minsig_line[line]*1d19, '*1d-19 W/m2'
+ endif else begin
+ print, 'sensitivity at s/n 10 in 1 hr = ', minsig*1000., ' microJy/arcsec^2'
+ print, 'line sensitivity at s/n in 1 hr = ', minsig_line[line]*1d19, '*1d-19 W/m2/arcsec^2'
+ endelse
+endif else begin
+ print, 'sensitivity at s/n 10 in 1 hr = ', minsig[line]*1000., ' microJy'
+ print, 'line sensitivity at s/n 10 in 1 hr = ', minsig_line[line]*1d19, '*1d-19 W/m2/arcsec^2'
+endelse
+
+
+out=[minsig[line], minsig_line[line]]
+
+return, out
+end
+
+
24 metis_pre_param.pro
@@ -0,0 +1,24 @@
+; Parameter file for the thermal properties of the pre-optics
+
+
+;temperatures
+;win_temp=tel_t ;entrance window temperature
+wfs_em=0.15 ;emissivity of the WFS dichroic
+pre_temp=85. ;pre-optics temperature
+wfs_temp=pre_temp ;dichroic temperature
+
+;parameters for window emissivity calcs
+n=2.4028 ;real part of refractive index @ 10.6 um
+r=(n-1)/(n+1)
+win_thick=1.2 ;window thickness [cm]
+
+;improvement factor in window transmission from anti-reflection coating - TBD
+ar_factor=1.3
+
+;re-imaging optics spec
+pre_surf=9 ;no. of reflective optics in the pre-optics
+pre_ref=0.99 ;reflectivity per pre-optics mirror
+;pre_em=1.-pre_ref
+;pre_emtot=9*pre_em*(1-(4*pre_em)) ;the emissivity for 9 cold mirrors
+pre_thru=pre_ref^pre_surf
+
23 metis_sens_ifu_param.pro
@@ -0,0 +1,23 @@
+
+;pro metis_sens_ifu_param
+;parameters file for sensitivity calculations
+
+;provisional temperatures
+hspec_temp_lm=65. ; Kelvin
+hspec_temp_n=25.
+
+;SPO path
+spo_no_surf=3 ;7 ;# of "normal" reflective optics, e.g. re-imaging & fold mirrors
+spo_ref_surf=0.99
+;spodic_trans=0.85
+slicer_ref=0.99 ;to be multiplied by slicing loss, calculated in code
+slices_lm=24.
+slices_n=15.
+
+;SMO path
+smo_no_surf=7 ;6 ;# "normal" surfaces
+smo_ref_surf=0.99
+no_grating=1 ;2
+grating_eff=0.8^no_grating
+pix_spat=2.d ;no. pixels per spatial res element
+pix_spec=2.5 ;dito spectral
22 metis_sens_img_param.pro
@@ -0,0 +1,22 @@
+
+;pro metis_sens_img_param
+;parameters file for sensitivity calculations for the IMAGER
+
+
+
+no_surf=15 ;number of cold surfaces. 4 pre-optics+3 de-rotator+3 collimator+2 folding mirrors+3 camera
+ref_surf=0.99 ;reflectance per cold surface
+window_trans=0.95
+no_dichroic=1
+dichroic_trans=0.8^no_dichroic
+;pix_spat=3.d ;no. pixels per spatial res element. assume nyquist sampled.
+thru=ref_surf^no_surf*window_trans*dichroic_trans
+
+pix_scale_lm=8.6 ; mas/pixel
+pix_scale_nq=17.2 ; mas/pixel
+;pix_spec=2. ; for testing - REMOVE
+
+print, 'imager throughput = ', thru
+
+;end
+
49 metis_sens_param.pro
@@ -0,0 +1,49 @@
+
+;pro metis_sens_param
+; COMMON parameters to all modes and bands
+;instrument parameters moved to metis_sen_img_param and metis_sens_ifu_param.pro
+
+; file locations
+def_dir='c:/metis/code_public/'
+atm_dir=def_dir+'atm/' ; location of atmospehric profiles
+ee_dir=def_dir+'ee_files/' ; location of encircled energy tables
+profiles_dir=def_dir+'profiles/' ; location of miscellaneous input data, mainly optical profiles e.g. throughputs, resolutions etc
+
+;general constants
+h=6.63d-34 ;Js
+k_b=1.38d-23 ;J/K
+c=3d8 ;m/s
+
+;telescope parameters
+prim_area=!dpi*(21)^2 ;telescope primary area
+obs=9.2*prim_area/100 ;obscuration
+eff_area=(prim_area-obs)*1e4 ;effective area in cm^2
+mir_ref=0.98d ;mirror reflectivity
+no_mir=5 ;no. telescope mirrors
+
+;detector description - useful for output reference
+lm_det='Teledyne Hawaii-II detector for LM-band, 18 um pitch, 2k x 2k px'
+nq_det='Raytheon Aquarius detector for N band, 30 um pitch, 1k x 1k px'
+
+; polarimetry: half-wave plate throughput
+;pol_thru=0.64
+
+;detector parameters (per pixel!)
+lm_rd_noise=20. ;read noise [e-/frame]
+lm_dark=0.5 ;dark current [e-/s]
+lm_well=6.5e4 ;well depth [e-]
+nq_rd_noise=1d3 ;read noise [e-/frame]
+nq_dark=2d3 ;dark current [e-/s]
+nq_well=7d6 ;50% well depth (low gain) [e-]
+
+lm_pix_size=0.0018d ; pixel size [cm]
+nq_pix_size=0.003d
+
+
+pcg=1. ;photo-conductive gain
+gdb=1. ;gain dispersion beta
+qe_scale=0.7 ;QE scaling factor
+emp_fac=sqrt(2) ;empirical factor
+
+
+;end
117 metis_thru.pro
@@ -0,0 +1,117 @@
+function metis_thru, mode, band, x, POL=pol
+
+; this function calculates the throughput of METIS for a given mode of observation using some
+; custom functions for particular components, developed for metis_thermal
+
+; the output can feed into the sensitivity model
+
+; INPUTS:
+; mode = observation mode, 'img', 'lspec' or 'hspec'
+; band = band of observation, 'l', 'm', 'n' or 'q'
+; x = the wavelength grid on which to calculate the output
+
+; KEYWORDS:
+; pol = sets polarimetry
+
+;************************************
+;*CONSTANTS *
+;************************************
+;pre_surf=9 ;no. of reflective optics in the pre-optics
+;pre_ref=0.99 ;reflectivity per pre-optics mirror
+;pre_thru=pre_ref^pre_surf
+;ar_factor=1.3
+;thru=1.
+
+;wollaston_thru=0.9 ; throughput of the wollaston prism in METIS
+
+; CONSTANTS ALL READ IN VIA PARAMETER FILES
+@metis_sens_param
+@metis_pre_param
+@metis_thermal_ifu_param
+@metis_thermal_img_param
+
+;**********************************************************************
+;* WINDOW TRANSMISSION CURVE also used for prism transmission for IFU*
+;**********************************************************************
+winfile=profiles_dir+'znse_trans.dat'
+readcol, winfile, format='d,d,d', window_l, window_trans4, window_trans12, skipline=3, /silent ;read in transmission spectrum
+window_trans=interpol(window_trans12, window_l, x) ;interpolate onto l grid
+for i=0l, n_elements(x)-1 do begin
+ if (x[i] lt 14.) then window_trans[i]=0.72
+ if (window_trans[i] lt 0.) then window_trans=0.
+endfor
+
+window_trans=window_trans*ar_factor ;apply anti-reflection improvement
+
+prism_trans=interpol(window_trans4, window_l, x)
+for i=0l, n_elements(x)-1 do begin
+ if (x[i] lt 14.) then prism_trans[i]=0.72
+ if (prism_trans[i] lt 0.) then prism_trans[i]=0.
+endfor
+prism_trans=prism_trans*ar_factor
+
+;*******************************
+;* WFS DICHROIC *
+;*******************************
+
+wfsdic_trans=metis_wfsdic(x)
+
+;*******************************
+;* BAND-SPLITTING DICHROIC *
+;*******************************
+
+bandic_profs=metis_bandic(x, band)
+bandic_trans=bandic_profs[*,0]
+
+;*******************************
+;* IMAGER THROUGHPUT *
+;*******************************
+
+if mode eq 'img' then begin
+
+ thru=pre_thru*img_thru*window_trans*wfsdic_trans*bandic_trans
+ if keyword_set(pol) then thru=thru*wollaston_thru
+;oplot, x, thru, col=255
+
+;*******************************
+;* LSPEC THROUGHPUT *
+;*******************************
+
+
+endif else if mode eq 'lspec' then begin
+
+ grism_trans=window_trans
+ thru=pre_thru*img_thru*window_trans*wfsdic_trans*bandic_trans*grism_trans
+ ;oplot, x, thru, col=255
+
+;*******************************
+;* HSPEC THROUGHPUT *
+;*******************************
+
+endif else if mode eq 'hspec' then begin
+ sl_loss=dblarr(n_elements(x))
+ for i=0l, n_elements(x)-1 do begin
+ if (x[i] le 7.) then begin
+ sl_loss[i]=0.85d*(x[i]/3.7d)^0.25
+ endif else begin
+ if (x[i] gt 15.) then begin
+ sl_loss[i]=0.88d*(x[i]/18.d)^0.25
+ endif else begin
+ sl_loss[i]=0.88d*(x[i]/9.d)^0.25
+ endelse
+ endelse
+endfor
+
+ spo_thru=spo_ref_surf^spo_no_surf*wfsdic_trans*window_trans*bandic_trans
+ smo_thru=smo_ref_surf^smo_no_surf*grating_eff*prism_trans*slicer_ref*sl_loss
+ thru=spo_thru*smo_thru
+ ;oplot, x, thru, col=255
+
+endif
+
+return, thru
+
+
+
+end
+
16 metis_wfsdic.pro
@@ -0,0 +1,16 @@
+function metis_wfsdic, x
+
+; this calculates the transmission profile of the METIS dichroic that splits the light off to the WFS
+; it is located just behind the entrance window in the cryostat
+
+trans=dblarr(n_elements(x))
+
+for i=0l, n_elements(x)-1 do begin
+ if (x[i] le 2.5) then trans[i]=0. else begin
+ if ((x[i] gt 2.5) and (x[i] le 3.5)) then trans[i]=0.85*(x[i]-2.5) else trans[i]=0.85
+ endelse
+endfor
+
+
+return, trans
+end
20 metis_winbgr.pro
@@ -0,0 +1,20 @@
+function metis_winbgr, x, temp
+
+; returns the entrance window background vs. wavelength in W/cm2/um/arcsec2
+
+n=2.4028 ;real part of refractive index @ 10.6 um
+r=(n-1)/(n+1)
+win_thick=1.2 ;window thickness [cm]
+ ;read in window absortion coefficient and calculate emissivity
+readcol, 'c:/metis/thermal/metis_thermal/znse_abs.dat', format='d,d', abs_l, alpha, skipline=4, /silent
+win_em=((1-r^2)*(1-exp(-alpha*win_thick)))/(1-(r^2*exp(-alpha*win_thick))) ;r and d defined in metis_thermal_pre_param
+win_em=interpol(win_em, abs_l, x)
+;win_em[where(l gt 20.)]=1. ;set the emissivity to level off after 20 micron at 100%
+
+;calcuate window background
+bgr=win_em*planck(x*1d4, temp)*1d-3/!dpi
+bgr=bgr/4.25d10 ; convert from sr to arcsec2
+
+return, bgr
+
+end
287 profiles/bandic_prof.dat
@@ -0,0 +1,287 @@
+Wavelength 1a-R 1a-T
+1.5 85.21 2.69
+1.6 92.37 3.57
+1.7 18.51 68.58
+1.8 83.68 2.75
+1.9 67.53 6.84
+2 95.33 3.13
+2.1 91.33 6.64
+2.2 84.14 10.61
+2.3 64.97 23.78
+2.4 95.25 2.65
+2.5 70.57 19.67
+2.6 98.20 0.79
+2.7 77.17 9.93
+2.8 93.15 3.21
+2.9 88.26 7.28
+3 68.69 26.65
+3.1 69.15 22.28
+3.2 95.62 3.14
+3.3 96.75 2.53
+3.4 78.18 18.08
+3.5 92.71 5.14
+3.6 90.39 4.28
+3.7 93.11 3.30
+3.8 90.99 3.99
+3.9 87.77 5.70
+4 85.65 8.32
+4.1 86.35 10.48
+4.2 72.29 23.05
+4.3 42.26 52.37
+4.4 19.83 74.88
+4.5 36.10 59.14
+4.6 70.74 22.92
+4.7 96.58 1.59
+4.8 98.90 0.26
+4.9 99.39 0.08
+5 99.56 0.04
+5.1 99.64 0.03
+5.2 99.68 0.02
+5.3 99.68 0.02
+5.4 99.67 0.03
+5.5 99.62 0.05
+5.6 99.51 0.10
+5.7 99.25 0.23
+5.8 98.43 0.73
+5.9 94.50 3.61
+6 63.60 29.58
+6.1 56.90 39.02
+6.2 65.38 32.82
+6.3 49.53 48.69
+6.4 31.05 66.85
+6.5 50.68 47.82
+6.6 66.69 32.25
+6.7 71.52 27.54
+6.8 69.59 29.41
+6.9 61.49 37.30
+7 45.96 52.49
+7.1 24.53 73.50
+7.2 7.46 90.34
+7.3 3.26 94.60
+7.4 6.22 91.81
+7.5 8.88 89.26
+7.6 9.13 89.06
+7.7 7.81 90.39
+7.8 6.47 91.72
+7.9 6.21 92.01
+8 7.06 91.20
+8.1 8.36 89.96
+8.2 9.38 88.98
+8.3 9.75 88.64
+8.4 9.49 88.92
+8.5 8.87 89.56
+8.6 8.26 90.18
+8.7 7.94 90.51
+8.8 8.03 90.45
+8.9 8.44 90.07
+9 8.98 89.56
+9.1 9.45 89.12
+9.2 9.70 88.88
+9.3 9.70 88.90
+9.4 9.48 89.13
+9.5 9.14 89.48
+9.6 8.80 89.83
+9.7 8.57 90.07
+9.8 8.53 90.11
+9.9 8.70 89.96
+10 9.05 89.63
+10.1 9.50 89.20
+10.2 9.97 88.75
+10.3 10.38 88.36
+10.4 10.67 88.08
+10.5 10.81 87.95
+10.6 10.80 87.97
+10.7 10.65 88.12
+10.8 10.41 88.37
+10.9 10.13 88.66
+11 9.86 88.94
+11.1 9.64 89.17
+11.2 9.51 89.31
+11.3 9.49 89.33
+11.4 9.58 89.25
+11.5 9.78 89.06
+11.6 10.06 88.80
+11.7 10.38 88.49
+11.8 10.72 88.16
+11.9 11.05 87.86
+12 11.33 87.59
+12.1 11.54 87.38
+12.2 11.68 87.25
+12.3 11.75 87.20
+12.4 11.74 87.21
+12.5 11.67 87.29
+12.6 11.55 87.42
+12.7 11.40 87.57
+12.8 11.24 87.74
+12.9 11.09 87.90
+13 10.96 88.03
+13.1 10.87 88.12
+13.2 10.84 88.17
+13.3 10.86 88.15
+13.4 10.94 88.08
+13.5 11.08 87.95
+13.6 11.27 87.77
+13.7 11.49 87.55
+13.8 11.75 87.31
+13.9 12.02 87.05
+14 12.29 86.78
+14.1 12.55 86.53
+14.2 12.79 86.30
+14.3 13.00 86.10
+14.4 13.18 85.93
+14.5 13.30 85.81
+14.6 13.39 85.74
+14.7 13.42 85.71
+14.8 13.40 85.73
+14.9 13.34 85.79
+15 13.24 85.90
+15.1 13.11 86.04
+15.2 12.94 86.21
+15.3 12.75 86.40
+15.4 12.55 86.60
+15.5 12.34 86.82
+15.6 12.13 87.03
+15.7 11.93 87.23
+15.8 11.74 87.42
+15.9 11.58 87.59
+16 11.44 87.73
+16.1 11.33 87.85
+16.2 11.25 87.93
+16.3 11.20 87.99
+16.4 11.19 88.01
+16.5 11.20 87.99
+16.6 11.25 87.95
+16.7 11.32 87.89
+16.8 11.41 87.80
+16.9 11.53 87.69
+17 11.65 87.57
+17.1 11.78 87.45
+17.2 11.92 87.32
+17.3 12.05 87.19
+17.4 12.18 87.07
+17.5 12.30 86.95
+17.6 12.40 86.86
+17.7 12.49 86.78
+17.8 12.55 86.72
+17.9 12.59 86.68
+18 12.61 86.67
+18.1 12.60 86.68
+18.2 12.56 86.72
+18.3 12.50 86.79
+18.4 12.41 86.88
+18.5 12.30 86.99
+18.6 12.16 87.13
+18.7 12.01 87.28
+18.8 11.84 87.45
+18.9 11.65 87.64
+19 11.46 87.83
+19.1 11.26 88.03
+19.2 11.07 88.23
+19.3 10.87 88.42
+19.4 10.69 88.60
+19.5 10.52 88.77
+19.6 10.38 88.92
+19.7 10.26 89.04
+19.8 10.17 89.13
+19.9 10.11 89.19
+20 10.10 89.20
+20.1 10.10 88.75
+20.2 10.20 88.88
+20.3 10.34 88.89
+20.4 10.53 88.68
+20.5 10.78 88.44
+20.6 11.08 88.05
+20.7 11.46 87.72
+20.8 11.90 87.41
+20.9 12.39 86.88
+21 12.93 86.19
+21.1 13.50 85.21
+21.2 14.16 84.44
+21.3 14.91 84.00
+21.4 15.69 83.35
+21.5 16.50 82.47
+21.6 17.34 81.44
+21.7 18.20 80.22
+21.8 19.06 78.82
+21.9 20.00 77.72
+22 21.01 76.94
+22.1 22.02 75.96
+22.2 23.01 74.81
+22.3 24.01 73.52
+22.4 25.02 72.35
+22.5 26.07 71.36
+22.6 27.11 70.39
+22.7 28.17 69.52
+22.8 29.21 68.55
+22.9 30.22 67.48
+23 31.26 66.68
+23.1 32.30 66.01
+23.2 33.30 65.19
+23.3 34.26 64.26
+23.4 35.18 63.20
+23.5 36.04 61.98
+23.6 36.88 60.77
+23.7 37.70 59.61
+23.8 38.50 58.50
+23.9 39.31 57.62
+24 40.20 57.33
+24.1 41.04 56.98
+24.2 41.81 56.37
+24.3 42.54 55.65
+24.4 43.24 55.00
+24.5 43.92 54.33
+24.6 44.54 53.58
+24.7 45.14 52.81
+24.8 45.70 52.00
+24.9 46.22 51.14
+25 46.66 50.01
+25.1 47.09 48.92
+25.2 47.58 48.36
+25.3 48.15 48.32
+25.4 48.74 48.51
+25.5 49.27 48.49
+25.6 49.76 48.36
+25.7 50.19 48.09
+25.8 50.55 47.57
+25.9 50.85 46.87
+26 51.17 46.38
+26.1 51.53 46.17
+26.2 51.91 46.18
+26.3 52.24 46.02
+26.4 52.49 45.58
+26.5 52.65 44.81
+26.6 52.79 44.05
+26.7 52.99 43.65
+26.8 53.27 43.71
+26.9 53.53 43.70
+27 53.75 43.60
+27.1 53.94 43.42
+27.2 54.11 43.25
+27.3 54.30 43.18
+27.4 54.43 42.95
+27.5 54.56 42.77
+27.6 54.63 42.41
+27.7 54.64 41.88
+27.8 54.62 41.26
+27.9 54.55 40.51
+28 54.49 39.87
+28.1 54.49 39.48
+28.2 54.45 39.02
+28.3 54.39 38.51
+28.4 54.33 38.05
+28.5 54.28 37.66
+28.6 54.30 37.58
+28.7 54.37 37.73
+28.8 54.44 37.87
+28.9 54.45 37.88
+29 54.38 37.59
+29.1 54.20 36.94
+29.2 53.93 36.01
+29.3 53.59 34.83
+29.4 53.26 33.71
+29.5 52.94 32.68
+29.6 52.65 31.79
+29.7 52.37 30.95
+29.8 52.09 30.15
+29.9 51.82 29.38
+30 51.55 28.65
7 profiles/filters.dat
@@ -0,0 +1,7 @@
+# Few filter definitions for METIS imager sensitivity calcs
+# 29/11/08
+#Name lambda_c[um] FWHM[um]
+L 3.78 0.58
+M 4.66 0.1
+N2 10.7 1.4
+Q1 17.65 0.83
8 profiles/grisms.dat
@@ -0,0 +1,8 @@
+#METIS grism specifications
+#S. Kendrew, Sep 09
+
+#lmin(um) lmax(um) 2pxRP
+2.8 5.2 1700
+3.4 4.2 4750
+4.4 5.6 4260
+8.0 14.0 940
103 profiles/metis_ifures_lm.dat
@@ -0,0 +1,103 @@
+METIS IFU resolving power values for LM band
+Updated Sep 28 09
+
+2.891943655 106.1192251
+2.916140166 109.9388123
+2.939448102 114.7577027
+2.960800615 106.1192666
+2.961860383 119.1066342
+2.983370196 124.9704356
+2.985573102 109.9388501
+3.009435871 114.7577374
+3.03238167 119.1066657
+3.033016352 106.1193046
+3.054403525 124.9704644
+3.058392919 109.9388846
+3.082837592 114.7577689
+3.106342941 119.1066942
+3.108842766 106.119339
+3.128901822 124.9704904
+3.134853625 109.9389156
+3.159909306 114.757797
+3.184002191 119.1067195
+3.188557597 106.1193694
+3.207124957 124.9705133
+3.215235285 109.9389429
+3.240933316 114.7578216
+3.265643875 119.1067415
+3.272467817 106.1193956
+3.28935945 124.9705331
+3.299847441 109.9389662
+3.326221638 114.7578424
+3.351582389 119.1067599
+3.360913584 106.1194175
+3.375921982 124.9705494
+3.389033096 109.9389854
+3.416120019 114.7578592
+3.442166118 119.1067744
+3.454272851 106.1194346
+3.467163469 124.9705621
+3.483173367 109.939
+3.511012623 114.7578717
+3.537782154 119.1067849
+3.552966762 106.1194465
+3.563473816 124.9705709
+3.582692923 109.9390097
+3.611327515 114.7578795
+3.638861829 119.1067909
+3.657466008 106.119453
+3.665287487 124.9705754
+3.688066394 109.9390142
+3.71754312 114.2163387
+3.745887216 117.6477309
+3.768298327 104.1960969
+3.773090059 122.5497197
+3.799825938 107.0507845
+3.83019585 110.8570346
+3.859398821 114.1875035
+3.886057426 101.0386395
+3.887425964 118.9453161
+3.91857023 103.8068214
+3.949889168 107.4977306
+3.980004709 110.7272761
+4.008907687 115.3409126
+4.011413613 97.88118197
+4.044975189 100.5628582
+4.077304399 104.1384265
+4.108391404 107.2670487
+4.138226739 111.7365091
+4.145126566 94.72372449
+4.179806854 97.31889502
+4.213213709 100.7791224
+4.245336961 103.8068214
+4.276166831 108.1321056
+4.288060742 91.56626701
+4.323936919 94.07493186
+4.358495762 97.41981832
+4.39172675 100.346594
+4.423619765 104.5277021
+4.441204082 88.40880952
+4.478361596 90.83096869
+4.51415474 94.06051424
+4.548572615 96.8863666
+4.581604741 100.9232985
+4.605690883 85.25135204
+4.64422468 87.58700552
+4.681343586 90.70121016
+4.717036297 93.42613922
+4.751291941 97.31889502
+4.782829933 82.09389456
+4.82284592 84.34304235
+4.861392607 87.34190608
+4.898458254 89.96591184
+4.93403157 93.7144915
+4.974139414 78.93643707
+5.01575621 81.09907919
+5.055844945 83.982602
+5.094393407 86.50568446
+5.131389851 90.11008798
+5.181390515 75.77897959
+5.224741575 77.85511602
+5.266500915 80.62329792
+5.306655811 83.04545709
+5.345194028 86.50568446
65 profiles/metis_ifures_n.dat
@@ -0,0 +1,65 @@
+METIS high-res IFU N-band resolcing power as a function of wavelength
+Based on optical design data of LM-band spectrograph
+Created by S. Kendrew on Wed Aug 26 14:00:10 2009
+
+wave (micron) res (x1000)
+ 7.0000000 60.752758
+ 7.1186441 63.262584
+ 7.2372881 65.941520
+ 7.3559322 60.752758
+ 7.4745763 63.262584
+ 7.5932203 65.941520
+ 7.7118644 60.752758
+ 7.8305085 63.262584
+ 7.9491525 65.941520
+ 8.0677966 60.752758
+ 8.1864407 63.262584
+ 8.3050847 65.941520
+ 8.4237288 60.752758
+ 8.5423729 63.262584
+ 8.6610169 65.941520
+ 8.7796610 60.752758
+ 8.8983051 63.262584
+ 9.0169492 65.941520
+ 9.1355932 60.752758
+ 9.2542373 63.262584
+ 9.3728814 65.941520
+ 9.4915254 60.752758
+ 9.6101695 63.262584
+ 9.7288136 65.941520
+ 9.8474576 60.502525
+ 9.9661017 63.262584
+ 10.084746 66.210136
+ 10.203390 60.502525
+ 10.322034 62.962963
+ 10.440678 65.349450
+ 10.559322 58.960265
+ 10.677966 61.111111
+ 10.796610 63.427407
+ 10.915254 56.983984
+ 11.033898 59.259259
+ 11.152542 61.709556
+ 11.271186 55.203234
+ 11.389831 57.407407
+ 11.508475 59.781132
+ 11.627119 53.422485
+ 11.745763 55.555556
+ 11.864407 57.852709
+ 11.983051 51.469905
+ 12.101695 53.703704
+ 12.220339 56.109334
+ 12.338983 49.529175
+ 12.457627 51.851852
+ 12.576271 54.353196
+ 12.694915 47.600295
+ 12.813559 50.000000
+ 12.932203 52.584297
+ 13.050847 45.683266
+ 13.169492 48.148148
+ 13.288136 50.802636
+ 13.406780 43.778088
+ 13.525424 46.296296
+ 13.644068 49.008213
+ 13.762712 42.026964
+ 13.881356 44.444444
+ 14.000000 47.047885
22 profiles/znse_abs.dat
@@ -0,0 +1,22 @@
+#Zinc Selenide bulk absorption coefficient vs. l
+#from plot in klein et al, 1994
+#l (micron) absorption coeff (1/cm)
+3. 0.00
+4. 0.00
+5. 0.00
+6. 0.00
+7. 0.00
+8. 0.0005
+9. 0.0006
+10. 0.0008
+11. 0.0015
+12. 0.0025
+13. 0.006
+14. 0.015
+15. 0.07
+16. 0.25
+17. 0.40
+18. 0.40
+19. 0.60
+20. 3.00
+
41 profiles/znse_trans.dat
@@ -0,0 +1,41 @@
+#Transmission profile for a 4 mm ZnSe window. Read off the graph provided by Crystran
+
+#l (um) thick=4mm thick=12mm
+2.5 0.72 0.72
+3. 0.72 0.72
+3.5 0.72 0.72
+4. 0.72 0.72
+4.5 0.72 0.72
+5. 0.72 0.72
+5.5 0.72 0.72
+6. 0.72 0.72
+6.5 0.72 0.72
+7. 0.72 0.72
+7.5 0.72 0.72
+8. 0.72 0.72
+8.5 0.72 0.72
+9. 0.72 0.72
+9.5 0.72 0.72
+10. 0.72 0.72
+10.5 0.72 0.72
+11. 0.72 0.72
+11.5 0.72 0.72
+12. 0.72 0.72
+12.5 0.72 0.72
+13. 0.72 0.72
+13.5 0.72 0.72
+14. 0.71 0.70
+14.5 0.705 0.67
+15. 0.68 0.62
+15.5 0.66 0.55
+16. 0.62 0.43
+16.5 0.61 0.35
+17. 0.60 0.18
+17.5 0.57 0.27
+18. 0.58 0.33
+18.5 0.56 0.30
+19. 0.50 0.20
+19.5 0.40 0.08
+20. 0.25 0.03
+
+

0 comments on commit 2a1f79a

Please sign in to comment.