;+ ;NAME: ; mvn_sep_overplot ;PURPOSE: ; MAVEN PFP SEP Quicklook Plot ;CALLING SEQUENCE: ; mvn_sep_overplot, date = date, time_range = time_range, $ ; makepng=makepng, device = device, directory = pdir, $ ; l0_input_file = l0_input_file, , noload_data = noload_data, $ ; _extra=_extra ;INPUT: ; No explicit input, everthing is via keyword. ;OUTPUT: ; Plots, on the screen or in a png file ;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. ; makepng = If set, make a png file, with filename ; 'mvn_sep_qlook_seprt_time_end_time.png' ; device = a device for set_plot, the default is to use the current ; setting, for cron jobs, device = 'z' is recommended. Note ; that this does not reset the device at the end of the ; program. ; noload_data = if set, don't load data ;HISTORY: ; Hacked from mvn_sep_gen_ql, 2013-06-14, jmm, jimm@ssl.berkeley.edu ; $LastChangedBy: jimm $ ; $LastChangedDate: 2013-07-16 16:14:19 -0700 (Tue, 16 Jul 2013) $ ; $LastChangedRevision: 12685 $ ; $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/idl_socware/trunk/projects/maven/quicklook/mvn_sep_overplot.pro $ Pro mvn_sep_overplot, date = date, time_range = time_range, $ makepng = makepng, device = device, directory = directory, $ l0_input_file = l0_input_file, $ noload_data = noload_data, $ test_l2_file = test_l2_file, _extra=_extra mvn_qlook_init ;First load the data If(~keyword_set(noload_data)) Then Begin If(keyword_set(l0_input_file)) Then Begin filex = l0_input_file[0] Endif Else Begin ; filex = mvn_l0_db2file(date=date, time_range=time_range) Endelse if not keyword_set(pathname) then pathname = filex mvn_pfp_l0_file_read, file=filex, pathname = pathname, /sep Endif If(keyword_set(directory)) Then pdir = directory Else pdir = './' varlist = tnames('mvn_sep*') ;just to get a time range varlist = mvn_qlook_vcheck(varlist, tr = tr) If(varlist[0] Eq '') Then Begin dprint, 'No data, Returning' Return Endif ;Remove gap between plot panels tplot_options, 'ygap', 0.0d0 tplot, 'mvn_sep1_A*' If(keyword_set(makepng)) Then Begin fname = pdir+mvn_qlook_filename('sep1a', tr, _extra = _extra) makepng, fname Endif tplot, 'mvn_sep1_B*' If(keyword_set(makepng)) Then Begin fname = pdir+mvn_qlook_filename('sep1b', tr, _extra = _extra) makepng, fname Endif tplot, 'mvn_sep2_A*' If(keyword_set(makepng)) Then Begin fname = pdir+mvn_qlook_filename('sep2a', tr, _extra = _extra) makepng, fname Endif tplot, 'mvn_sep2_B*' If(keyword_set(makepng)) Then Begin fname = pdir+mvn_qlook_filename('sep2b', tr, _extra = _extra) makepng, fname Endif tplot, 'mvn_sep?_?' If(keyword_set(makepng)) Then Begin fname = pdir+mvn_qlook_filename('septid', tr, _extra = _extra) makepng, fname Endif tplot, 'mvn_SEPS_TEMP mvn_SEPS_svy_ATT mvn_sep?_svy_DATA mvn_sep?_noise_SIGMA mvn_sep?_hkp_RATE_CNTR If(keyword_set(makepng)) Then Begin fname = pdir+mvn_qlook_filename('sepsum', tr, _extra = _extra) makepng, fname Endif tplot, 'mvn_sep?_hkp_AMON_*' If(keyword_set(makepng)) Then Begin fname = pdir+mvn_qlook_filename('sephkp', tr, _extra = _extra) makepng, fname Endif If(keyword_set(test_l2_file)) Then Begin If(keyword_set(directory)) Then pdir = directory Else pdir = './' fname = pdir+mvn_qlook_filename('sep', tr, _extra=_extra, /alt_name, /date_only)+'.cdf' sttr = dummy_maven_l2_struct(varlist) sttr.filename = fname fname0 = file_basename(fname, '.cdf') sttr.g_attributes.logical_file_id = fname0 dummy = cdf_save_vars(sttr, fname) Endif Return End