; 2001.06.11 ; plot new arfs vs old, and data ; new arfs have modified mean qe, and qe uniformity. IF !ioflags.do_read EQ 1 THEN BEGIN farfs_new = './Arf/' + $ ['hrcf01715_002N001LEG_-1_garf-new.fits', $ 'hrcf01715_002N001LEG_1_garf-new.fits'] farfs_old = './Arf/' + $ ['hrcf01715_002N001LEG_-1_garf-old.fits', $ 'hrcf01715_002N001LEG_1_garf-old.fits'] farfs_new_qu = './Arf/' + $ ['hrcf01715_002N001LEG_-1_garf-unewq.fits', $ 'hrcf01715_002N001LEG_1_garf-unewq.fits'] fpha = './Pha/hrcf01715N001_pha2.fits' p = mrdfits(fpha, 1, hp) anm = mrdfits(farfs_new[0], 1, hanm) anp = mrdfits(farfs_new[1], 1, hanp) aom = mrdfits(farfs_old[0], 1, haom) aop = mrdfits(farfs_old[1], 1, haop) anqum = mrdfits(farfs_new_qu[0], 1, hanqum) anqup = mrdfits(farfs_new_qu[1], 1, hanqup) scm = gsmooth(p[0].counts, 11) scp = gsmooth(p[1].counts, 11) xx = (anm.bin_lo+anm.bin_hi)/2. ; all grids are the same. ENDIF html_init, 'HRCS_QE_QEU_Test.html', lun_html, 'Test of HRC-S QE, QEU in mkgarf' printf, lun_html, html_header_n(1, 'Test of new HRC-S QE, QEU with mkgarf') printf, lun_html, html_par() printf, lun_html, 'dph '+ systime() printf, lun_html, html_par() printf, lun_html, $ ['Plots below show comparisons of LETG/HRC-S data (obsid 01715 = Mrk 421)', $ 'ARFs made with new QE and QE-Uniformity files (QEU),', $ 'and ARFs made with previous QE and QEU (uniform) files.', $ 'Direct inspection of the new QEU is done by making ARFS with the', $ 'new QE (on-axis), but with old QEU (uniform) and taking the ratio.'], $ format = '(a0)' printf, lun_html, html_par() printf, lun_html, $ 'The new trial Analysis Reference Data (ARD) files are:' printf, lun_html, html_br() printf, lun_html, html_href('./Ard/hrcsD1999-07-22qeN0004.fits.gz', 'hrcsD1999-07-22qeN0004.fits') printf, lun_html, html_br() printf, lun_html, html_href('./Ard/hrcsD1999-07-22qeuN0002.fits.gz', 'hrcsD1999-07-22qeuN0002.fits') printf, lun_html, html_par() printf, lun_html, $ 'To use these with mkgarf (or other CIAO tools), set these ardlib.par parameters as follows:' ; printf, lun_html, html_pre_begin() printf, lun_html, $ ['#---------------------------------------------------------------------------',$ '# AXAF HRC-S', $ '#---------------------------------------------------------------------------', $ 'AXAF_HRC-S1_QE_FILE,f,a, "./Ard/hrcsD1999-07-22qeN0004.fits[AXAF_QE1]",,,"Enter HRC-S1 Mean QE file"' , $ 'AXAF_HRC-S2_QE_FILE,f,a, "./Ard/hrcsD1999-07-22qeN0004.fits[AXAF_QE2]",,,"Enter HRC-S2 Mean QE file"', $ 'AXAF_HRC-S3_QE_FILE,f,a, "./Ard/hrcsD1999-07-22qeN0004.fits[AXAF_QE3]",,,"Enter HRC-S3 Mean QE file"', $ 'AXAF_HRC-S1_QEU_FILE,f,a,"./Ard/hrcsD1999-07-22qeuN0002.fits[AXAF_QEU1]",,,"Enter HRC-S1 QE Uniformity file"', $ 'AXAF_HRC-S2_QEU_FILE,f,a,"./Ard/hrcsD1999-07-22qeuN0002.fits[AXAF_QEU2]",,,"Enter HRC-S2 QE Uniformity file"', $ 'AXAF_HRC-S3_QEU_FILE,f,a,"./Ard/hrcsD1999-07-22qeuN0002.fits[AXAF_QEU3]",,,"Enter HRC-S3 QE Uniformity file"'], $ format = '(a0)' ; printf, lun_html, html_pre_end() printf, lun_html, html_br() printf, lun_html, html_par() printf, lun_html, 'The new and old ARFs are:' printf, lun_html, html_br() printf, lun_html, html_href('./Arf/hrcf01715_002N001LEG_-1_garf-new.fits', 'hrcf01715_002N001LEG_-1_garf-new.fits') printf, lun_html, html_br() printf, lun_html, html_href('./Arf/hrcf01715_002N001LEG_1_garf-new.fits', 'hrcf01715_002N001LEG_1_garf-new.fits') printf, lun_html, html_br() printf, lun_html, html_href('./Arf/hrcf01715_002N001LEG_-1_garf-old.fits', 'hrcf01715_002N001LEG_-1_garf-old.fits') printf, lun_html, html_br() printf, lun_html, html_href('./Arf/hrcf01715_002N001LEG_1_garf-old.fits', 'hrcf01715_002N001LEG_1_garf-old.fits') printf, lun_html, html_br() printf, lun_html, 'The new QE, but uniform QEU ARFs are:' printf, lun_html, html_br() printf, lun_html, html_href('./Arf/hrcf01715_002N001LEG_-1_garf-unewq.fits', 'hrcf01715_002N001LEG_-1_garf-unewq.fits') printf, lun_html, html_br() printf, lun_html, html_href('./Arf/hrcf01715_002N001LEG_1_garf-unewq.fits', 'hrcf01715_002N001LEG_1_garf-unewq.fits') ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;' !x.title = 'Wavelength ' +!anglbl !y.title = 'Counts/bin or k*Specresp' titl = sxpar(hp, 'obs_id') + ' ' + sxpar(hp, 'object') + ' ' cd = !d.n_colors-1 co = 222 cn = 155 plot, xx, scm, $ xra = [0, 70], /xst, $ title = titl + ' -orders', $ col = cd, $ psy = 10 oplot, xx, gsmooth(aom.specresp*2.5, 5), thick = 1, col = co, line = 2 oplot, xx, gsmooth(anm.specresp*2.5, 5), thick = 1, col = cn legend, ['data', 'old arf', 'new arf'], $ col = [!d.n_colors-1, 199, 155], $ line = [0, 2, 0], $ thick = [1, 1, 1], $ /top, /center id_plot fimg = './Img/HRCS_QE_QEU_garf_test_m_a.png' png_out, fimg printf, lun_html, html_par() printf, lun_html, 'Minus orders, short wavelengths:' printf, lun_html, html_br() printf, lun_html, html_image(fimg, 'Minus orders, short wave') printf, lun_html, html_par() plot, xx, scm, $ xra = [60, 180], /xst, $ title = titl + ' -orders', $ col = cd, $ psy = 10 oplot, xx, aom.specresp/1.8, thick = 2, col = co, line = 2 oplot, xx, anm.specresp/1.8, thick = 2, col = cn legend, ['data', 'old arf', 'new arf'], $ col = [!d.n_colors-1, 199, 155], $ line = [0, 2, 0], $ thick = [1, 1, 1], $ /top, /center id_plot fimg = './Img/HRCS_QE_QEU_garf_test_m_b.png' png_out, fimg printf, lun_html, html_par() printf, lun_html, 'Minus orders, long wavelengths:' printf, lun_html, html_br() printf, lun_html, html_image(fimg, 'Minus orders, long wave') printf, lun_html, html_par() plot, xx, scp, $ xra = [0, 70], /xst, $ yra = [0, 60], /yst, $ title = titl + ' +orders', $ col = cd, $ psy = 10 oplot, xx, aop.specresp*2.5, thick = 1, col = co, line = 2 oplot, xx, anp.specresp*2.5, thick = 1, col = cn legend, ['data', 'old arf', 'new arf'], $ col = [!d.n_colors-1, 199, 155], $ line = [0, 2, 0], $ thick = [1, 1, 1], $ /top, /center id_plot fimg = './Img/HRCS_QE_QEU_garf_test_p_a.png' png_out, fimg printf, lun_html, html_par() printf, lun_html, 'Plus orders, short wavelengths:' printf, lun_html, html_br() printf, lun_html, html_image(fimg, 'Plus orders, short wave') printf, lun_html, html_par() plot, xx, scp, $ xra = [60, 180], /xst, $ title = titl + ' +orders', $ col = cd, $ psy = 10 oplot, xx, aop.specresp/1.8, thick = 2, col = co, line = 2 oplot, xx, anp.specresp/1.8, thick = 2, col = cn legend, ['data', 'old arf', 'new arf'], $ col = [!d.n_colors-1, 199, 155], $ line = [0, 2, 0], $ thick = [1, 1, 1], $ /top, /center id_plot fimg = './Img/HRCS_QE_QEU_garf_test_p_b.png' png_out, fimg printf, lun_html, html_par() printf, lun_html, 'Plus orders, long wavelengths:' printf, lun_html, html_br() printf, lun_html, html_image(fimg, 'Plus orders, long wave') printf, lun_html, html_par() plot, xx, anp.specresp/aop.specresp, $ yra=[0.5,1.5], /yst, xra=[0,180], /xst, $ ytitl = 'ARF Ratio, new/old', col = cd, thick = 2 oplot, xx, anm.specresp/aom.specresp, col = cn, thick = 2 legend, ['plus', 'minus'], col = [cd, cn], line = [0, 0], thick = [2, 2], /top, /center id_plot fimg = './Img/HRCS_QE_QEU_garf_test_ratio.png' png_out, fimg printf, lun_html, html_par() printf, lun_html, 'Ratio of new/old:' printf, lun_html, html_br() printf, lun_html, html_image(fimg, 'Ratio, new/old') printf, lun_html, html_par() plot, xx, scm, $ xra = [0, 180], /xst, $ yra = [0, 50], /yst, $ title = titl + ' +-orders compared', $ col = cd, $ psy = 0 oplot, xx, scp, col = cn, psy = 0 oplot, xx, gsmooth(anm.specresp*2, 5), thick=2, col = 99, line = 2 oplot, xx, gsmooth(anp.specresp*2, 5), thick=2, col = 222, line = 2 legend, ['minus data', 'plus data', 'minus arf', 'plus arf'], $ col = [cd, cn, 99, 222], $ line = [0, 0, 2, 2], $ thick = [1, 1, 2, 2], $ /top, /center id_plot fimg = './Img/HRCS_QE_QEU_garf_test_pmcmp.png' png_out, fimg printf, lun_html, html_par() printf, lun_html, 'Comparison of plus and minus orders:' printf, lun_html, html_br() printf, lun_html, html_image(fimg, 'compare +&-') printf, lun_html, html_par() ;;;;;;;;;;;;;;;;; Ratio of w/ new qe and qeu to new qe but old qeu ;;;;;;;;;;;;;;;;; (==1) to obtain qeu only. plot, -xx, anm.specresp/anqum.specresp, $ yra=[0.5,1.5], /yst, xra=[-180,180], /xst, $ ytitl = 'ARF Ratio, (new qe*qeu) / (new qe)', col = cd, thick = 1 oplot, xx, anp.specresp/anqup.specresp id_plot fimg = './Img/HRCS_QE_QEU_garf_test_ratio_qeqeu_qe.png' png_out, fimg printf, lun_html, html_par() printf, lun_html, 'Ratio of new (qe*qeu/qe):' printf, lun_html, html_br() printf, lun_html, html_image(fimg, 'Ratio, new (qe*qeu)/qe') printf, lun_html, html_par() ;;;;;;; supporting data, scripts printf, lun_html, html_hr() printf, lun_html, $ html_href('./Sh/Run_mkgarf_letgs.sh', $ 'gARFs were made with Run_mkgarf_letgs.sh') printf, lun_html, html_br() printf, lun_html, $ html_href('./pro/Plt_garfs.pro', $ 'Plots (and this HTML file) were made with Plt_garfs.pro') printf, lun_html, html_br() printf, lun_html, html_par() printf, lun_html, 'Local (to some) links to top analysis tree w/ supporting data:' printf, lun_html, html_br() printf, lun_html, $ html_href('file:/nfs/wiwaxia/d1/dph/CXC/Test_ciao_2/LETGS/', $ '/nfs/wiwaxia/d1/dph/CXC/Test_ciao_2/LETGS/') printf, lun_html, ' (@MIT) ' printf, lun_html, html_br() printf, lun_html, $ html_href('file:/data/da/testing/mkgarf/LETGS/', $ '/data/da/testing/mkgarf/LETGS/') printf, lun_html, ' (@CfA) ' printf, lun_html, html_br() printf, lun_html, html_par() printf, lun_html, 'Primary supporting data are:' printf, lun_html, html_br() printf, lun_html, 'PHA file: hrcf01715_002N001_pha2.fits' printf, lun_html, html_br() printf, lun_html, 'Aspect file: hrcf01715_002N001_aoff1.fits' printf, lun_html, html_br() printf, lun_html, 'Events file: hrcf01715_002N001_evt2.fits' printf, lun_html, html_br() printf, lun_html, html_hr() printf, lun_html, 'dph@space.mit.edu ' ; html_close, lun_html END