-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcall_observing_sequence.pro
219 lines (189 loc) · 16.4 KB
/
call_observing_sequence.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
FUNCTION FUNC, P ; Brightness_multiplier_Na in, Na_Chisq out
COMMON Parameter_space, Meteor_impact_UTC, Plume_temperature, loop_times, Surface_distribution
Observing_Sequence_Event_2, Meteor_impact_UTC = Meteor_impact_UTC, Plume_Temperature = Plume_Temperature, $
Surface_distribution = Surface_distribution, loop_times = loop_times, Brightness_multiplier_Na = P, Na_Chisq = Na_Chisq
Print, 'Brightness_multiplier_Na =', P, ' Na_Chisq =', Na_Chisq
RETURN, Na_Chisq
END
PRO Call_observing_sequence, Display_Correlation_Results = Display_Correlation_Results
COMMON Parameter_space, Meteor_impact_UTC, Plume_temperature, loop_times, Surface_distribution
if keyword_set(Display_Correlation_Results) then begin
;files = FILE_SEARCH('C:\IDL\Generic Model V2\read_write\Correlation_results\*_Round_4.sav')
;files = FILE_SEARCH('C:\IDL\Generic Model V2\read_write\Correlation_results\*_Event2_Round_0.sav') ;Actually event 3!!!!
files = FILE_SEARCH('C:\IDL\Generic Model V2\read_write\Correlation_results\*_Event_2_Round_0.sav')
;files = FILE_SEARCH('C:\IDL\Generic Model V2\read_write\Correlation_results\*Round1.sav')
Correlations_Na = fltarr(n_elements(files)) & Correlations_Mg = fltarr(n_elements(files))
for l = 0, n_elements(files)-1 do begin
restore, files[l], /verbose
correlations_Na[l] = correl_Na
;correlations_Mg[l] = correl_Mg
endfor
junk = max(correlations_Na, loc)
; print, [strmid(transpose(files[reverse(SORT(correlations_Na))]), 66, strpos(transpose(files[reverse(SORT(correlations_Na))]),'_corr') - 66), $
; transpose(string(correlations_Na[reverse(SORT(correlations_Na))])), transpose(string(correlations_Mg[reverse(SORT(correlations_Na))]))], FORMAT='(A29,F10.5,F10.5)'
print, [strmid(transpose(files[reverse(SORT(correlations_Na))]), 66, strpos(transpose(files[reverse(SORT(correlations_Na))]),'_corr') - 66), $
transpose(string(correlations_Na[reverse(SORT(correlations_Na))]))], FORMAT='(A29,F10.5)'
stop
endif
; ======================================= Post Bug Fix round 1 correlations ==================================================================
;Meteor_impact_UTC_array = ['2011-08-04 01:40:00', '2011-08-04 01:50:00'] ; index by i
;Plume_temperature_array = ['3500K'] ; index by j
;loop_times_array = [20] ; index by j
;Surface_distribution_array = ['Point_[300,-60]', 'Point_[330,-60]', 'Point_[0,-60]', 'Point_[30,-60]',$ ;lon, lat
; 'Point_[300,-30]', 'Point_[330,-30]', 'Point_[0,-30]', 'Point_[30,-30]',$
; 'Point_[300,0]', 'Point_[330,0]', 'Point_[0,0]', 'Point_[30,0]'] ; index by k
;
;;augmenting until we're not on an edge in space
;Meteor_impact_UTC_array = ['2011-08-04 01:40:00', '2011-08-04 01:50:00', '2011-08-04 02:00:00'] ; index by i
;Plume_temperature_array = ['2500K', '3500K', '5000K'] ; index by j
;loop_times_array = [50, 25, 12] ; index by j
;Surface_distribution_array = ['Point_[315,-15]'] ; index by k
; =================================== End Post Bug Fix round 1 correlations ==================================================================
;
; ; ======================================= Post Bug Fix round 2 correlations ==================================================================
;Meteor_impact_UTC_array = ['2011-08-04 01:50:00', '2011-08-04 02:00:00','2011-08-04 02:10:00','2011-08-04 02:20:00', '2011-08-04 02:30:00'] ; index by i
;Plume_temperature_array = ['20000K'] ; index by j
;loop_times_array = [5] ; index by j
;Surface_distribution_array = ['Point_[300,-60]', 'Point_[330,-60]', 'Point_[0,-60]', 'Point_[30,-60]',$ ;lon, lat
; 'Point_[300,-30]', 'Point_[330,-30]', 'Point_[0,-30]', 'Point_[30,-30]',$
; 'Point_[300,0]', 'Point_[330,0]', 'Point_[0,0]', 'Point_[30,0]'] ; index by k
;
;Meteor_impact_UTC_array = ['2011-08-04 02:10:00','2011-08-04 02:20:00'] ; index by i
;Plume_temperature_array = ['20000K'] ; index by j
;loop_times_array = [10] ; index by j
;Surface_distribution_array = ['Point_[0,-75]', 'Point_[15,-75]', 'Point_[30,-75]',$ ;lon, lat
; 'Point_[0,-60]', 'Point_[15,-60]', 'Point_[30,-60]',$
; 'Point_[0,-45]', 'Point_[15,-45]', 'Point_[30,-45]'] ; index by k
; =================================== End Post Bug Fix round 2 correlations ==================================================================
;
;
;
;
; ========================================== Round 1 top correlations ====================================================================
; 01-40-00---0,-30lat---2000K 0.979055
; 01-50-00---0,-30lat---2000K 0.953119
; 01-40-00---0,-30lat---3500K 0.919412
; 01-40-00---0,-30lat---5000K 0.911880
; 01-50-00---0,-30lat---5000K 0.901882
; Meteor_impact_UTC_array = ['2011-08-04 01:40:00', '2011-08-04 01:50:00',$
; '2011-08-04 02:00:00', '2011-08-04 02:10:00'] ; index by i
; Plume_temperature_array = ['2000K','3500K','5000K'] ; index by j
; loop_times_array = [40, 20, 10] ; index by j
; Surface_distribution_array = ['Point_[0,-30]', 'Point_[30,-30]', 'Point_[60,-30]',$
; 'Point_[0,0]', 'Point_[30,0]', 'Point_[60,0]',$
; 'Point_[0,30]', 'Point_[30,30]', 'Point_[60,30]'] ; index by k
; Meteor_impact_UTC_array = ['2011-08-04 01:40:00', '2011-08-04 01:50:00'] ; index by i
; Plume_temperature_array = ['3500K'] ; index by j
; loop_times_array = [20] ; index by j
; Surface_distribution_array = ['Point_[345,-45]', 'Point_[0,-45]', 'Point_[15,-45]',$
; 'Point_[345,-30]', 'Point_[0,-30]', 'Point_[15,-30]',$
; 'Point_[345,-15]', 'Point_[0,-15]', 'Point_[15,-15]'] ; index by k
; 01-40-00---0,-50lat---3500K 0.936900
; 01-50-00---0,-45lat---3500K 0.815195
; 01-50-00---0,-50lat---3500K 0.813482
; 01-40-00---15,-45lat---3500 0.775894
; 01-50-00---15,-45lat---3500 0.752677
; 01-40-00---345,-30lat---350 0.695242
; 01-40-00---0,-30lat---3500K 0.557929
; 01-50-00---15,-15lat---3500 0.541231
; 01-50-00---345,-30lat---350 0.517642
; 01-50-00---15,-30lat---3500 0.495098
; 01-50-00---0,-30lat---3500K 0.415101
; 01-40-00---15,-30lat---3500 0.411298
; 01-40-00---345,-15lat---350 0.374178
; 01-50-00---345,-15lat---350 0.332587
; 01-40-00---15,-15lat---3500 0.252216
; Meteor_impact_UTC_array = ['2011-08-04 01:45:00', '2011-08-04 01:50:00',$
; '2011-08-04 01:55:00'] ; index by i
; Plume_temperature_array = ['3500K'] ; index by j
; loop_times_array = [20] ; index by j
; Surface_distribution_array = ['Point_[345,-60]', 'Point_[0,-60]', 'Point_[15,-60]',$
; 'Point_[345,-45]', 'Point_[0,-45]', 'Point_[15,-45]',$
; 'Point_[345,-30]', 'Point_[0,-30]', 'Point_[15,-30]'] ; index by k
;; round 3
; Meteor_impact_UTC_array = ['2011-08-04 01:45:00', '2011-08-04 01:50:00', $
; '2011-08-04 01:55:00'] ; index by i
; Plume_temperature_array = ['3500K'] ; index by j
; loop_times_array = [20] ; index by j
; Surface_distribution_array = ['Point_[300,-60]', 'Point_[330,-60]','Point_[0,-60]', 'Point_[30,-60]', 'Point_[60,-60]', 'Point_[90,-60]', 'Point_[120,-60]', $
; 'Point_[300,-30]', 'Point_[330,-30]','Point_[0,-30]', 'Point_[30,-30]', 'Point_[60,-30]', 'Point_[90,-30]', 'Point_[120,-30]', $
; 'Point_[300,0]', 'Point_[330,0]','Point_[0,0]', 'Point_[30,0]', 'Point_[60,0]', 'Point_[90,0]', 'Point_[120,0]', $
; 'Point_[300,30]', 'Point_[330,30]','Point_[0,30]', 'Point_[30,30]', 'Point_[60,30]', 'Point_[90,30]', 'Point_[120,30]', $
; 'Point_[300,60]', 'Point_[330,60]','Point_[0,60]', 'Point_[30,60]', 'Point_[60,60]', 'Point_[90,60]', 'Point_[120,60]'] ; index by k
;------------------------------long hiatus possible bug fixes--------------------------------------------
;; round 4 (runtime = 50 hours)
; Meteor_impact_UTC_array = ['2011-08-04 01:35:00', '2011-08-04 01:45:00', $
; '2011-08-04 01:55:00', '2011-08-04 02:05:00'] ; index by i
; Plume_temperature_array = ['3500K'] ; index by j
; loop_times_array = [40] ; index by j
; Surface_distribution_array = ['Point_[0,0]', 'Point_[30,0]','Point_[60,0]', 'Point_[90,0]', 'Point_[120,0]', 'Point_[150,0]', 'Point_[180,0]', $
; 'Point_[210,0]', 'Point_[240,0]','Point_[270,0]', 'Point_[300,0]', 'Point_[330,0]'] ; index by k
;; round 5 (runtime = ?? hours)
; Meteor_impact_UTC_array = ['2011-08-04 02:10:00', $
; '2011-08-04 02:15:00', '2011-08-04 02:20:00'] ; index by i
; Plume_temperature_array = ['2000K', '3500K', '5000K'] ; index by j
; loop_times_array = [150, 80, 20] ; index by j
; Surface_distribution_array = ['Point_[100,-15]', 'Point_[115,-15]', $
; 'Point_[100,0]', 'Point_[115,0]', $
; 'Point_[100,15]', 'Point_[115,15]' ] ; index by k
;; round 6 (runtime = ??? Full resolution)
; Meteor_impact_UTC_array = ['2011-08-04 02:15:00'] ; index by i
; Plume_temperature_array = ['3502K', '5000K'] ; index by j
; loop_times_array = [100, 80] ; index by j
; Surface_distribution_array = ['Point_[100,0]', 'Point_[115,0]', 'Point_[100,15]', 'Point_[115,15]' ] ; index by k
; Event 2 round 0 (runtime = ??? Full resolution)
; Meteor_impact_UTC_array = ['2013-04-13 13:15:00', '2013-04-13 13:25:00', '2013-04-13 13:35:00', '2013-04-13 13:45:00'] ; index by i
; Plume_temperature_array = ['10000K'] ; index by j
; loop_times_array = [70] ; index by j
; Surface_distribution_array = ['Point_[150, 0]', 'Point_[180, 0]', 'Point_[210, 0]', 'Point_[240, 0]', 'Point_[270, 0]' ] ; index by k
; Meteor_impact_UTC_array = ['2013-04-13 13:35:00', '2013-04-13 13:40:00', '2013-04-13 13:45:00'] ; index by i
; Plume_temperature_array = ['10000K'] ; index by j
; loop_times_array = [20] ; index by j
; Surface_distribution_array = ['Point_[255, 0]', 'Point_[270, 0]', 'Point_[270, 20]' ] ; index by k
; Event 2 round 0 (runtime = 12 hours, key_frames_Na = [indgen(51)] * 24)
; Meteor_impact_UTC_array = ['2012-10-24 11:10:00', '2012-10-24 11:20:00', '2012-10-24 11:30:00', '2012-10-24 11:40:00'] ; index by i
; Plume_temperature_array = ['5000K'] ; index by j
; loop_times_array = [15] ; index by j
; Surface_distribution_array = ['Point_[0, 0]','Point_[30, 0]','Point_[60, 0]','Point_[90, 0]', $
; 'Point_[120, 0]','Point_[150, 0]','Point_[180, 0]','Point_[210, 0]', $
; 'Point_[240, 0]','Point_[270, 0]','Point_[300, 0]','Point_[330, 0]' ] ; index by k
Initial_Brightness_multiplier_Na = 10.
; Event 2 round 0 (runtime = 12 hours, key_frames_Na = [indgen(51)] * 24)
;Meteor_impact_UTC_array = ['2012-10-24 11:05:00', '2012-10-24 11:10:00', '2012-10-24 11:15:00', '2012-10-24 11:20:00', '2012-10-24 11:25:00'] ; index by i
;Plume_temperature_array = ['15000K'] ; index by j
;loop_times_array = [15] ; index by j
;Surface_distribution_array = ['Point_[110, 0]','Point_[130, 0]','Point_[140, 0]','Point_[160, 0]'] ; index by k
;Meteor_impact_UTC_array = ['2012-10-24 11:25:00'] ; index by i
;Plume_temperature_array = ['10000K'] ; index by j
;loop_times_array = [40] ; index by j
;Surface_distribution_array = ['Point_[120, -30]','Point_[120, 30]','Point_[140, -30]','Point_[140, -10]'] ; index by k
;Meteor_impact_UTC_array = ['2012-10-24 11:20:00', '2012-10-24 11:25:00', '2012-10-24 11:30:00'] ; index by i
;Plume_temperature_array = ['5000K','10000K','15000K'] ; index by j
;loop_times_array = [40, 40] ; index by j
;Surface_distribution_array = ['Point_[135, 00]','Point_[135, -30]','Point_[135, -60]','Point_[140, 00]','Point_[140, -30]','Point_[140, -60]'] ; index by k
Meteor_impact_UTC_array = ['2012-10-24 11:30:00','2012-10-24 11:33:00'] ; index by i
Plume_temperature_array = ['12000K'] ; ; index by j
loop_times_array = [20] ; index by j
Surface_distribution_array = ['Point_[100, -15]','Point_[100, -30]','Point_[100, -45]','Point_[100, 30]'] ; index by k
for i = 0, N_elements(Meteor_impact_UTC_array)-1 do begin
for j = 0, N_elements(Plume_temperature_array)-1 do begin
for k = 0, N_elements(Surface_distribution_array)-1 do begin
Meteor_impact_UTC = Meteor_impact_UTC_array[i]
Plume_Temperature = Plume_Temperature_array[j]
loop_times = loop_times_array[j]
Surface_distribution = Surface_distribution_array[k]
Observing_Sequence_Event_2, Meteor_impact_UTC = Meteor_impact_UTC, Plume_Temperature = Plume_Temperature, $
Surface_distribution = Surface_distribution, loop_times = loop_times, Brightness_multiplier_Na = Initial_Brightness_multiplier_Na
; We still need to tune (optimize) the ejection rate to get a good metric for Chi squared and Correlation.
; Minimize Chi squared between the model and data by tuning Brightness_multiplier_Na
minimize_sequence_chisq = 1
if minimize_sequence_chisq then begin
R = AMOEBA(1.0e-2, SCALE=4.0, P0 = Initial_Brightness_multiplier_Na, FUNCTION_VALUE=fval)
Print, 'Brightness_multiplier_Na optimized:', R
Observing_Sequence_Event_2, Meteor_impact_UTC = Meteor_impact_UTC, Plume_Temperature = Plume_Temperature, $
Surface_distribution = Surface_distribution, loop_times = loop_times, Brightness_multiplier_Na = R, Na_Chisq = Na_Chisq
endif
endfor
endfor
endfor
end