Changeset 21


Ignore:
Timestamp:
11/28/07 16:08:51 (16 years ago)
Author:
kolasinski
Message:

Bugfix in trends : corrections of the errors of the standard deviation of 1D time-series

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/procs/trends.pro

    r2 r21  
    88; type = 't', 'xt', 'yt', 'zt' or 'xyt' 
    99 
    10    print, '    Enter trends.pro' 
     10   print, 'ENTER trends...' 
    1111 
    1212   trend_type = strtrim(string(trend_int), 2) 
     
    144144 
    145145            ; Compute std error-bar using running bootstrap window (width in plt_def) 
    146             temperr = stat_error(fld, boot_win(0)) 
    147             err_std_1 = sqrt( total((temperr-sqrt((moment(fld))[1]) )^2)/n_elements(temperr) ) 
    148             temperr = stat_error(fld, boot_win(1)) 
    149             err_std_2 = sqrt( total((temperr-sqrt((moment(fld))[1]) )^2)/n_elements(temperr) ) 
    150             temperr = stat_error(fld, boot_win(2)) 
    151             err_std_3 = sqrt( total((temperr-sqrt((moment(fld))[1]) )^2)/n_elements(temperr) ) 
     146            IF jpt GT boot_win(0) THEN BEGIN  
     147               temperr = stat_error(fld, boot_win(0)) 
     148               err_std_1 = sqrt( total((temperr-sqrt((moment(fld))[1]) )^2)/n_elements(temperr) ) 
     149            ENDIF ELSE err_std_1 = 0 
     150            IF jpt GT boot_win(1) THEN BEGIN  
     151               temperr = stat_error(fld, boot_win(1)) 
     152               err_std_2 = sqrt( total((temperr-sqrt((moment(fld))[1]) )^2)/n_elements(temperr) ) 
     153            ENDIF  ELSE err_std_2 = 0 
     154            IF jpt GT boot_win(2) THEN BEGIN  
     155               temperr = stat_error(fld, boot_win(2)) 
     156               err_std_3 = sqrt( total((temperr-sqrt((moment(fld))[1]) )^2)/n_elements(temperr) ) 
     157            ENDIF  ELSE err_std_3 = 0 
    152158 
    153159            print, '     1D times-serie anomaly info : var/stddev +- error (24,36,48)', (moment(fld))[1], sqrt((moment(fld))[1]), err_std_1, err_std_2, err_std_3  
     
    368374   ENDIF  
    369375 
     376   IF debug_w THEN print, 'EXIT trends...' 
     377 
    370378   return, fld 
    371     
    372    IF debug_w THEN print, '   Vargrid : ',  vargrid 
    373    IF debug_w THEN print, '   Leaving trends.pro' 
    374379 
    375380END   
Note: See TracChangeset for help on using the changeset viewer.