Ignore:
Timestamp:
08/09/06 12:12:54 (18 years ago)
Author:
navarro
Message:

english and nicer header (3a)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/STATISTICS/a_correlate2d.pro

    r134 r150  
    1 ;+ 
    2 ; NAME: 
    3 ;       A_CORRELATE2d 
    4 ; 
    5 ; PURPOSE: 
    6 ; 
    7 ;       This function computes the autocorrelation Px(K,L) or 
    8 ;       autocovariance Rx(K,L) of a sample population X[nx,ny] as a 
    9 ;       function of the lag (K,L). 
    10 ; 
    11 ; CATEGORY: 
    12 ;       Statistics. 
    13 ; 
    14 ; CALLING SEQUENCE: 
    15 ;       Result = a_correlate2d(X, Lag) 
    16 ; 
    17 ; INPUTS: 
    18 ;       X:    an 2 dimension Array [nx,ny] 
    19 ; 
    20 ;     LAG:    2-element vector, in the intervals [-(nx-2), (nx-2)],[-(ny-2), (ny-2)], 
    21 ;             of type integer that specifies the absolute distance(s) between  
    22 ;             indexed elements of X. 
    23 ; 
    24 ; KEYWORD PARAMETERS: 
    25 ;       COVARIANCE:    If set to a non-zero value, the sample autocovariance 
    26 ;                      is computed. 
    27 ; 
    28 ;       DOUBLE:        If set to a non-zero value, computations are done in 
    29 ;                      double precision arithmetic. 
    30 ; 
    31 ; EXAMPLE: 
    32 ; 
    33 ; PROCEDURE: 
    34 ; 
    35 ; 
    36 ;                          nx-k-1  ny-l-1  
    37 ;                          sigma   sigma  (X[i,j]-Xmean)(X[i+k,j+l]-Ymean) 
    38 ;                           i=0     j=0 
    39 ;   correlation(X,[k,l])=------------------------------------------------------ 
    40 ;                                  nx-1   ny-1                   
    41 ;                                 sigma  sigma  (X[i,j]-Xmean)^2) 
    42 ;                                  i=0    j=0                       
    43 ; 
    44 ; 
    45 ;                          nx-k-1  ny-l-1  
    46 ;                          sigma   sigma  (X[i,j]-Xmean)(Y[i+k,j+l]-Ymean) 
    47 ;                           i=0     j=0 
    48 ;   covariance(X,[k,l])=------------------------------------------------------ 
    49 ;                                            nx*ny 
    50 ; 
    51 ;   Where Xmean is the mens of the sample population 
    52 ;   x=(x[0,0],x[1,0],...,x[nx-1,ny-1]). 
    53 ; 
    54 ; 
    55 ; REFERENCE: 
    56 ; 
    57 ; MODIFICATION HISTORY: 
    58 ;       28/2/2000 Sebastien Masson (smasson@lodyc.jussieu.fr) 
    59 ;       Based on the A_CORRELATE procedure of IDL 
    60 ;- 
    611 
    622FUNCTION Auto_Cov2d, X, Lag, Double = Double, zero2nan = zero2nan 
     
    7717 
    7818END 
     19;+ 
     20; 
     21; @file_comments 
     22; This function computes the autocorrelation Px(K,L) or 
     23; autocovariance Rx(K,L) of a sample population X[nx,ny] as a 
     24; function of the lag (K,L). 
     25; 
     26; @categories 
     27; Statistics. 
     28; 
     29; @param X {in}{required} 
     30; An 2 dimension Array [nx,ny] 
     31; 
     32; @param LAG {in}{required} 
     33; 2-element vector, in the intervals [-(nx-2), (nx-2)],[-(ny-2), (ny-2)], 
     34; of type integer that specifies the absolute distance(s) between  
     35; indexed elements of X. 
     36; 
     37; @keyword COVARIANCE 
     38; If set to a non-zero value, the sample autocovariance is computed. 
     39; 
     40; @keyword DOUBLE 
     41; If set to a non-zero value, computations are done in double precision arithmetic. 
     42; 
     43; @history 
     44; 28/2/2000 Sebastien Masson (smasson@lodyc.jussieu.fr) 
     45; Based on the A_CORRELATE procedure of IDL 
     46; 
     47; @version 
     48; $Id$ 
     49; 
     50;- 
     51 
    7952 
    8053FUNCTION A_Correlate2d, X, Lag, Covariance = Covariance, Double = Double 
Note: See TracChangeset for help on using the changeset viewer.