;+ pro fix_dat,name ; fixes a problem that sometimes occurs with the output of ; thm_part_moments ; written by Pat Cruce ;---------------------------------------------------------------------- compile_opt idl2 names = tnames(name) if names[0] ne '' then begin for i = 0,n_elements(names)-1 do begin get_data,names[i],data=d if n_elements(d.x) eq 1 && ndimen(d.y) eq 1 && n_elements(d.y) gt 1 then begin str_element,d,'v',success=s if s then begin d = {x:[d.x],y:reform(d.y,1,n_elements(d.y)),v:d.v} endif else begin d = {x:[d.x],y:reform(d.y,1,n_elements(d.y))} endelse store_data,names[i],data=d endif endfor endif end