; file: contam_add_fluffium.pro ; 1/18/04 - dd ; Note, use version number "4" to match the version of the ; time dependence file to be created to keep them paired... ; ---------- create acis_contam_abs_v4.tbl -------------- ; Get the v1 data: readcol, 'acis_contam_abs_v1.tbl', wav, ck, ok, fk ; read in the Fluffium transmission values: ;;readcol, 'acis_contam_fluf20thk.tbl', fwav, ftrans readcol, 'acis_contam_fluf15thkMOD.tbl', fwav, ftrans ; plot for fun and comparison... ;; plot, fwav, (ftrans)^1.52, xrange=[0.,50.0],/xsty, yrange=[0.7,1.02],/ysty ; ;; pre_print_portrait ;; !p.multi=[0,1,2] ;; plot, fwav, (ftrans)^1.52, xrange=[0.,50.0],/xsty, yrange=[0.7,1.02],/ysty ;; oplot, fwav50, ftrans50, linestyle=2 ;; oplot, [19.0],[0.885],PSYM=4 ;; plot, fwav(0:41), ftrans50/(ftrans(0:41))^1.52, xrange=[0.,50.0],/xsty, yrange=[0.9,1.10],/ysty ;; oplot, linestyle=1, [0.0,60.0],[0.0,0.0]+1.0 ;; oplot, linestyle=1, [0.0,60.0],[0.0,0.0]+1.02 ;; oplot, linestyle=1, [0.0,60.0],[0.0,0.0]+0.98 ;; device, /close ; 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) ; Plot things for fun and checking: plot, wav, ck oplot, wav, ftauout ; OK, now write out the five columns of data for the new ; contamination file: OPENW, fluf_unit, 'acis_contam_abs_v4.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 a modified head 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_factor = ( tauinf * ( 1.0 - exp(-1.0*(times-t0)/tefold) ) ) / 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 ; Write out the new time dependance for the 4 components, ; useing the reference value of: ; 2002.820 0.9846 1.1099 0.9157 1.0000 OPENW, fluf_unit, 'acis_contam_tau_t_v4.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) * 0.9846) + $ STRING(tau_factor(it) * 1.1099) + $ STRING(tau_factor(it) * 0.9157) + $ STRING(tau_factor(it) * 1.0000) CLOSE, fluf_unit FREE_LUN, fluf_unit - - -