Pro spd_ui_wavelet, vnames, new_names, trange, polar = polar, $
gui_id = gui_id, messw_id = messw_id, $
temp_names=vn_j, maxpoints=maxpoints, $
display_object=display_object, $
_extra = _extra
If(is_string(vnames) Eq 0) Then Begin
dprint, 'No Active variable name is set', display_object=display_object
If(keyword_set(gui_id)) Then $
spd_ui_update_progress, gui_id, 'SPD_UI_WAVELET: No Active variable name set'
If(keyword_set(messw_id)) Then $
widget_control, messw_id, set_val = 'SPD_UI_WAVELET: No Active variable name set'
new_names = ''
return
Endif
n = n_elements(vnames)
tn0 = tnames()
new_names = ''
For j = 0, n-1 Do Begin
tn1 = tnames()
get_data, vnames[j], data = data
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, display_object=display_object
Endif Else If(ndj Gt 1) Then Begin
split_vec, vnames[j], names_out = vn_j, display_object=display_object, $
suffix = '_'+strcompress(string(indgen(ndj)), /remove_all)
Endif Else vn_j = vnames[j]
Endif Else vn_j = ''
If(is_string(vn_j)) Then Begin
nvnj = n_elements(vn_j)
For k = 0, nvnj-1 Do Begin
get_data, vn_j[k], data = d
If (is_struct(d)) ? n_elements(where(finite(d.y))) ge 2 : 0 Then Begin
ok = where(d.x Gt trange[0] And d.x Le trange[1], nok)
If(nok Gt 500000l) Then Begin
dprint, 'Warning: '+strcompress(string(nok))+' May be too many data points', display_object=display_object
If(keyword_set(gui_id)) Then $
spd_ui_update_progress, gui_id, 'SPD_UI_WAVELET: Warning: '+strcompress(string(nok))+' May be too many data points'
If(keyword_set(messw_id)) Then $
widget_control, messw_id, set_val = 'SPD_UI_WAVELET: Warning: '+strcompress(string(nok))+' May be too many data points'
Endif Else Begin
If(keyword_set(gui_id)) Then $
spd_ui_update_progress, gui_id, 'SPD_UI_WAVELET: Processing: '+vn_j[k]
If(keyword_set(messw_id)) Then $
widget_control, messw_id, set_val = 'SPD_UI_WAVELET: Processing: '+vn_j[k]
Endelse
wav_data, vn_j[k], trange = trange, maxpoints=maxpoints, display_object=display_object
new_names = [new_names, vn_j[k]+'_wv_pow']
Endif Else Begin
If(keyword_set(gui_id)) Then $
spd_ui_update_progress, gui_id, 'SPD_UI_WAVELET: No data for: '+vn_j[k]
If(keyword_set(messw_id)) Then $
widget_control, messw_id, set_val = 'SPD_UI_WAVELET: No Data for: '+vn_j[k]
Endelse
Endfor
Endif
Endfor
If(n_elements(new_names) Gt 1) Then new_names = new_names[1:*]
Return
End