;+ ;Procedure: process_modified_orbits ; ;Purpose: ; Determines if a state file was recently modified and reprocesses orbit plots for all modified state files ; ; basedir: The directory in which to start searching for modified files. This should be the parent directory of the probe directories ; days: The number of days prior to the current date within which a file will be considered recent. ; lunar=lunar: If this keyword is set, this routine will generate lunar(zoomed out) orbit plots in GSE not standard(zoomed-in) orbit plots ; sse_lunar=sse_lunar: If this keyword is set, this routine will generate lunar orbit plots in SSE(zoomed in, but centered on the Moon) THB & THC only ; t96_north=t96_north: If this keyword is set northward t96 magnetopause mapping will be run for the specified dates ; t96_south=t96_south: If this keyword is set southward t96 magnetopause mapping will be run for the specified dates ; $LastChangedBy: jimm $ ; $LastChangedDate: 2013-05-13 11:07:04 -0700 (Mon, 13 May 2013) $ ; $LastChangedRevision: 12338 $ ; $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/thmsoc/trunk/idl/thmsoc/asi/lunar_orbits/process_modified_orbit_dates.pro $ ;- pro process_modified_orbit_dates_backprocess,basedir,days,lunar=lunar,sse_lunar=sse_lunar,t96_north=t96_north,t96_south=t96_south today = systime(/sec) probes = 'th'+['a','b','c','d','e'] for i = 0,n_elements(probes)-1 do begin f = file_search(basedir+'/'+probes[i]+'/l1/state/20??/',probes[i]+'_l1_state_????????.cdf') if is_array(f) then fs = array_concat(f,fs) endfor if ~is_array(fs) then return mtime = (file_info(fs)).mtime idx = where(mtime ge today-days*60.*60.*24.,c) if c eq 0 then return tm_str = strmid(file_basename(fs[idx]),13,4) + '-' + strmid(file_basename(fs[idx]),17,2) + '-' + strmid(file_basename(fs[idx]),19,2) ;unique dates only to avoid unnessary reprocessing tm_str = tm_str[uniq(tm_str,bsort(tm_str))] tm_dbl=time_double('2007-11-01') tm_dbls=dindgen(30)*86400. + tm_dbl tm_str=time_string(tm_dbls,precision=-3) ; tm_str = ['2007-10-28', $ ; '2007-10-29', $ ; '2007-10-30', $ ; '2007-10-31', $ ; '2007-11-01'] for i = 0,n_elements(tm_str)-1 do orbits_wrapper_backprocess,tm_str[i] end