; ; file: contam_twolevel.pro ; ; Make a composite transmission model based on Herman's ; correction curve but broken into two pieces: ; thinner and thicker regions with some fractional filling factor ; between them. ; ; The extra parameters allow simultaneously: ; ; - retaining the Carbon-edge jump at the level seen by Herman ; (very sensitive to the thin-layer thickness; at ~12/20/03 ; I'm using a jump from 42A to 44A of 0.04 to 0.88) ; ; *** 0.885 *** ; - adding an additional factor of ~0.92 in transmission at 19 A ; (depends on the combination of the thick-layer thickness and filling ; factor; again this is the extra factor at 12/20/03.) ; [Note: the 0.92 is the goal based on information from Catherine Grant ; combined with our E0102 measurement at O VIII and is approximate.] ; ; - having the additional factor decrease to ~0.97 by 13.5 A ; (Turns out the first two conditions above pretty much fix the 13.5 A ; value at ~0.96 for filling factors from 0.20 to 0.50.) ; ; 10/9,15/03 - dd ; ;--------------------------------------- ; Get the contamarf correction vs wavelength ; at the time of the second E0102 HETGS observation, 12/20/03 ; ; (Thanks to Amy for these arf's!) ; "original" uncorrected arf for obsid 3828 (E0102 II) ao = mrdfits("/nfs/taardad/d0/amy/data/E0102-72/obsid_3828/contamarf/" + $ "acisf3828MEG_-1_garf.fits.gz",1) ; contamarf corrected version: ac = mrdfits("/nfs/taardad/d0/amy/data/E0102-72/obsid_3828/contamarf/" + $ "acisf3828MEG_-1_garf_cc.fits.gz",1) ; print, tag_names(ao) ; ENERG_LO ENERG_HI SPECRESP BIN_LO BIN_HI FRACEXPO ; create the bin center values and the contamination effect: lams = 0.5*(ao.bin_lo + ao.bin_hi) ; effect of the contamination: rat = ac.specresp/ao.specresp ; The above are MEG arfs so no Carbon values... :( ; ; Add approximate Carbon jump values in by hand at the beginning ; of the file (0.04 above, 0.88 below from Dave H contamarf in ISIS at 2003.0) ; index above the carbon edge: i42a = 1 ; below the carbon edge: i44a = 0 ; ; add the values: lams(i42a)=42.0 rat(i42a)=0.04 lams(i44a)=44.0 rat(i44a)=0.88 ; So, from the above (or other means) we have: ; lams = wavelength ; rat = the nominal contamination absorption at 12/20/02 (HETGS E0102 II) ;--------------------------------------- ; Now create the two-level transmission version, rat2: ; ; filling factor of the thick fraction: ;;thkfill = 0.80 ;;thkfill = 0.50 ;;thkfill = 0.20 ; ; thick level's thickness in units of the nominal thickness: ;;thkfac = 1.40 ;;thkfac = 1.70 ;;thkfac = 2.80 ; ; thin level's thickness in units of the nominal thickness: ;;thnfac = 0.590 ;;thnfac = 0.812 ;;thnfac = 0.943 ; N9998 version which requires an additional ratrat^1.52 ... ; min trans ~ 0.822 (with the ^1.52 included) ;;thkfill = 0.20 ;;thkfac = 2.80 ;;thnfac = 0.943 ; ; N9998' version not requiring additional factor ; min trans ~ 0.851 , 3.5% more than ^1.52 version... ;;thkfill = 0.20 ;;thkfac = 3.9 ;;thnfac = 0.95 ; ; Use this for N9997 version not requiring additional factor ; min trans ~ 0.8736 , 6.3% more than ^1.52 version... thkfill = 0.15 thkfac = 5.7 thnfac = 0.97 ; mess around: ; mostly thin version: ;;thkfill = 0.20 ;;thkfac = 3.9 ;;thnfac = 0.95 ; 50-50 thin-thick: ;;thkfill = 0.50 ;;thkfac = 2.0 ;;thnfac = 0.805 rat2 = ( (1.0-thkfill) * (rat)^thnfac + thkfill * (rat)^thkfac ) ; Their ratio is the extra correction that has been added to ; the contamarf model by the two level version: ratrat = ( rat2/rat ) ;--------------------------------------- ; Now check the three criteria: ; - - - C edge jump value - - - print, '' print, ' C-edge jump', rat2(i44a)/rat2(i42a), ratrat(i44a)/ratrat(i42a) ; - - - Correction at 19 A - - - (want 0.92) corr_19a = 0.92 corr_19a = 0.885 below=where(lams lt 18.97) i19a = below(0) print, '' print, strcompress(lams(i19a))+ 'A : ', ratrat(i19a), ratrat(i19A)/corr_19a print, '' ; - - - Correction at 13.5 A - - - (want 0.97) ;;corr_13a = 0.97 ;;below=where(lams lt 13.5) ;;i13a = below(0) ;;print, lams(i13a), ratrat(i13a), ratrat(i13a)/corr_13a ; - - - other numbers of interest: ; minumum value of extra correction print, 'Minimum correction = ', min(ratrat) ; average thickness print, 'Average thickness = ', thkfill*thkfac + (1.0-thkfill)*thnfac ;--------------------------------------- ; And plot the two versions and their ratio: !p.multi=[0,1,2] plot, lams, rat, linestyle=2, $ XTITLE='Wavelength (A)', YTITLE='contamination transmission', $ TITLE='Contamination: Nominal(dashed) and Two-level(solid) at 12/20/03' oplot, lams, rat2 plot, lams, ratrat, yrange=[0.7,1.1], /yst, $ XTITLE='Wavelength (A)', YTITLE='Two-level/Nominal', $ TITLE='Ratio of Two-level to Nominal Transmission, with E0102 measurements' oplot, [0.0,50.0],[1.0,1.0], linestyle=1 ; and plot the "measured" points we want to 'fit': ; O VIII point with 1-sigma error xyouts, 17.0, 0.94, "O VIII meas." oplot, 18.97*[1.,1.], [0.0,1.5], linestyle=1 oplot, [18.97], [0.907], psym=2, symsize=2.0 oplot, 18.97*[1.0,1.0], 0.907+[-0.024,0.024], thick=2 ; O VII point with 1-sigma error (It's a triplett) xyouts, 22.5, 0.92, "O VII meas." oplot, 21.6*[1.,1.], [0.0,1.5], linestyle=1 oplot, 21.8*[1.,1.], [0.0,1.5], linestyle=1 oplot, 22.1*[1.,1.], [0.0,1.5], linestyle=1 oplot, [21.8], [0.913], psym=2, symsize=2.0 oplot, 21.8*[1.0,1.0], 0.913+[-0.030,0.030], thick=2 ; Ne IX point xyouts, 14.5, 0.97, "Ne IX meas." oplot, 13.5*[1.,1.], [0.0,1.5], linestyle=1 oplot, [13.5], [0.972], psym=2, symsize=2.0 oplot, 13.5*[1.0,1.0], 0.972+[-0.023,0.023], thick=2 ; Ne X point xyouts, 13.0, 1.07, "Ne X meas." oplot, 12.13*[1.,1.], [0.0,1.5], linestyle=1 oplot, [12.13], [1.072], psym=2, symsize=2.0 oplot, 12.13*[1.0,1.0], 1.072+[-0.030,0.030], thick=2 ; And Al-K: oplot, 8.32*[1.,1.], [0.0,1.5], linestyle=1 xyouts, 7.4, 1.05, "Al-K" ; and indicate the C-K points too xyouts, 43.0, 0.98, "C-K" ; finally the model parameters: xyouts, 30.0, 0.98, 'thkfill = '+string(thkfill,format='(F5.3)') xyouts, 30.0, 0.96, 'thkfac = '+string(thkfac,format='(F5.3)') xyouts, 30.0, 0.94, 'thnfac = '+string(thnfac,format='(F5.3)') ; Shall we blow every ones mind? ; OK! Add a little ; diagram of the model thickness/density ;(Do it from home later) ;;oplot,