function thm_part_dist,format,time,type=type,probe=probe,_extra=ex,cursor=cursor,bgnd_remove=bgnd_remove if keyword_set(cursor) then begin ctime,time,vname=vname ts=time_string(time) dprint,vname,/phelp dprint,ts,/phelp format = strmid(vname,0,8) dprint,format,/phelp endif if keyword_set(format) then begin probe = strmid(format,2,1) type = strmid(format,4,4) endif else format = 'th'+probe+'_'+type case strmid(type,0,3) of 'pei' : dat = call_function('get_'+format ,time,_extra=ex,bgnd_remove=bgnd_remove ) 'pee' : dat = call_function('get_'+format ,time,_extra=ex,bgnd_remove=bgnd_remove ) 'psi' : dat = call_function('thm_sst_'+type,time,probe=probe, _extra=ex) ; thm_sst_sif thm_sst_sir 'pse' : dat = call_function('thm_sst_'+type,time,probe=probe, _extra=ex) endcase return,dat end