-
Notifications
You must be signed in to change notification settings - Fork 3
/
plot_aia_flux_ratios.pro
executable file
·126 lines (92 loc) · 4.13 KB
/
plot_aia_flux_ratios.pro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
PRO plot_aia_flux_ratios, epstein=epstein, OUTPS = outps
;plots modelled vs observed AIA flux for a given model DEM.
;restore,'aia_fit_results_manual.sav',/verbose
;a_man=aia_fit_results
;set_plot,'ps'
;device,encaps=1,filename='aia_flux_ratios_for_hsi_best.ps'
;plot,findgen(6)+1,a_man.flux_dem_3d[15,18,*]/a_man.flux_obs,psym=4,symsize=2,charsize=1.2,xrange=[0,7],xticks=7, $
;xtickname=[' ','131A','171A','193A','211A','335A','94A',' '],ytitle='flux_model/flux_obs',yran=[-0.2,2.5]
;oploterr,findgen(6)+1,a_man.flux_dem_3d[15,18,*]/a_man.flux_obs,findgen(6)*0 + 0.2,psym=4,symsize=2
;oplot,findgen(10),findgen(10)*0 + 1,linestyle=2,thick=2
;leg = num2str(a_man.chimin) + '[' + num2str(22.04) +',' + num2str(6.75) + ',' + num2str(0.1) + ']'
;leg = num2str(a_man.chimin) + '[' + num2str(6.75) + ',' + num2str(0.1) + ']'
;legend, leg, psym = 4,charsize=1.2
;device,/close
;set_plot,'x'
IF keyword_set(epstein) THEN BEGIN
restore,'aia_fit_results_epstein.sav'
a=aia_fit_results
fname='aia_flux_ratios_for_aia_best_epstein.ps'
ENDIF ELSE BEGIN
restore,'aia_fit_results.sav'
a=aia_fit_results
fname='aia_flux_ratios_for_aia_best.ps'
ENDELSE
tt=value_locate(a.telog,a.telog_best)
ss=value_locate(a.tsig,a.sig_best)
IF keyword_set(OUTPS) THEN BEGIN
set_plot,'ps'
device,encaps=1,filename=fname
ENDIF
!P.MULTI = [0,1,2]
!y.margin=[2,1]
hsi_linecolors
plot,findgen(6)+1,a.flux_dem_best,charsize=1.2,xrange = [0,7],xticks=7, $
xtickname=[' ','131A','171A','193A','211A','335A','94A',' '], ytitle='AIA DN Numbers', /nodata,xthick=3,ythick=3,thick=3,charthick=3
oploterr,findgen(6)+1,a.flux_obs,a.flux_obs*0.2, psym = symcat(14),symsize=2, /nohat,thick=3
oplot, findgen(6)+1, a.flux_dem_best, psym = 7, symsize = 1,thick=3
ssw_legend, ['AIA observed', 'FIT'], psym = [symcat(14), 7], charsize = 1.0,charthick=3,thick=3
plot,findgen(6)+1,a.flux_dem_best/a.flux_obs,psym=4,symsize=2,charsize=1.2,xrange=[0,7],xticks=7, $
xtickname=[' ','131A','171A','193A','211A','335A','94A',' '],ytitle='flux_model/flux_obs',yran=[-0.2,2.5],thick=3,xthick=3,ythick=3,charthick=3
oploterr,findgen(6)+1,a.flux_dem_3d[tt,ss,*]/a.flux_obs,findgen(6)*0 + 0.2,psym=symcat(14),symsize=2,thick=3
oplot,findgen(10),findgen(10)*0 + 1,linestyle=2,thick=3
leg = textoidl('\chi^2 = ') + num2str(a.chimin, length = 5) + ' [log(EM) = ' + num2str(a.em_best, length = 5) + ' cm!U-5!N, log(Tmax) = ' + num2str(a.telog_best, length = 5) + ' (' + num2str(10d^a.telog_best/1d6, length=5) + ' MK), sigma = ' + num2str(a.sig_best) + ']'
ssw_legend, leg, psym = symcat(14),charsize=0.75,charthick=3
!P.MULTI = 0
!y.margin=[4,2]
IF keyword_set(OUTPS) THEN BEGIN
device,/close
set_plot,'x'
;ENDIF
print,' '
print,'------------------------------'
print,'Wrote file: ',fname
print,'------------------------------'
print,' '
ENDIF
f = file_search('aia_hsi_fit_results*')
IF f[0] NE '' THEN BEGIN
IF keyword_set(epstein) THEN BEGIN
restore,'aia_hsi_fit_results_epstein.sav'
ah=aia_hsi_fit_results
fname='aia_flux_ratios_for_best_combo_epstein.ps'
ENDIF ELSE BEGIN
restore,'aia_hsi_fit_results.sav'
ah=aia_hsi_fit_results
fname='aia_flux_ratios_for_best_combo.ps'
ENDELSE
chi_combo=ah.chi_2d+ah.chi2d_hsi
m= min(chi_combo,pos)
pos=array_indices(chi_combo,pos)
IF keyword_set(OUTPS) THEN BEGIN
set_plot,'ps'
device,encaps=1,filename=fname
ENDIF
plot,findgen(6)+1,ah.flux_dem_3d[pos[0],pos[1],*]/ah.flux_obs,psym=4,symsize=2,charsize=1.2,xrange=[0,7],xticks=7, $
xtickname=[' ','131A','171A','193A','211A','335A','94A',' '],ytitle='flux_model/flux_obs',yran=[-0.2,4.0]
oploterr,findgen(6)+1,ah.flux_dem_3d[pos[0],pos[1],*]/ah.flux_obs,findgen(6)*0 + 0.2,psym=4,symsize=2
oplot,findgen(10),findgen(10)*0 + 1,linestyle=2,thick=2
leg = num2str(min(chi_combo)) + '[' + num2str(alog10(ah.em_2d[pos[0],pos[1]])) +',' + num2str(ah.telog[pos[0]]) + ',' + num2str(ah.tsig[pos[1]]) + ']'
legend, leg, psym = 4,charsize=1.0
IF keyword_set(OUTPS) THEN BEGIN
device,/close
set_plot,'x'
;ENDIF
print,' '
print,'------------------------------'
print,'Wrote file: ',fname
print,'------------------------------'
print,' '
ENDIF
ENDIF
END