;+ ;NAME: ; mvn_file_source ;PURPOSE: ; Provides a structure that contains information pertinent to the locaton (and downloading) of MAVEN data files ;CALLING SEQUENCE: ; source=mvn_file_source() ;TYPICAL USAGE: ; pathname = 'maven/data/sci/pfp/ATLO/mvn_ATLO_pfp_all_l0_20130601_v1.dat' ; files = file_retrieve(pathname,_extra = mvn_file_source() ) ;INPUT: ; None required. ; If default_source is provided then the relevant structure elements are copied and used in the output ;KEYWORDS: ; SET : If set, then the values in DEFAULT_SOURCE are made permanent. ;OUTPUT: ; Structure: ; set FILE_RETRIEVE for a description of the elements ; ; $LastChangedBy: davin-mac $ ; $LastChangedDate: 2014-02-02 16:19:56 -0800 (Sun, 02 Feb 2014) $ ; $LastChangedRevision: 14116 $ ; $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/idl_socware/trunk/projects/maven/general/mvn_file_source.pro $ ;- function mvn_file_source,DEFAULT_SOURCE,set=set,reset=reset,_extra=ex common mvn_file_source_com, psource if keyword_set(reset) then psource=0 if not keyword_set(psource) then begin psource = file_retrieve(/struct) if file_test(psource.local_data_dir+'maven/.master',/regular) then psource.no_server =1 $ ; local directory IS the server directory else psource.remote_data_dir = 'http://sprg.ssl.berkeley.edu/data/' ; psource.no_clobber = 1 ; safety net for now to avoid deleting cal files psource.archive_ext = '.arc' ; archive old files instead of deleting them psource.archive_dir = 'archive/' ; archive directory psource.verbose=2 psource.min_age_limit=300 ; five minute delay before checking again endif if keyword_set(ex) then begin printdat,ex struct_assign,ex,psource,/nozero printdat,psource endif if size(/type,default_source) eq 8 then begin if keyword_set(set) then begin struct_assign,default_source,psource,/nozero source = psource endif else begin source = psource struct_assign, default_source,source,/nozero endelse endif else source = psource return,source end