@@ -147,7 +147,7 @@ def iterator_ij(mask, index=None):
147147
148148 If `index` is not defined, iteration is performed over all non-zero
149149 elements. If `index` is defined, iteration is performed over all
150- coordinates for whch `mask[i,j] == index`.
150+ coordinates for which `mask[i,j] == index`.
151151 '''
152152
153153 if mask .ndim != 2 :
@@ -271,7 +271,7 @@ def cov_avg(image, mask, weighted=True):
271271 `mask` (integer-valued ndarray):
272272
273273 Elements specify the classes associated with pixels in `image`.
274- All pixels associeted with non-zero elements of `mask` will be
274+ All pixels associated with non-zero elements of `mask` will be
275275 used in the covariance calculation.
276276
277277 `weighted` (bool, default True):
@@ -1174,7 +1174,7 @@ def ndvi(data, red, nir):
11741174
11751175def bdist (class1 , class2 ):
11761176 '''
1177- Calulates the Bhattacharyya distance between two classes.
1177+ Calculates the Bhattacharyya distance between two classes.
11781178
11791179 USAGE: bd = bdist(class1, class2)
11801180
@@ -1201,7 +1201,7 @@ def bdist(class1, class2):
12011201
12021202def bdist_terms (a , b ):
12031203 '''
1204- Calulate the linear and quadratic terms of the Bhattacharyya distance
1204+ Calculate the linear and quadratic terms of the Bhattacharyya distance
12051205 between two classes.
12061206
12071207 USAGE: (linTerm, quadTerm) = bDistanceTerms(a, b)
@@ -1438,7 +1438,7 @@ def noise_from_diffs(X, direction='lowerright'):
14381438
14391439 `X` (np.ndarray):
14401440
1441- The data from which to estimage noise statistics. `X` should have
1441+ The data from which to estimate noise statistics. `X` should have
14421442 shape `(nrows, ncols, nbands`).
14431443
14441444 `direction` (str, default "lowerright"):
@@ -1495,7 +1495,7 @@ def __init__(self, signal, noise, napc):
14951495
14961496 `napc` (:class:`~spectral.PrincipalComponents`):
14971497
1498- Noise-Adjusted Pricipal Components
1498+ Noise-Adjusted Principal Components
14991499 '''
15001500 self .signal = signal
15011501 self .noise = noise
@@ -1592,7 +1592,7 @@ def reduce(self, X, **kwargs):
15921592
15931593 Threshold signal-to-noise ratio (SNR) to retain.
15941594
1595- Returns a verions of `X` with reduced dimensionality.
1595+ Returns a versions of `X` with reduced dimensionality.
15961596
15971597 Note that calling this method is equivalent to calling the
15981598 `get_reduction_transform` method with same keyword and applying the
@@ -1725,13 +1725,13 @@ def ppi(X, niters, threshold=0, centered=False, start=None, display=0,
17251725
17261726 An optional array of initial purity indices. This can be used to
17271727 continue computing PPI values after a previous call to `ppi` (i.e.,
1728- set `start` equal to the return value from a previou call to `ppi`.
1728+ set `start` equal to the return value from a previous call to `ppi`.
17291729 This should be an integer-valued array whose dimensions are equal
17301730 to the first two dimensions of `X`.
17311731
17321732 `display` (integer):
17331733
1734- If set to a postive integer, a :class:`~spectral.graphics.spypylab.ImageView`
1734+ If set to a positive integer, a :class:`~spectral.graphics.spypylab.ImageView`
17351735 window will be opened and dynamically display PPI values as the
17361736 function iterates. The value specifies the number of PPI iterations
17371737 between display updates. It is recommended to use a value around
@@ -1751,7 +1751,7 @@ def ppi(X, niters, threshold=0, centered=False, start=None, display=0,
17511751 These keywords will be passed to the image display and only have an
17521752 effect if the `display` argument is nonzero.
17531753
1754- This function can be interruped with a KeyboardInterrupt (ctrl-C), in which
1754+ This function can be interrupted with a KeyboardInterrupt (ctrl-C), in which
17551755 case, the most recent value of the PPI array will be returned. This can be
17561756 used in conjunction with the `display` argument to view the progression of
17571757 the PPI values until they appear stable, then terminate iteration using
@@ -1920,7 +1920,7 @@ def smacc(spectra, min_endmembers=None, max_residual_norm=float('Inf')):
19201920 for k in range (len (Fs )):
19211921 t = On * Fs [k ][q [n ]]
19221922 # This is not so important for the algorithm itself.
1923- # These values correpond to values where On == 0.0, and these
1923+ # These values correspond to values where On == 0.0, and these
19241924 # will be zeroed out below. But to avoid divide-by-zero warning
19251925 # we set small values instead of zero.
19261926 t [t == 0.0 ] = 1e-10
0 commit comments