; file: contam_add_fluffium.pro ; 5/25/04 - dd ; Note, use version number "5" to match the version of the ; time dependence file to be created to keep them paired... ; ---------- create acis_contam_abs_v5.tbl -------------- ; Get the v1 data: readcol, 'acis_contam_abs_v1.tbl', wav, ck, ok, fk ; read in the Fluffium transmission values: readcol, 'acis_contam_fluf15thkMOD.tbl', fwav, ftrans ; convert to fluffium tau: ftau = (-1.0*ALOG(ftrans)) > 0.00001 ; (was getting -0.0000 values) ; Interpolate the fluffium tau onto the contamination ; wavelength grid: ftauout = INTERPOL_SORT(ftau, fwav, wav) ; *** Now modify these values so that at relative thickness ; of 1.0 for all components is used at t = 2002.82. ; Previously the components need to be multiplied ; by: ; 2002.820 0.9846 1.1099 0.9157 1.0000 ; ; So: ck = ck * 0.9846 ok = ok * 1.1099 fk = fk * 0.9157 ftauout = ftauout * 1.486 ; Plot things for fun and checking: plot, wav, ck + ok + fk + ftauout oplot, wav, ck oplot, wav, ftauout ; Evaluate the tau_L value of this contaminant... ; ; Old weighting wavelengths and factors: ; L_wavs = [17.5625, 18.1625, 20.0625] ; 0.705964 0.682643 0.617994 keV ; f_BIs = [0.48, 0.47, 0.05] ; Gives tau_L = 0.464 for ftauout factor = 1.0 ; which is what was desired (Tennant tau = 0.460) ; ; Now, use new values from Alexey's 4/20/04 memo: L_wavs = !DDHC/[0.706, 0.638, 0.618, 0.559] f_BIs = [0.33, 0.58, 0.03, 0.06] ; ; This gives 0.506651 for ftauout factor = 1.0 ; ; We want tau_L of 0.564 , so adjust tauout factor to get this... ; factor of 1.486 does it... ; go back and put that factor above and now we get 0.564 ! ; ftauout_L = INTERPOL_SORT(ftauout, wav, L_wavs) ck_L = INTERPOL_SORT(ck, wav, L_wavs) ok_L = INTERPOL_SORT(ok, wav, L_wavs) fk_L = INTERPOL_SORT(fk, wav, L_wavs) tau_eff = TOTAL( EXP(-1.0*(ftauout_L + ck_L + ok_L + fk_L)) * f_BIs) tau_eff = -1.0*ALOG(tau_eff) print, 'Effective tau_L for this material is : ', tau_eff oplot, [L_wavs], tau_eff*[1.0,1.0,1.0,1.0], PSYM=2 ; OK, now write out the five columns of data for the new ; contamination file: OPENW, fluf_unit, 'acis_contam_abs_v5.tbl', /GET_LUN ; Go through the values... for iw=0,n_elements(wav)-1 do printf, fluf_unit, $ STRING(wav(iw)) + STRING(ck(iw)) + STRING(ok(iw)) + $ STRING(fk(iw))+STRING(ftauout(iw)) CLOSE, fluf_unit FREE_LUN, fluf_unit ; Manually append modified header lines to this data file. ; --------------------------------------------------------- ; ----------------- Tennant tau at 0.7 keV ----- ; Parameters of Tennant's tau700 curve: diyr = 365.25 tauinf = 0.589 t0 = 1999.0 + 239.0/diyr tefold = 761.0/diyr ; Reference time time_ref = 2002.82 ; tau700 at the reference time tau_ref = tauinf * ( 1.0 - exp(-1.0*(time_ref-t0)/tefold) ) ; tau_ref here is the ~0.7 keV tau we want the contamination file ; to give at t = 2002.82 . ; ----------------- Tennant time dependance ----- ; other times array out to 2007: times = 1999.0 + findgen(2*12*8+1)/24.0 ; factor by which to multiply the edges' taus at reference time ; for other times: tau_tennant = ( tauinf * ( 1.0 - exp(-1.0*(times-t0)/tefold) ) ) > 0.0 tau_factor = tau_tennant / tau_ref ; Positive values only please! tau_factor = tau_factor > 0.0 plot, times, tau_factor, $ xrange=[1999.0,2007.0],/xsty, yrange=[-0.05,1.5],/ysty oplot, [1999.0, 2007.0], [1.0,1.0], LINESTYLE=1 oplot, 2002.82+[0.0, 0.0], [0.0,1.7], LINESTYLE=1 ; ----------------- Alexey's tau_L S-arry CHIPY=177 ----- ; times for output product ; same as above ;;times = 1999.0 + findgen(2*12*8+1)/24.0 ; Alexey's parameters and equations tlaunch = 1999.56 talex = (times - 1999.56) > 0.0 ; equ.3 tau_cs = 0.63997 * (1.0 - EXP(-1.0*talex/2.0541)) ; equ.4 tau_bs = 0.87532 * (1.0 - EXP(-1.0*talex/1.4093)) ; equ.5 tau_ts = 0.81544 * (1.0 - EXP(-1.0*talex/1.5362)) y0 = 512.0 yref = 177.0 alpha1 = 5.5 alpha2 = 4.5 ; equ.15 - CHIPY < 512 tau_yref = tau_cs + (tau_bs - tau_cs) * $ ( ABS((yref-y0)/(64.0-y0))^alpha1 ) ; Compare the Tennant and Alexy tau values... plot, times, tau_yref, $ xrange=[1999.0,2007.0],/xsty, yrange=[-0.05,0.8],/ysty oplot, times, tau_tennant, LINESTYLE=2 oplot, 2002.82+[0.0, 0.0], [0.0,1.7], LINESTYLE=1 ; Plot the tau_factor for Alexy tau... ;;tau_tyref = INTERPOL_SORT(tau_yref, times, 2002.82) ;;print, tau_tyref ;; 0.565601 ; tau_factor is the ratio of the desired tau ; to the tau that the contamination file has: tau_contam_file = 0.564 tau_factor = tau_yref / tau_contam_file plot, times, tau_factor, $ xrange=[1999.0,2007.0],/xsty, yrange=[-0.05,1.5],/ysty oplot, [1999.0, 2007.0], [1.0,1.0], LINESTYLE=1 oplot, 2002.82+[0.0, 0.0], [0.0,1.7], LINESTYLE=1 ; Write out the new time dependance for the 4 components, ; using the reference value of: ; 2002.820 1.0000 1.0000 1.0000 1.0000 OPENW, fluf_unit, 'acis_contam_tau_t_v5.tbl', /GET_LUN ; Go through the values... for it=0, n_elements(times)-1 do printf, fluf_unit, $ STRING(times(it)) + $ STRING(tau_factor(it) * 1.0000) + $ STRING(tau_factor(it) * 1.0000) + $ STRING(tau_factor(it) * 1.0000) + $ STRING(tau_factor(it) * 1.0000) CLOSE, fluf_unit FREE_LUN, fluf_unit - - -