From 37939b83cadd577f7585cf3ca6d11eb0cdabc13c Mon Sep 17 00:00:00 2001 From: vfioretti Date: Tue, 3 Oct 2023 17:08:29 +0200 Subject: [PATCH 01/14] resp_ae_BAND I updated for class T --- resp_ae_BAND/aeffi.pro | 13 ++++++++++--- resp_ae_BAND/maris.pro | 7 ++++++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/resp_ae_BAND/aeffi.pro b/resp_ae_BAND/aeffi.pro index b336511..386ad55 100644 --- a/resp_ae_BAND/aeffi.pro +++ b/resp_ae_BAND/aeffi.pro @@ -9,6 +9,7 @@ ; --------------------------------------- ; Modification history: ; 24/10/2013: JPG removed, saving output in postscript (V. Fioretti) +; 03/10/2023: Adding T class (V. Fioretti) pro aeffi,ee, a, run, fil, inde, bol @@ -35,11 +36,15 @@ pro aeffi,ee, a, run, fil, inde, bol wg=where((ee.evstatus eq 'G') eq bol) wl=where((ee.evstatus eq 'L') eq bol) ws=where((ee.evstatus eq 'S') eq bol) +wgls = where(((ee.evstatus eq 'G') eq bol) or ((ee.evstatus eq 'L') eq bol) or ((ee.evstatus eq 'S') or bol)) + ;w31=where((ee31.evstatus eq tip) eq bol) cag=canali(a(1,wg)*1000) cal=canali(a(1,wl)*1000) cas=canali(a(1,ws)*1000) +cagls=canali(a(1,wgls)*1000) + ;ca31=canali(a31(1,w31)*1000) canal=[10.,35,50,71,100,141,200,283,400,632,1000,1732,3000,5477,10000,20000,100000] @@ -83,20 +88,22 @@ TVLCT, 255 * RED, 255 * GREEN, 255 * BLUE plot_oo,er,smooth(cag/ff,2) $ ,psym=-3,yrange=[1,1000.],xrange=[10,100000.],xstyle=1,ystyle=1 $ - ,xtitle='Energy [MeV]',ytitle='Effective Area [cm!u2!n]',title='black:G, blue:L, red:S' + ,xtitle='Energy [MeV]',ytitle='Effective Area [cm!u2!n]',title='black:G, blue:L, red:S, green:T' oplot,er,smooth(cal/ff,2),psym=-3,color=1, thick=3 oplot,er,smooth(cas/ff,2),psym=-3,color=2, thick=3 ;oplot,er,smooth(ca31/ff,2),psym=-6,color=verde oplot,er,smooth(cag/ff,2),psym=-3,color=0, thick=3 +oplot,er,smooth(cagls/ff,2),psym=-3,color=3, thick=3 ;legend,['F4','F2','FT3-0','FT3-1'],color=[nero,blu,rosso,verde],linestyle=[0,0,0,0],/bot,/rig -fits_write,run+'_'+fil+'.ae',[ transpose(er(0:15)), $ +ffits_write,run+'_'+fil+'.ae',[ transpose(er(0:15)), $ transpose(smooth(cag/ff,2)), $ transpose(smooth(cal/ff,2)), $ - transpose(smooth(cas/ff,2)) ] + transpose(smooth(cas/ff,2)), $ + transpose(smooth(cagls/ff,2)) ] diff --git a/resp_ae_BAND/maris.pro b/resp_ae_BAND/maris.pro index 4e4d97b..9a6d29a 100644 --- a/resp_ae_BAND/maris.pro +++ b/resp_ae_BAND/maris.pro @@ -9,7 +9,8 @@ ; Authors: ; A. Giuliani, A. Chen (INAF/IASF Mi) ; --------------------------------------- - +; Modification history: +; 03/10/2023: Adding T class (V. Fioretti) @@ -28,6 +29,10 @@ for j=0,2 do begin endfor +wc=where((ee.evstatus eq tipo(0)) or (ee.evstatus eq tipo(1)) or (ee.evstatus eq tipo(2))) +mat=matmake16(a(1,wc)*1000,ee(wc).energy) +mmat(3,*,*)=mat + ;map,total(mmat(0,*,*),1),/scl fits_write,run+'_'+fil+'.rsp',mmat From c4102c09a15079ed0a557dd97e7ca00768eb6e18 Mon Sep 17 00:00:00 2001 From: vfioretti Date: Tue, 3 Oct 2023 17:48:03 +0200 Subject: [PATCH 02/14] aeffi updated --- resp_ae_BAND/aeffi.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resp_ae_BAND/aeffi.pro b/resp_ae_BAND/aeffi.pro index 386ad55..37158bd 100644 --- a/resp_ae_BAND/aeffi.pro +++ b/resp_ae_BAND/aeffi.pro @@ -99,7 +99,7 @@ oplot,er,smooth(cagls/ff,2),psym=-3,color=3, thick=3 ;legend,['F4','F2','FT3-0','FT3-1'],color=[nero,blu,rosso,verde],linestyle=[0,0,0,0],/bot,/rig -ffits_write,run+'_'+fil+'.ae',[ transpose(er(0:15)), $ +fits_write,run+'_'+fil+'.ae',[ transpose(er(0:15)), $ transpose(smooth(cag/ff,2)), $ transpose(smooth(cal/ff,2)), $ transpose(smooth(cas/ff,2)), $ From 8df8f0f3521b5fbc5f2a8503ce7f834bb1a63cc1 Mon Sep 17 00:00:00 2001 From: vfioretti Date: Tue, 3 Oct 2023 17:51:07 +0200 Subject: [PATCH 03/14] maris updated --- resp_ae_BAND/maris.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resp_ae_BAND/maris.pro b/resp_ae_BAND/maris.pro index 9a6d29a..d41e34b 100644 --- a/resp_ae_BAND/maris.pro +++ b/resp_ae_BAND/maris.pro @@ -19,7 +19,7 @@ pro maris,ee,a,the,phi,run,fil tipo=['G','L','S'] -mmat=fltarr(3,16,16) +mmat=fltarr(4,16,16) for j=0,2 do begin From 9e7e21d8eb998781175bcda4bcac2e8a544ac685 Mon Sep 17 00:00:00 2001 From: vfioretti Date: Tue, 3 Oct 2023 18:15:30 +0200 Subject: [PATCH 04/14] resp_ae_BAND H updated for T class --- AGILECalib_H/resp_ae_BAND/aeffi_H.pro | 12 ++++++++---- AGILECalib_H/resp_ae_BAND/maris_H.pro | 6 +++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/AGILECalib_H/resp_ae_BAND/aeffi_H.pro b/AGILECalib_H/resp_ae_BAND/aeffi_H.pro index 328ee40..9096105 100644 --- a/AGILECalib_H/resp_ae_BAND/aeffi_H.pro +++ b/AGILECalib_H/resp_ae_BAND/aeffi_H.pro @@ -36,11 +36,14 @@ pro aeffi_H,ee, a, run, fil, inde, bol wg=where((ee.evstatus eq 'G') eq bol) wl=where((ee.evstatus eq 'L') eq bol) ws=where((ee.evstatus eq 'S') eq bol) +wgls = where(((ee.evstatus eq 'G') eq bol) or ((ee.evstatus eq 'L') eq bol) or ((ee.evstatus eq 'S') or bol)) ;w31=where((ee31.evstatus eq tip) eq bol) cag=canali_H(a(1,wg)*1000) cal=canali_H(a(1,wl)*1000) cas=canali_H(a(1,ws)*1000) +cagls=canali(a(1,wgls)*1000) + ;ca31=canali(a31(1,w31)*1000) ;canal=[10.,35,50,71,100,141,200,283,400,632,1000,1732,3000,5477,10000,20000,100000] @@ -69,21 +72,22 @@ TVLCT, 255 * RED, 255 * GREEN, 255 * BLUE plot_oo,er,smooth(cag/ff,2) $ ,psym=-3,yrange=[1,1000.],xrange=[10,100000.],xstyle=1,ystyle=1 $ - ,xtitle='Energy [MeV]',ytitle='Effective Area [cm!u2!n]',title='black:G, blue:L, red:S' + ,xtitle='Energy [MeV]',ytitle='Effective Area [cm!u2!n]',title='black:G, blue:L, red:S, green:T' oplot,er,smooth(cal/ff,2),psym=-3,color=1, thick=3 oplot,er,smooth(cas/ff,2),psym=-3,color=2, thick=3 ;oplot,er,smooth(ca31/ff,2),psym=-6,color=verde oplot,er,smooth(cag/ff,2),psym=-3,color=0, thick=3 +oplot,er,smooth(cagls/ff,2),psym=-3,color=3, thick=3 ;legend,['F4','F2','FT3-0','FT3-1'],color=[nero,blu,rosso,verde],linestyle=[0,0,0,0],/bot,/rig -fits_write,run+'_'+fil+'_H.ae',[ transpose(er[0:numchannels-1]), $ +fits_write,run+'_'+fil+'.ae',[ transpose(er(0:15)), $ transpose(smooth(cag/ff,2)), $ transpose(smooth(cal/ff,2)), $ - transpose(smooth(cas/ff,2)) ] - + transpose(smooth(cas/ff,2)), $ + transpose(smooth(cagls/ff,2)) ] ;fits_write,fileflg+'.aeG',smooth(cag/ff,2) diff --git a/AGILECalib_H/resp_ae_BAND/maris_H.pro b/AGILECalib_H/resp_ae_BAND/maris_H.pro index 9644603..a87c5c4 100644 --- a/AGILECalib_H/resp_ae_BAND/maris_H.pro +++ b/AGILECalib_H/resp_ae_BAND/maris_H.pro @@ -19,7 +19,7 @@ pro maris_H,ee,a,the,phi,run,fil tipo=['G','L','S'] -mmat=fltarr(3,14,14) +mmat=fltarr(4,16,16) for j=0,2 do begin @@ -29,6 +29,10 @@ for j=0,2 do begin endfor +wc=where((ee.evstatus eq tipo(0)) or (ee.evstatus eq tipo(1)) or (ee.evstatus eq tipo(2))) +mat=matmake14(a(1,wc)*1000,ee(wc).energy) +mmat(3,*,*)=mat + ;map,total(mmat(0,*,*),1),/scl fits_write,run+'_'+fil+'_H.rsp',mmat From de64d8f9d89f4418da95b0af0fd5b8e33f711f97 Mon Sep 17 00:00:00 2001 From: vfioretti Date: Tue, 3 Oct 2023 18:23:32 +0200 Subject: [PATCH 05/14] resp_ae_BAND H updated for T class --- AGILECalib_H/resp_ae_BAND/aeffi_H.pro | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/AGILECalib_H/resp_ae_BAND/aeffi_H.pro b/AGILECalib_H/resp_ae_BAND/aeffi_H.pro index 9096105..e240c20 100644 --- a/AGILECalib_H/resp_ae_BAND/aeffi_H.pro +++ b/AGILECalib_H/resp_ae_BAND/aeffi_H.pro @@ -42,8 +42,7 @@ wgls = where(((ee.evstatus eq 'G') eq bol) or ((ee.evstatus eq 'L') eq bol) or ( cag=canali_H(a(1,wg)*1000) cal=canali_H(a(1,wl)*1000) cas=canali_H(a(1,ws)*1000) -cagls=canali(a(1,wgls)*1000) - +cagls=canali_H(a(1,wgls)*1000) ;ca31=canali(a31(1,w31)*1000) ;canal=[10.,35,50,71,100,141,200,283,400,632,1000,1732,3000,5477,10000,20000,100000] @@ -80,16 +79,16 @@ oplot,er,smooth(cas/ff,2),psym=-3,color=2, thick=3 oplot,er,smooth(cag/ff,2),psym=-3,color=0, thick=3 oplot,er,smooth(cagls/ff,2),psym=-3,color=3, thick=3 - ;legend,['F4','F2','FT3-0','FT3-1'],color=[nero,blu,rosso,verde],linestyle=[0,0,0,0],/bot,/rig -fits_write,run+'_'+fil+'.ae',[ transpose(er(0:15)), $ +fits_write,run+'_'+fil+'_H.ae',[ transpose(er[0:numchannels-1]), $ transpose(smooth(cag/ff,2)), $ transpose(smooth(cal/ff,2)), $ transpose(smooth(cas/ff,2)), $ transpose(smooth(cagls/ff,2)) ] + ;fits_write,fileflg+'.aeG',smooth(cag/ff,2) ;fits_write,fileflg+'.aeL',smooth(cal/ff,2) ;fits_write,fileflg+'.aeS',smooth(cas/ff,2) From 060dbf2c0088dfb7e131293ddf3bf231510453ec Mon Sep 17 00:00:00 2001 From: vfioretti Date: Tue, 3 Oct 2023 18:26:44 +0200 Subject: [PATCH 06/14] resp_ae_BAND H updated for T class --- AGILECalib_H/resp_ae_BAND/maris_H.pro | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/AGILECalib_H/resp_ae_BAND/maris_H.pro b/AGILECalib_H/resp_ae_BAND/maris_H.pro index a87c5c4..1e53d86 100644 --- a/AGILECalib_H/resp_ae_BAND/maris_H.pro +++ b/AGILECalib_H/resp_ae_BAND/maris_H.pro @@ -19,7 +19,7 @@ pro maris_H,ee,a,the,phi,run,fil tipo=['G','L','S'] -mmat=fltarr(4,16,16) +mmat=fltarr(4,14,14) for j=0,2 do begin @@ -29,10 +29,6 @@ for j=0,2 do begin endfor -wc=where((ee.evstatus eq tipo(0)) or (ee.evstatus eq tipo(1)) or (ee.evstatus eq tipo(2))) -mat=matmake14(a(1,wc)*1000,ee(wc).energy) -mmat(3,*,*)=mat - ;map,total(mmat(0,*,*),1),/scl fits_write,run+'_'+fil+'_H.rsp',mmat From a433046a35c85b6885c51f9801449e916f76fa31 Mon Sep 17 00:00:00 2001 From: vfioretti Date: Tue, 3 Oct 2023 18:32:02 +0200 Subject: [PATCH 07/14] resp_ae_BAND H updated for T class --- AGILECalib_H/resp_ae_BAND/aeffi_H.pro | 1 + AGILECalib_H/resp_ae_BAND/maris_H.pro | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AGILECalib_H/resp_ae_BAND/aeffi_H.pro b/AGILECalib_H/resp_ae_BAND/aeffi_H.pro index e240c20..af5369b 100644 --- a/AGILECalib_H/resp_ae_BAND/aeffi_H.pro +++ b/AGILECalib_H/resp_ae_BAND/aeffi_H.pro @@ -10,6 +10,7 @@ ; Modification history: ; 24/10/2013: JPG removed, saving output in postscript (V. Fioretti) ; 13/12/2015: new Fermi-style energy bands (A. Chen) +; 03/10/2023: T class added (V. Fioretti) pro aeffi_H,ee, a, run, fil, inde, bol diff --git a/AGILECalib_H/resp_ae_BAND/maris_H.pro b/AGILECalib_H/resp_ae_BAND/maris_H.pro index 1e53d86..6235cbd 100644 --- a/AGILECalib_H/resp_ae_BAND/maris_H.pro +++ b/AGILECalib_H/resp_ae_BAND/maris_H.pro @@ -10,7 +10,7 @@ ; A. Giuliani, A. Chen (INAF/IASF Mi) ; --------------------------------------- ; 13/12/2015: new Fermi-style energy bands (A. Chen) - +; 03/10/2023: T class added (V. Fioretti) From 21653558995b55c09bc3a8fd53b2556f6d4ab5d7 Mon Sep 17 00:00:00 2001 From: vfioretti Date: Fri, 6 Oct 2023 17:05:46 +0200 Subject: [PATCH 08/14] AGILECalib I0026 eff_area --- eff_area/AGILE_mksar_loop.pro | 6 +- eff_area/AGILE_write_all_sar_I0026.pro | 84 ++++++++++++++++++++++++++ eff_area/area.pro | 3 +- eff_area/interp_sar_I0026.pro | 38 ++++++++++++ eff_area/readaeff_I0026.pro | 49 +++++++++++++++ 5 files changed, 177 insertions(+), 3 deletions(-) create mode 100644 eff_area/AGILE_write_all_sar_I0026.pro create mode 100644 eff_area/interp_sar_I0026.pro create mode 100644 eff_area/readaeff_I0026.pro diff --git a/eff_area/AGILE_mksar_loop.pro b/eff_area/AGILE_mksar_loop.pro index ba8dd87..7f888c6 100644 --- a/eff_area/AGILE_mksar_loop.pro +++ b/eff_area/AGILE_mksar_loop.pro @@ -16,6 +16,7 @@ ; Modification history: ; 13/11/2013: selecting the /aref directory (V. Fioretti) ; 6/11/2015: loading the environment variable (V. Fioretti) +; 6/10/2023: T class added (V. Fioretti) ae_path = GETENV('CALIB_AE_RSP') ae_path = ae_path+'/aref' @@ -50,13 +51,14 @@ for t=0, nthetas-1 do begin openw,u,fileperandrew,width=1000,/get_lun printf,u - printf,u,' E AeffG AeffL AeffS' + printf,u,' E AeffG AeffL AeffS AeffT' printf,u for i=0,n_elements(ener)-1 do begin printf,u, ener[i], area(ae_path=ae_path, energ=ener[i], tip='G', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ area(ae_path=ae_path, energ=ener[i], tip='L', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ - area(ae_path=ae_path, energ=ener[i], tip='S', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec) + area(ae_path=ae_path, energ=ener[i], tip='S', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ + area(ae_path=ae_path, energ=ener[i], tip='T', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec) endfor free_lun,u diff --git a/eff_area/AGILE_write_all_sar_I0026.pro b/eff_area/AGILE_write_all_sar_I0026.pro new file mode 100644 index 0000000..e445157 --- /dev/null +++ b/eff_area/AGILE_write_all_sar_I0026.pro @@ -0,0 +1,84 @@ +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; % AGILE_write_all_sar_I0026.pro % +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; Description: +; Effective area production - step 2 +; Reading: +; - AG_GRID_G0017_S0001_I0007_template.sar.gz +; - __.txt +; Calling: +; - readaeff_I0026.pro, interp_sar_I0026.pro, initheads.pro +; Output: +; AG_GRID_G0017_S${filter}${eventtype}_I0026.sar.gz +; --------------------------------------- +; Authors: +; A. Chen (INAF/IASF Mi) +; --------------------------------------- +; Modification history: +; 06/10/2023: copied from AGILE_write_all_sar_I0023.pro (V. Fioretti) +; 06/10/2023: I0026 and T class added (V. Fioretti) + + +@readaeff_I0026 +@interp_sar_I0026 + +sar_path = GETENV('CALIB_AE_RSP') +sar_path = sar_path+'/sar' + +; .sar.gz path keyword (0 = Default, 1 = enter new path) +sar_path_key = 0 + +read, sar_path_key, PROMPT = '% - .sar.gz directory [0 = $CALIB_AE_RSP/sar, 1 = new directory]:' +if sar_path_key EQ 1 then read, sar_path, PROMPT = '% - .sar.gz directory (e.g. /home):' + +ae_path = GETENV('CALIB_AE_RSP') +ae_path = ae_path+'/aref' +; .ae path keyword (0 = Default, 1 = enter new path) +ae_path_key = 0 + +read, ae_path_key, PROMPT = '% - .ae directory [0 = $CALIB_AE_RSP/aref, 1 = new directory]:' +if ae_path_key EQ 1 then read, ae_path, PROMPT = '% - .ae directory (e.g. /home):' + +template = sar_path+'/AG_GRID_G0017_S0001_I0007_template.sar.gz' + +fileid = 'I0026' +factor = [[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] + +table = mrdfits(template,0,head0) +flags = mrdfits(template,1,head1) +labels = mrdfits(template,2,head2) +initheads, head0, head1, head2, fileid + +filters = ['F4','FM','FT3ab'] +status = ['G','L','S', 'T'] +thetas = ['01','30','35','45','50','60'] +nthetas = n_elements(thetas) +phis = ['00','45'] +nphis = n_elements(phis) + +thetamap = intarr(n_elements(labels.polar_angle)) +for itheta = 1, nthetas - 1 do thetamap = thetamap + (labels.polar_angle ge thetas[itheta]) +thetamap = thetamap + (labels.polar_angle ge 70.0) + +readaeff_I0026, ae_path, filters[0], thetas[0], phis[0], energies, areas +nenergies = n_elements(energies) +allareas = replicate(areas[0], nenergies, nthetas, nphis) + +for ifilter = 0, n_elements(filters)-1 do $ + for istatus = 0, n_elements(status)-1 do begin + stancon = 'S' + filters[ifilter] + status[istatus] + filename = sar_path+'/AG_GRID_G0017_' + stancon + '_' + fileid + '.sar' + sxaddpar, head0, 'STAN_CON', stancon + sxaddpar, head0, 'EXTEND', 'T' + for itheta = 0, nthetas - 1 do for iphi = 0, nphis - 1 do begin + readaeff_I0026, ae_path, filters[ifilter], thetas[itheta], phis[iphi], energies, areas + allareas[*, itheta, iphi] = areas + endfor + interp_sar_I0026, table, allareas, labels, energies, thetas, phis, istatus, factor = factor[*,ifilter] + mwrfits, table, filename, head0, /create + mwrfits, flags, filename, head1 + mwrfits, labels, filename, head2 + spawn, 'ftchecksum '+filename+' update=yes datasum=yes chatter=0' + spawn, 'gzip -f '+filename +endfor +end diff --git a/eff_area/area.pro b/eff_area/area.pro index ce72155..8aa149b 100644 --- a/eff_area/area.pro +++ b/eff_area/area.pro @@ -13,7 +13,7 @@ ; --------------------------------------- ; Modification history: ; 13/11/2013: taking the /aref directory as input (V. Fioretti) - +; 6/10/2023: T class added (V. Fioretti) function area,ae_path=ae_path,theta=theta,phi=phi,energy=energy,tip=tip,spec=spec,filtro=filtro @@ -40,6 +40,7 @@ energie=af(0,*) if tip eq 'G' then aree=af(1,*) if tip eq 'L' then aree=af(2,*) if tip eq 'S' then aree=af(3,*) +if tip eq 'T' then aree=af(4,*) ;print,aree diff --git a/eff_area/interp_sar_I0026.pro b/eff_area/interp_sar_I0026.pro new file mode 100644 index 0000000..87fe182 --- /dev/null +++ b/eff_area/interp_sar_I0026.pro @@ -0,0 +1,38 @@ +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; % interp_sar_I0026 % +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; --------------------------------------- +; Authors: +; A. Chen (INAF/IASF Mi) +; --------------------------------------- +; Modification History: +; 06/10/2023: copied from interp_sar_I0023.pro (V. Fioretti) + +pro interp_sar_I0026, table, allareas, labels, energies, thetas, phis, istatus, factor = factor + +nthetas = n_elements(thetas) +nphis = n_elements(phis) +thetamap = intarr(n_elements(labels.polar_angle)) +for itheta = 1, nthetas - 1 do thetamap = thetamap + (labels.polar_angle ge thetas[itheta]) +thetamap = thetamap + (labels.polar_angle gt 90.0) +nenergies = n_elements(energies) + for ietab = 0, n_elements(labels.energy) - 1 do $ + for ittab = 0, n_elements(labels.polar_angle) - 1 do $ + for iaztab = 0, n_elements(labels.azimuth_angle) - 1 do begin + if thetamap[ittab] gt (nthetas - 1) then table[ietab, ittab, iaztab] = 0 $ + else begin + t0 = 10.0d ^ interpol(alog10(allareas[*, thetamap[ittab], iaztab mod 2].(istatus)), alog10(energies), alog10(labels.energy[ietab])) + if thetamap[ittab]+1 gt (nthetas - 1) then begin +; print, t0 + t1 = t0 + endif else $ + t1 = 10.0d ^ interpol(alog10(allareas[*, thetamap[ittab]+1, iaztab mod 2].(istatus)), alog10(energies), alog10(labels.energy[ietab])) + if (thetamap[ittab]+1 lt nthetas) then $ + table[ietab, ittab, iaztab] = interpol([t0,t1], double(thetas[thetamap[ittab]:thetamap[ittab]+1]), labels.polar_angle[ittab]) $ + else $ + table[ietab, ittab, iaztab] = interpol([t0,t1], double([thetas[thetamap[ittab]],thetas[thetamap[ittab]]+40.0]), labels.polar_angle[ittab]) + endelse + table[ietab, ittab, iaztab] = factor[ittab] * table[ietab, ittab, iaztab] + endfor + +end diff --git a/eff_area/readaeff_I0026.pro b/eff_area/readaeff_I0026.pro new file mode 100644 index 0000000..e764f10 --- /dev/null +++ b/eff_area/readaeff_I0026.pro @@ -0,0 +1,49 @@ +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; % readaeff_I0026.pro % +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; Description: +; Routine called by AGILE_write_all_sar_I0026.pro +; Reading: +; - __.txt +; --------------------------------------- +; Authors: +; A. Chen (INAF/IASF Mi) +; --------------------------------------- +; Modification history: +; 06/10/2023: copied from readaeff_I0023.pro (V. Fioretti) + +pro readaeff_I0026, ae_path, filter, theta, phi, energies, area, directory = directory + +if n_elements(directory) eq 0 then begin + directory=ae_path+'/' + filename = directory + filter + '_' + theta + '_' + phi + '.txt' +endif + + +e = 0.0d & ag = 0.0d & al = 0.0d & as = 0.0d +earr = [0.0d,10.0d] & agarr = [0.0d,0.1d] & alarr = [0.0d,0.1d] & asarr = [0.0d,0.1d] +dummy = '' + +openr, u, filename, /get_lun +for i = 0, 3 do readf, u, dummy +while not eof(u) do begin + readf, u, e, ag, al, as, agls + earr = [earr, e] + factor = 1.0 + agarr = [agarr, ag / factor] + alarr = [alarr, al / factor] + asarr = [asarr, as / factor] + aglsarr = [asarr, agls / factor] +endwhile +free_lun, u +num = n_elements(earr)-1 +energies = earr[1:num] +area = replicate({G: 0.0d, L:0.0d, S:0.0d, T: 0.0d}, num) +area.G = agarr[1:num] +area.L = alarr[1:num] +area.S = asarr[1:num] +area.T = aglsarr[1:num] + +end + + From a14c5ef168bdc5ec772b7650329a3ebf017bff30 Mon Sep 17 00:00:00 2001 From: vfioretti Date: Fri, 6 Oct 2023 18:24:24 +0200 Subject: [PATCH 09/14] AGILECalib H0026 eff_area --- AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro | 6 +- .../eff_area/AGILE_write_all_sar_H0026.pro | 85 +++++++++++++++++++ AGILECalib_H/eff_area/area_H.pro | 3 +- AGILECalib_H/eff_area/interp_sar_I0026.pro | 38 +++++++++ AGILECalib_H/eff_area/readaeff_I0026.pro | 51 +++++++++++ eff_area/interp_sar_I0026.pro | 1 + eff_area/readaeff_I0026.pro | 7 +- 7 files changed, 185 insertions(+), 6 deletions(-) create mode 100644 AGILECalib_H/eff_area/AGILE_write_all_sar_H0026.pro create mode 100644 AGILECalib_H/eff_area/interp_sar_I0026.pro create mode 100644 AGILECalib_H/eff_area/readaeff_I0026.pro diff --git a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro index 43fdbdd..7b849b4 100644 --- a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro +++ b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro @@ -17,6 +17,7 @@ ; 13/11/2013: selecting the /aref directory (V. Fioretti) ; 6/11/2015: loading the environment variable (V. Fioretti) ; 13/12/2015: new Fermi-style energy bands (A. Chen) +; 6/10/2023: T class added (V. Fioretti) ae_path = GETENV('CALIB_AE_RSP') ae_path = ae_path+'/aref' @@ -52,13 +53,14 @@ ener=[10,35,50,71,100,173,300,548,1000,1732,3000,5477,10000,20000,100000] openw,u,fileperandrew,width=1000,/get_lun printf,u - printf,u,' E AeffG AeffL AeffS' + printf,u,' E AeffG AeffL AeffS AeffT' printf,u for i=0,n_elements(ener)-1 do begin printf,u, ener[i], area_H(ae_path=ae_path, energ=ener[i], tip='G', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ area_H(ae_path=ae_path, energ=ener[i], tip='L', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ - area_H(ae_path=ae_path, energ=ener[i], tip='S', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec) + area_H(ae_path=ae_path, energ=ener[i], tip='S', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ + area_H(ae_path=ae_path, energ=ener[i], tip='T', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec) endfor free_lun,u diff --git a/AGILECalib_H/eff_area/AGILE_write_all_sar_H0026.pro b/AGILECalib_H/eff_area/AGILE_write_all_sar_H0026.pro new file mode 100644 index 0000000..118587c --- /dev/null +++ b/AGILECalib_H/eff_area/AGILE_write_all_sar_H0026.pro @@ -0,0 +1,85 @@ +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; % AGILE_write_all_sar_H0026.pro % +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; Description: +; Effective area production - step 2 +; Reading: +; - AG_GRID_G0017_S0001_H0007_template.sar.gz +; - __.txt +; Calling: +; - readaeff_I0026.pro, interp_sar_I0026.pro, initheads.pro +; Output: +; AG_GRID_G0017_S${filter}${eventtype}_H0026.sar.gz +; --------------------------------------- +; Authors: +; A. Chen (INAF/IASF Mi) +; --------------------------------------- +; Modification history: +; 6/10/2023: copied from AGILE_write_all_sar_H0025.pro (V. Fioretti) +; 6/10/2023: H0026 and T class added (V. Fioretti) + + + +@readaeff_I0026 +@interp_sar_I0026 + +sar_path = GETENV('CALIB_AE_RSP') +sar_path = sar_path+'/sar' + +; .sar.gz path keyword (0 = Default, 1 = enter new path) +sar_path_key = 0 + +read, sar_path_key, PROMPT = '% - .sar.gz directory [0 = $CALIB_AE_RSP/sar, 1 = new directory]:' +if sar_path_key EQ 1 then read, sar_path, PROMPT = '% - .sar.gz directory (e.g. /home):' + +ae_path = GETENV('CALIB_AE_RSP') +ae_path = ae_path+'/aref' +; .ae path keyword (0 = Default, 1 = enter new path) +ae_path_key = 0 + +read, ae_path_key, PROMPT = '% - .ae directory [0 = $CALIB_AE_RSP/aref, 1 = new directory]:' +if ae_path_key EQ 1 then read, ae_path, PROMPT = '% - .ae directory (e.g. /home):' + +template = sar_path+'/AG_GRID_G0017_S0001_H0007_template.sar.gz' + +fileid = 'H0026' +factor = [[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0],[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0]] + +table = mrdfits(template,0,head0) +flags = mrdfits(template,1,head1) +labels = mrdfits(template,2,head2) +initheads, head0, head1, head2, fileid + +filters = ['F4','FM','FT3ab'] +status = ['G','L','S', 'T'] +thetas = ['01','30','35','45','50','60'] +nthetas = n_elements(thetas) +phis = ['00','45'] +nphis = n_elements(phis) + +thetamap = intarr(n_elements(labels.polar_angle)) +for itheta = 1, nthetas - 1 do thetamap = thetamap + (labels.polar_angle ge thetas[itheta]) +thetamap = thetamap + (labels.polar_angle ge 70.0) + +readaeff_I0025, ae_path, filters[0], thetas[0], phis[0], energies, areas +nenergies = n_elements(energies) +allareas = replicate(areas[0], nenergies, nthetas, nphis) + +for ifilter = 0, n_elements(filters)-1 do $ + for istatus = 0, n_elements(status)-1 do begin + stancon = 'S' + filters[ifilter] + status[istatus] + filename = sar_path+'/AG_GRID_G0017_' + stancon + '_' + fileid + '.sar' + sxaddpar, head0, 'STAN_CON', stancon + sxaddpar, head0, 'EXTEND', 'T' + for itheta = 0, nthetas - 1 do for iphi = 0, nphis - 1 do begin + readaeff_I0025, ae_path, filters[ifilter], thetas[itheta], phis[iphi], energies, areas + allareas[*, itheta, iphi] = areas + endfor + interp_sar_I0025, table, allareas, labels, energies, thetas, phis, istatus, factor = factor[*,ifilter] + mwrfits, table, filename, head0, /create + mwrfits, flags, filename, head1 + mwrfits, labels, filename, head2 + spawn, 'ftchecksum '+filename+' update=yes datasum=yes chatter=0' + spawn, 'gzip -f '+filename +endfor +end diff --git a/AGILECalib_H/eff_area/area_H.pro b/AGILECalib_H/eff_area/area_H.pro index 40af115..70abd1c 100644 --- a/AGILECalib_H/eff_area/area_H.pro +++ b/AGILECalib_H/eff_area/area_H.pro @@ -14,7 +14,7 @@ ; Modification history: ; 13/11/2013: taking the /aref directory as input (V. Fioretti) ; 13/12/2015: new Fermi-style energy bands (A. Chen) - +; 06/10/2023: T class added (V. Fioretti) function area_H,ae_path=ae_path,theta=theta,phi=phi,energy=energy,tip=tip,spec=spec,filtro=filtro @@ -41,6 +41,7 @@ energie=af(0,*) if tip eq 'G' then aree=af(1,*) if tip eq 'L' then aree=af(2,*) if tip eq 'S' then aree=af(3,*) +if tip eq 'T' then aree=af(4,*) ;print,aree diff --git a/AGILECalib_H/eff_area/interp_sar_I0026.pro b/AGILECalib_H/eff_area/interp_sar_I0026.pro new file mode 100644 index 0000000..3b55203 --- /dev/null +++ b/AGILECalib_H/eff_area/interp_sar_I0026.pro @@ -0,0 +1,38 @@ +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; % interp_sar_I0026 % +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; --------------------------------------- +; Authors: +; A. Chen (INAF/IASF Mi) +; --------------------------------------- +; 6/10/2023: copied from interp_sar_I0025.pro (V. Fioretti) +; 6/10/2023: H0026 added (V. Fioretti) + +pro interp_sar_I0026, table, allareas, labels, energies, thetas, phis, istatus, factor = factor + +nthetas = n_elements(thetas) +nphis = n_elements(phis) +thetamap = intarr(n_elements(labels.polar_angle)) +for itheta = 1, nthetas - 1 do thetamap = thetamap + (labels.polar_angle ge thetas[itheta]) +thetamap = thetamap + (labels.polar_angle gt 90.0) +nenergies = n_elements(energies) + for ietab = 0, n_elements(labels.energy) - 1 do $ + for ittab = 0, n_elements(labels.polar_angle) - 1 do $ + for iaztab = 0, n_elements(labels.azimuth_angle) - 1 do begin + if thetamap[ittab] gt (nthetas - 1) then table[ietab, ittab, iaztab] = 0 $ + else begin + t0 = 10.0d ^ interpol(alog10(allareas[*, thetamap[ittab], iaztab mod 2].(istatus)), alog10(energies), alog10(labels.energy[ietab])) + if thetamap[ittab]+1 gt (nthetas - 1) then begin +; print, t0 + t1 = t0 + endif else $ + t1 = 10.0d ^ interpol(alog10(allareas[*, thetamap[ittab]+1, iaztab mod 2].(istatus)), alog10(energies), alog10(labels.energy[ietab])) + if (thetamap[ittab]+1 lt nthetas) then $ + table[ietab, ittab, iaztab] = interpol([t0,t1], double(thetas[thetamap[ittab]:thetamap[ittab]+1]), labels.polar_angle[ittab]) $ + else $ + table[ietab, ittab, iaztab] = interpol([t0,t1], double([thetas[thetamap[ittab]],thetas[thetamap[ittab]]+40.0]), labels.polar_angle[ittab]) + endelse + table[ietab, ittab, iaztab] = factor[ittab] * table[ietab, ittab, iaztab] + endfor + +end diff --git a/AGILECalib_H/eff_area/readaeff_I0026.pro b/AGILECalib_H/eff_area/readaeff_I0026.pro new file mode 100644 index 0000000..42be4b0 --- /dev/null +++ b/AGILECalib_H/eff_area/readaeff_I0026.pro @@ -0,0 +1,51 @@ +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; % readaeff_I0026.pro % +; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +; Description: +; Routine called by AGILE_write_all_sar_H0026.pro +; Reading: +; - __.txt +; --------------------------------------- +; Authors: +; A. Chen (INAF/IASF Mi) +; --------------------------------------- +; Modification history: +; 6/10/2023: copied from readaeff_I0025.pro (V. Fioretti) +; 6/10/2023: H0026 and T class added (V. Fioretti) + +pro readaeff_I0026, ae_path, filter, theta, phi, energies, area, directory = directory + +if n_elements(directory) eq 0 then begin + directory=ae_path+'/' + filename = directory + filter + '_' + theta + '_' + phi + '_H.txt' +endif + + +e = 0.0d & ag = 0.0d & al = 0.0d & as = 0.0d & agls = 0.0d +earr = [0.0d,10.0d] & agarr = [0.0d,0.1d] & alarr = [0.0d,0.1d] & asarr = [0.0d,0.1d]& aglsarr = [0.0d,0.1d] +dummy = '' + +openr, u, filename, /get_lun +for i = 0, 3 do readf, u, dummy +while not eof(u) do begin + readf, u, e, ag, al, as, agls + earr = [earr, e] + factor = 1.0 + agarr = [agarr, ag / factor] + alarr = [alarr, al / factor] + asarr = [asarr, as / factor] + aglsarr = [aglsarr, agls / factor] +endwhile +free_lun, u +num = n_elements(earr)-1 +energies = earr[1:num] +area = replicate({G: 0.0d, L:0.0d, S:0.0d, T: 0.0d}, num) +area.G = agarr[1:num] +area.L = alarr[1:num] +area.S = asarr[1:num] +area.T = aglsarr[1:num] + + +end + + diff --git a/eff_area/interp_sar_I0026.pro b/eff_area/interp_sar_I0026.pro index 87fe182..8a48ba9 100644 --- a/eff_area/interp_sar_I0026.pro +++ b/eff_area/interp_sar_I0026.pro @@ -7,6 +7,7 @@ ; --------------------------------------- ; Modification History: ; 06/10/2023: copied from interp_sar_I0023.pro (V. Fioretti) +; 06/10/2023: I0026 added (V. Fioretti) pro interp_sar_I0026, table, allareas, labels, energies, thetas, phis, istatus, factor = factor diff --git a/eff_area/readaeff_I0026.pro b/eff_area/readaeff_I0026.pro index e764f10..e6a0e04 100644 --- a/eff_area/readaeff_I0026.pro +++ b/eff_area/readaeff_I0026.pro @@ -11,6 +11,7 @@ ; --------------------------------------- ; Modification history: ; 06/10/2023: copied from readaeff_I0023.pro (V. Fioretti) +; 06/10/2023: I0026 and T class added (V. Fioretti) pro readaeff_I0026, ae_path, filter, theta, phi, energies, area, directory = directory @@ -20,8 +21,8 @@ if n_elements(directory) eq 0 then begin endif -e = 0.0d & ag = 0.0d & al = 0.0d & as = 0.0d -earr = [0.0d,10.0d] & agarr = [0.0d,0.1d] & alarr = [0.0d,0.1d] & asarr = [0.0d,0.1d] +e = 0.0d & ag = 0.0d & al = 0.0d & as = 0.0d & agls = 0.0d +earr = [0.0d,10.0d] & agarr = [0.0d,0.1d] & alarr = [0.0d,0.1d] & asarr = [0.0d,0.1d]& aglsarr = [0.0d,0.1d] dummy = '' openr, u, filename, /get_lun @@ -33,7 +34,7 @@ while not eof(u) do begin agarr = [agarr, ag / factor] alarr = [alarr, al / factor] asarr = [asarr, as / factor] - aglsarr = [asarr, agls / factor] + aglsarr = [aglsarr, agls / factor] endwhile free_lun, u num = n_elements(earr)-1 From 7a625bca836c86f2978a4e9fe92f415edffbd882 Mon Sep 17 00:00:00 2001 From: vfioretti Date: Fri, 6 Oct 2023 18:54:02 +0200 Subject: [PATCH 10/14] H eff_area update --- AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro index 7b849b4..0935185 100644 --- a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro +++ b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro @@ -43,7 +43,7 @@ for t=0, nthetas-1 do begin ;ener=[35,50,71,100,141,200,283,400,632,1000,1732,3000,5477,10000,20000] -ener=[10,35,50,71,100,173,300,548,1000,1732,3000,5477,10000,20000,100000] + ener=[10,35,50,71,100,173,300,548,1000,1732,3000,5477,10000,20000,100000] ;if theta eq 1 then str_theta='01' else str_theta=strtrim(theta,2) ;if phi eq 0 then str_phi='00' else str_phi=strtrim(phi,2) From a36ab0fe7291959bbf5910d7ec52542bc9a8b46f Mon Sep 17 00:00:00 2001 From: vfioretti Date: Fri, 6 Oct 2023 19:09:08 +0200 Subject: [PATCH 11/14] H eff_area update --- AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro index 0935185..fda34d3 100644 --- a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro +++ b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro @@ -57,12 +57,14 @@ for t=0, nthetas-1 do begin printf,u for i=0,n_elements(ener)-1 do begin - printf,u, ener[i], area_H(ae_path=ae_path, energ=ener[i], tip='G', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ + printf,u, ener[i], area(ae_path=ae_path, energ=ener[i], tip='G', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ area_H(ae_path=ae_path, energ=ener[i], tip='L', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ area_H(ae_path=ae_path, energ=ener[i], tip='S', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ area_H(ae_path=ae_path, energ=ener[i], tip='T', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec) endfor + + free_lun,u endfor From e8754171dcbcac81080b71ed1f8871228fba513f Mon Sep 17 00:00:00 2001 From: vfioretti Date: Fri, 6 Oct 2023 19:10:34 +0200 Subject: [PATCH 12/14] H eff_area update --- AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro index fda34d3..5665bd3 100644 --- a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro +++ b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro @@ -57,7 +57,7 @@ for t=0, nthetas-1 do begin printf,u for i=0,n_elements(ener)-1 do begin - printf,u, ener[i], area(ae_path=ae_path, energ=ener[i], tip='G', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ + printf,u, ener[i], area_H(ae_path=ae_path, energ=ener[i], tip='G', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ area_H(ae_path=ae_path, energ=ener[i], tip='L', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ area_H(ae_path=ae_path, energ=ener[i], tip='S', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ area_H(ae_path=ae_path, energ=ener[i], tip='T', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec) From ac5ffa60e47676e9b3cdd537b97f9f31cb70cf29 Mon Sep 17 00:00:00 2001 From: vfioretti Date: Fri, 6 Oct 2023 19:15:06 +0200 Subject: [PATCH 13/14] H eff_area update --- AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro index 5665bd3..4bb45e4 100644 --- a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro +++ b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro @@ -59,8 +59,8 @@ for t=0, nthetas-1 do begin for i=0,n_elements(ener)-1 do begin printf,u, ener[i], area_H(ae_path=ae_path, energ=ener[i], tip='G', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ area_H(ae_path=ae_path, energ=ener[i], tip='L', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ - area_H(ae_path=ae_path, energ=ener[i], tip='S', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ - area_H(ae_path=ae_path, energ=ener[i], tip='T', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec) + area_H(ae_path=ae_path, energ=ener[i], tip='L', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ + area_H(ae_path=ae_path, energ=ener[i], tip='S', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec) endfor From 1fafb8188919790657b133768e603ccc08792724 Mon Sep 17 00:00:00 2001 From: vfioretti Date: Fri, 6 Oct 2023 19:40:38 +0200 Subject: [PATCH 14/14] H eff_area update --- AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro | 4 ++-- AGILECalib_H/resp_ae_BAND/aeffi_H.pro | 2 ++ AGILECalib_H/resp_ae_BAND/maris_H.pro | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro index 4bb45e4..5665bd3 100644 --- a/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro +++ b/AGILECalib_H/eff_area/AGILE_mksar_loop_H.pro @@ -59,8 +59,8 @@ for t=0, nthetas-1 do begin for i=0,n_elements(ener)-1 do begin printf,u, ener[i], area_H(ae_path=ae_path, energ=ener[i], tip='G', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ area_H(ae_path=ae_path, energ=ener[i], tip='L', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ - area_H(ae_path=ae_path, energ=ener[i], tip='L', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ - area_H(ae_path=ae_path, energ=ener[i], tip='S', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec) + area_H(ae_path=ae_path, energ=ener[i], tip='S', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec), $ + area_H(ae_path=ae_path, energ=ener[i], tip='T', theta=fix(str_theta[t]), phi=phi, filtro=filtro[f], spec=spec) endfor diff --git a/AGILECalib_H/resp_ae_BAND/aeffi_H.pro b/AGILECalib_H/resp_ae_BAND/aeffi_H.pro index af5369b..85f10a4 100644 --- a/AGILECalib_H/resp_ae_BAND/aeffi_H.pro +++ b/AGILECalib_H/resp_ae_BAND/aeffi_H.pro @@ -38,12 +38,14 @@ wg=where((ee.evstatus eq 'G') eq bol) wl=where((ee.evstatus eq 'L') eq bol) ws=where((ee.evstatus eq 'S') eq bol) wgls = where(((ee.evstatus eq 'G') eq bol) or ((ee.evstatus eq 'L') eq bol) or ((ee.evstatus eq 'S') or bol)) + ;w31=where((ee31.evstatus eq tip) eq bol) cag=canali_H(a(1,wg)*1000) cal=canali_H(a(1,wl)*1000) cas=canali_H(a(1,ws)*1000) cagls=canali_H(a(1,wgls)*1000) + ;ca31=canali(a31(1,w31)*1000) ;canal=[10.,35,50,71,100,141,200,283,400,632,1000,1732,3000,5477,10000,20000,100000] diff --git a/AGILECalib_H/resp_ae_BAND/maris_H.pro b/AGILECalib_H/resp_ae_BAND/maris_H.pro index 6235cbd..54772ed 100644 --- a/AGILECalib_H/resp_ae_BAND/maris_H.pro +++ b/AGILECalib_H/resp_ae_BAND/maris_H.pro @@ -29,6 +29,10 @@ for j=0,2 do begin endfor +wc=where((ee.evstatus eq tipo(0)) or (ee.evstatus eq tipo(1)) or (ee.evstatus eq tipo(2))) +mat=matmake14(a(1,wc)*1000,ee(wc).energy) +mmat(3,*,*)=mat + ;map,total(mmat(0,*,*),1),/scl fits_write,run+'_'+fil+'_H.rsp',mmat