@@ -165,14 +165,24 @@ def make_rate_plots(time_window, run_table, query_events, dirname, season='neutr
165
165
plt .locator_params (axis = 'x' , nbins = 8 )
166
166
plt .grid (b = True , axis = 'y' , alpha = 0.3 )
167
167
plt .savefig ('{}/badness_plot.png' .format (dirname ))
168
-
168
+
169
169
try :
170
- rates = icecube .realtime_tools .live .get_rates (run_table [0 ]['start' ], run_table [- 1 ]['stop' ])
170
+ if (Time (run_table [- 1 ]['stop' ],format = 'iso' ,scale = 'utc' ).mjd \
171
+ - Time (run_table [0 ]['start' ],format = 'iso' ,scale = 'utc' ).mjd ) > 45. :
172
+ #load as two sections, otherwise this may time out
173
+ midpt = Time (Time (run_table [0 ]['start' ],format = 'iso' ,scale = 'utc' ).mjd + 35. ,
174
+ format = 'mjd' ).iso #first 35 days
175
+ rates1 = icecube .realtime_tools .live .get_rates (run_table [0 ]['start' ], midpt )
176
+ rates2 = icecube .realtime_tools .live .get_rates (midpt , run_table [- 1 ]['stop' ])
177
+ #avoid double counting last entry
178
+ rates = np .concatenate ([rates1 , rates2 ])
179
+ else :
180
+ rates = icecube .realtime_tools .live .get_rates (run_table [0 ]['start' ], run_table [- 1 ]['stop' ])
171
181
except Exception as e :
172
182
#rates=np.load('/data/user/jthwaites/FastResponseAnalysis/output/2022_2mo_followup_rates.npy')
173
183
print (e )
174
184
print ("Failed to load rates. In case of timeout: save rate information and reload manually" )
175
- print ("Check lines 115-119 of make_ontime_plots.py" )
185
+ print ("Check lines 169-179 of make_ontime_plots.py" )
176
186
return
177
187
178
188
########## MAKE RATES PLOTS ##########
0 commit comments