;+ ;NAME: ; mvn_load_all_qlook ;PURPOSE: ; Loads all of the data needed to do ALL of the qlook plots, this is ; done to avoid multiple data loads in mvn_over shell, the individual ; plot routines can then be called with a /noload_data option. ;CALLING SEQUENCE: ; mvn_load_all_qlook, date = date, time_range = time_range, $ ; l0_input_file = l0_input_file, _extra=_extra ;INPUT: ; No explicit input, everthing is via keyword. ;OUTPUT: ; No explicit outputs, a bunch of tplot variables are created ;KEYWORDS: ; date = If set, a plot for the input date. ; time_range = If set, plot this time range, note that this supercedes ; the date keyword, if both are set, the time range is ; attempted. ; l0_input_file = A filename for an input file, if this is set, the ; date and time_range keywords are ignored. ;HISTORY: ; 16-jul-2013, jmm, jimm@ssl.berkeley.edu ; $LastChangedBy: jimm $ ; $LastChangedDate: 2013-12-02 14:09:05 -0800 (Mon, 02 Dec 2013) $ ; $LastChangedRevision: 13612 $ ; $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/idl_socware/trunk/projects/maven/quicklook/mvn_load_all_qlook.pro $ Pro mvn_load_all_qlook, date = date, time_range = time_range, $ l0_input_file = l0_input_file, $ _extra=_extra mvn_qlook_init ;Load all of the data If(keyword_set(l0_input_file)) Then Begin filex = l0_input_file[0] Endif Else Begin dprint, "No Database Yet', dlev=0 ; filex = mvn_l0_db2file(date=date, time_range=time_range) Endelse ;LPW data mvn_lpw_load, filex, filetype='L0', tplot_var='all' ;for make a sc_attitude variable this is a fejk variable..... needed for the *prd* routines get_data,'mvn_lpw_hsk',data=data store_data,'mvn_sc_atitude',data={x:data.x,y:data.x*0} mvn_lpw_prd_lp_IV mvn_lpw_prd_w_e12 get_data,'mvn_lpw_hsk',data=data,limit=limit store_data,'Beb_temp',data={x:data.x,y:data.y(*,0:2)} options,'Beb_temp','ytitle','BEB+preamp temp !C!C (C)' ylim,'Beb_temp',min(data.y(*,0:2)),max(data.y(*,0:2)) store_data,'modes',data=['mvn_lpw_swp2_mode','mvn_lpw_atr_mode','mvn_lpw_adr_mode'] options, 'mvn_lpw_adr_mode','color',2 options, 'mvn_lpw_atr_mode','color',6 ylim,'modes',0,16 options,'modes','ytitle','LPW Modes' options,'*mode','psym',1 store_data,'E12',data=['mvn_lpw_pas_E12','mvn_lpw_act_E12'] options,'mvn_lpw_act_E12','color',6 options,'E12','ytitle','E12 !C [V]' ;options,'mvn_lpw_pas_E12_LF','psym',-1 options,'mvn_lpw_act_E12','psym',1 store_data,'SC_pot',data=['mvn_lpw_swp1_V2','mvn_lpw_act_V2','mvn_lpw_pas_V2', $ 'mvn_lpw_swp2_V1','mvn_lpw_act_V1','mvn_lpw_pas_V1'] options,'SC_pot','ytitle','SC_pot !C!C [V]' options,'mvn_lpw_act_V2','color',1 options,'mvn_lpw_pas_V2', 'color',2 options,'mvn_lpw_swp2_V1','color',3 options,'mvn_lpw_act_V1','color',5 options,'mvn_lpw_pas_V1','color',6 ;options,'*V1','psym',-1 ;options,'*V2','psym',-1 store_data,'htime',data=['mvn_lpw_htime_cap_lf','mvn_lpw_htime_cap_mf','mvn_lpw_htime_cap_hf'] options,'htime','ytitle','HSBM data !C' options,'mvn_lpw_htime_cap_mf','color',4 options,'mvn_lpw_htime_cap_hf','color',6 options,'*htime_cap*','psym',1 ylim,'htime',0,4 ;MAG data mdatafile = file_basename(filex) minput_path = file_dirname(filex)+'\' mdata_output_path = './' ;still used, but may not be used later mplot_save_path='.' ;not used here mvn_mag_ql, datafile=mdatafile, input_path=minput_path, $ data_output_path=mdata_output_path, plot_save_path=mplot_save_path, $ /tsmake, /mag1, /tplot, out_varname = out_varname get_data, 'mvn_ql_mag1', data=d, dlimits=dl If(is_struct(d)) Then Begin ;drop bad time tags here, may not be necessary later, jmm, 2013-12-02 ok = where(d.x Gt time_double('2013'), nok) If(nok Gt 0) Then Begin xok = d.x[ok] yok = d.y[ok, *] db2 = sqrt(total(yok, 2)) y1 = fltarr(nok, 4) y1[*,0:2] = yok y1[*,3] = db2 d1 = {x:xok, y:y1} dl1 = dl str_element, dl1, 'colors', [2, 4, 6, 0], /add_replace str_element, dl1, 'labels', ['x','y','z','T'], /add_replace ;Despike this data, if necessary For k = 0, n_elements(d1.y[0,*])-1 Do Begin d1yk = simple_despike_1d(d1.y[*, k], width = 10) d1.y[*, k] = d1yk Endfor store_data, 'mvn_ql_magplustot', data=d1, dlimits=dl1 Endif Endif ;SEP data If(~keyword_set(pathname)) Then pathname = filex mvn_pfp_l0_file_read, file=filex, pathname = pathname, /sep mvn_pfp_l0_file_read, file=filex, pathname=pathname, /static mvn_sta_hkp_cal,def_lim=1 mvn_sta_prod_cal ;SWE data mvn_swe_load, filex mvn_swe_ql ;SWI data mvn_swia_load_l0_data, filex, /tplot, /sync ;Create an "energy spectrogram" 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 Return End