pro thm_fgm_overviews,date,directory=directory,device=device,nopng=nopng,dont_delete_data=dont_delete_data
probe_list = ['a','b','c','d','e']
If(not keyword_set(dont_delete_data)) Then del_data,'*'
if not keyword_set(date) then begin
dprint,'Date must be set to generate fgm overview plots'
return
endif
date2 = time_string(date)
if keyword_set(directory) then dir=directory else dir='./'
if keyword_set(device) then set_plot,device
timespan,date2,1,/day
year=string(strmid(date2,0,4))
month=string(strmid(date2,5,2))
day=string(strmid(date2,8,2))
thm_load_state,/get_sup
var_string1 = ''
var_string2 = ''
for i = 0L,n_elements(probe_list)-1L do begin
sc = probe_list[i]
sample_rate_var = thm_sample_rate_bar(date, 1, sc, /outline)
thm_load_fgm, probe = sc, coord = 'gse', level = 'l2'
If ~is_string(tnames('th'+sc+'_fgl_gse')) Then begin
thm_load_fgm, probe = sc, coord = 'gse', suff = '_gse', level = 'l1'
endif
if ~is_string(tnames('th'+sc+'_fgs_gse')) then begin
thm_load_fit, probe = sc, coord = 'gse', suff = '_gse'
endif
if ~is_string(tnames('th'+sc+'_fgl_gse')) then begin
store_data,'th'+sc+'_fgl_gse',data={x:time_double(date2)+findgen(2)*86400., y:[!VALUES.D_NAN,!VALUES.D_NAN]}
endif
if ~is_string(tnames('th'+sc+'_fgs_gse')) then begin
store_data,'th'+sc+'_fgs_gse',data={x:time_double(date2)+findgen(2)*86400., y:[!VALUES.D_NAN,!VALUES.D_NAN]}
endif
sc = probe_list[i]
var_string1 += 'th'+sc+'_fgs_gse '
var_string2 += ' sample_rate_'+sc + ' th'+sc+'_fgl_gse '
options, 'th'+sc+'_fgs_gse', 'ytitle', 'th'+sc+'_fgs_gse'
options, 'th'+sc+'_fgl_gse', 'ytitle', 'th'+sc+'_fgl_gse'
options, 'th'+sc+'_fgs_gse', 'ysubtitle', ''
options, 'th'+sc+'_fgl_gse', 'ysubtitle', ''
endfor
var_string = var_string1 + ' ' + var_string2
!p.background=255.
!p.color=0.
time_stamp,/off
loadct2,43
!p.charsize=0.8
tplot_options,'xmargin',[16,8]
tclip, -100.0, 100.0, /overwrite
title = 'P5, P1, P2, P3, P4 (TH-A,B,C,D,E) FGS, FGL [nT]'
If(Not keyword_set(nopng)) Then Begin
tplot, var_string, title = title
thm_gen_multipngplot, 'thm_tohban_fgm', date2, directory = dir
Endif Else Begin
tplot, var_string, title = title
Endelse
end