pro WDOSGLEN ;+ ;NAME: ; WDOSGLEN ; ;PURPOSE: ; To resize the "sig" data array (if it exists) or set it for future ; purposes. ; ;CATEGORY: ; Wavelets ; ;CALLING SEQUENCE: ; WDOSGLEN ; ;INPUTS: (via COMMON) ; sig = current data array/signal resized (if it exists) ; ;OUTPUTS: ; out = now wdetrended data array/signal ; TT = 'I' if image and 'S' if signal ; ; COMMON BLOCKS: ;COMMON WWB_COMMON, $ ; TEXT_ANNOUNCE, wd, sig, len, st, noise_type, noise_lev, $ ; QMF, LD, shrinkage_type, WaveType, ParVal ; ;MODIFICATION HISTORY: ; Amara Graps September 1995. ; copyright (c) Amara Graps 1995, 1996. ;- COMMON WWB_COMMON, $ TEXT_ANNOUNCE, wd, sig, len, st, noise_type, noise_lev, $ QMF, LD, shrinkage_type, WaveType, ParVal ;Check that sig is a defined array. sz = N_ELEMENTS(sig) CASE sz OF 0: undef = 'True' ELSE: undef = 'False' ENDCASE CASE undef OF 'False': BEGIN ;Sig is defined already. Now find whether it's an array or image. TT = WSIGTYPE(sig, old_len, error) CASE error OF 1: BEGIN ;Valid array or matrix CASE TT OF 'I': BEGIN ;Byte image.. ;Expand/Reduce to encompass len by len sig = REBIN(sig, len, len) ;Now display WPLOTIT, st, 0, sig END ;Byte image 'S': BEGIN ;Signal/data... sig = REBIN(sig, len) ;Now display WPLOTIT, st, 1, sig END ;Signal/Array ENDCASE ;TT END ;valid array or matrix ELSE: PRINT, 'Not valid data/signal array or matrix!' ENDCASE ;error END ;'False' ELSE: BEGIN ;undef = 'True' Give message. WIDGET_CONTROL, TEXT_ANNOUNCE, SET_VALUE='Data Length Set.' END ENDCASE ;undef END ;of function WDOSGLEN