Pro mvn_load_all_qlook, date_in = date_in, l0_input_file = l0_input_file, $
device = device, _extra=_extra
common mvn_load_all_qlook, load_position
catch, error_status
If(error_status Ne 0) Then Begin
dprint, dlevel = 0, 'Got Error Message'
help, /last_message, output = err_msg
For ll = 0, n_elements(err_msg)-1 Do print, err_msg[ll]
Case load_position Of
'init':Begin
print, 'Bad initialization: Exiting'
Return
End
'lpw':Begin
print, 'Skipped LPW Load: '+filex
Goto, skip_lpw
End
'mag':Begin
print, 'Skipped MAG Load: '+filex
Goto, skip_mag
End
'sep':Begin
print, 'Skipped SEP Load: '+filex
Goto, skip_sep
End
'swe':Begin
print, 'Skipped Swe Load: '+filex
Goto, skip_swe
End
'swia':Begin
print, 'Skipped Swia load: '+filex
Goto, skip_swia
End
'sta':Begin
print, 'Skipped STA Load: '+filex
Goto, skip_sta
End
'ngi':Begin
print, 'Skipped NGIMS Load: '+filex
Goto, skip_ngi
End
Else: Begin
print, 'MVN_LOAD_ALL_QLOOK exiting with no clue'
End
Endcase
Endif
load_position = 'init'
mvn_qlook_init, device = device
If(keyword_set(l0_input_file)) Then Begin
filex = l0_input_file[0]
Endif Else If(keyword_set(date_in)) Then Begin
filex = mvn_l0_db2file(date_in)
Endif Else Begin
message, /info, 'Need to set date or l0_input_file keyword'
Endelse
If(is_string(filex)) Then Begin
p1 = strsplit(file_basename(filex), '_',/extract)
date = p1[4]
Endif Else Begin
dprint, 'Missing Input File, Returning'
Return
Endelse
yyyy = strmid(date, 0, 4)
mm = strmid(date, 4, 2)
dd = strmid(date, 6, 2)
date_str = yyyy+'-'+mm+'-'+dd
d0 = time_double(date_str)
time_range = d0+[0.0, 86400.0]
timespan, d0, 1
If(~is_string(filex)) Then message, 'No file found:'
load_position = 'lpw'
mvn_lpw_load, filex, filetype='L0', tplot_var='all'
mvn_lpw_ql_3panels
mvn_lpw_ql_instr_page
skip_lpw:
load_position = 'mag'
mvn_pfp_l0_file_read, file = filex, /mag
magvar0 = ['mvn_mag1_svy_BAVG', 'mvn_mag2_svy_BAVG']
magvar1 = ['mvn_ql_mag1', 'mvn_ql_mag2']
For j = 0, 1 Do Begin
get_data, magvar0[j], data = dj
If(is_struct(dj)) Then Begin
copy_data, magvar0[j], magvar1[j]
data_att = {units:'nT', coord_sys:'Sensor'}
dlimits = {spec:0, log:0, colors:[2, 4, 6], labels: ['x', 'y', 'z'], $
labflag:1, color_table:39, data_att:data_att}
store_data, magvar1[j], dlimits = dlimits
Endif
Endfor
skip_mag:
load_position = 'sep'
mvn_pfp_l0_file_read, file=filex, /sep
skip_sep:
load_position = 'swe'
mvn_swe_load_l0, time_range, filename = filex
mvn_swe_ql
skip_swe:
load_position = 'swia'
mvn_swia_load_l0_data, filex, /tplot, /sync
get_data, 'mvn_swis_en_counts', data=ddd
ddd1 = ddd
ddd1.y = ddd1.y*ddd1.v
ddd1.zrange = minmax(ddd1.zrange) & ddd1.zrange[0] = 10.0
ddd1.ztitle = 'SWIA!cEnergy'
store_data, 'mvn_swis_en_energy', data = ddd1
skip_swia:
load_position = 'sta'
mvn_sta_gen_ql, file = filex
skip_sta:
load_position = 'ngi'
ngi_file = '/disks/data/maven/data/sci/ngi/ql/mvn_ngi_ql_'+date+'.csv'
ppp = mvn_ngi_read_csv(ngi_file)
skip_ngi:
mvn_qlook_init, device = device
Return
End