FUNCTION THMEVM,source_in$,date$,ts,INFO$=info$ ;dataload module for THEMIS Satelites Electron Velocity GSM lblSource$ = source_in$ lblSource$ = STRSPLIT(lblSource$,':',/EXTRACT) source$ = STRLOWCASE(source_in$) source$ = STRSPLIT(source$,':',/EXTRACT) CASE source$[0] OF ; 'query': retData = ['ivma','ivmb','ivmc','ivmd','ivme'] 'query': retData = ['^thmevm'] ELSE : BEGIN ; CASE source$[0] OF ; 'ivma': probe$ = 'a' ; 'ivmb': probe$ = 'b' ; 'ivmc': probe$ = 'c' ; 'ivmd': probe$ = 'd' ; 'ivme': probe$ = 'e' ; ENDCASE probe$ = source$[1] timespan,date$,ts,/minutes startdate = time_double(date$) enddate = startdate + (ts * 60.) ;Download and obtain data for satellite; put that data into an IDL data structure ;called 'lhasa'. thm_load_esa,probe=probe$ get_data,'th'+probe$+'_peer_velocity_gsm',data=lhasa ;Create a 4 column array containing: ; [TimeVector Bx By Bz] ;Ensure that the array only contains data within the specified time range. upper = WHERE(lhasa.x GE startdate) retData = [[lhasa.x[upper]], [lhasa.y[upper,*]]] lower = WHERE(retData[*,0] LE enddate) retData = retData[lower,*] comp$ = STRMID(source$[2],0,1,/REVERSE_OFFSET) retData = comp(retData,comp$) ;Create Information Vector type$ = 'sat' name$ = 'PEER GSM Electron Vel- THEMIS: ' + STRUPCASE(source$[1]) + ' (' + lblSource$[2] + ')' unit$ = 'km/s' shortID$ = 'EVM:'+STRUPCASE(source$[1]) + ':' + lblSource$[2] info$ = [source_in$, type$, name$, unit$, shortID$ ] END ENDCASE RETURN, retData END