;+ ;NAME: ; thm_ui_wavelet ;PURPOSE: ; wavelet transform of the input tplot variables, fist calls split_vec ; to split up any multi-component vectors. ;CALLING SEQUENCE: ; thm_ui_wavelet, vnames, new_names, polar=polar,_extra=_extra ;INPUT: ; vnames = the tplot variable names to transform ;OUTPUT: ; new_names = new variable names generated by the process ;KEYWORDS: ; polar = if set, passes the /polar keyword into the split_vec ; procedure, new variable names for 3-d data will be polar, ; and not '_x','_y','_z' ;HISTORY: ; 12-mar-2007, jmm, jimm@ssl.berkeley.edu ; 5-jun-2007, jmm, no longer handles history ; ;$LastChangedBy$ ;$LastChangedDate$ ;$LastChangedRevision$ ;$URL$ ;- Pro thm_ui_wavelet, vnames, new_names, trange, $ polar = polar, _extra = _extra If(is_string(vnames) Eq 0) Then Begin message, /info, 'No Active variable name is set' new_names = '' return Endif n = n_elements(vnames) tn0 = tnames() ;we'll need to know this new_names = '' For j = 0, n-1 Do Begin tn1 = tnames() ;and we'll need to keep track of these for each point get_data, vnames[j], data = data ;first call split_vec, if necessary If(is_struct(data)) Then Begin ndj = n_elements(data.y[0, *]) If(ndj Eq 3) Then Begin split_vec, vnames[j], polar = polar, names_out = vn_j Endif Else vn_j = vnames[j] Endif Else vn_j = '' ;Do the transform If(is_string(vn_j)) Then Begin nvnj = n_elements(vn_j) For k = 0, nvnj-1 Do Begin wav_data, vn_j[k], trange = trange new_names = [new_names, vn_j[k]+'_wv_pow'] Endfor Endif Endfor ;What are the new names? If(n_elements(new_names) Gt 1) Then new_names = new_names[1:*] Return End