@@ -147,7 +147,7 @@ def iterator_ij(mask, index=None):
147
147
148
148
If `index` is not defined, iteration is performed over all non-zero
149
149
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`.
151
151
'''
152
152
153
153
if mask .ndim != 2 :
@@ -271,7 +271,7 @@ def cov_avg(image, mask, weighted=True):
271
271
`mask` (integer-valued ndarray):
272
272
273
273
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
275
275
used in the covariance calculation.
276
276
277
277
`weighted` (bool, default True):
@@ -1174,7 +1174,7 @@ def ndvi(data, red, nir):
1174
1174
1175
1175
def bdist (class1 , class2 ):
1176
1176
'''
1177
- Calulates the Bhattacharyya distance between two classes.
1177
+ Calculates the Bhattacharyya distance between two classes.
1178
1178
1179
1179
USAGE: bd = bdist(class1, class2)
1180
1180
@@ -1201,7 +1201,7 @@ def bdist(class1, class2):
1201
1201
1202
1202
def bdist_terms (a , b ):
1203
1203
'''
1204
- Calulate the linear and quadratic terms of the Bhattacharyya distance
1204
+ Calculate the linear and quadratic terms of the Bhattacharyya distance
1205
1205
between two classes.
1206
1206
1207
1207
USAGE: (linTerm, quadTerm) = bDistanceTerms(a, b)
@@ -1438,7 +1438,7 @@ def noise_from_diffs(X, direction='lowerright'):
1438
1438
1439
1439
`X` (np.ndarray):
1440
1440
1441
- The data from which to estimage noise statistics. `X` should have
1441
+ The data from which to estimate noise statistics. `X` should have
1442
1442
shape `(nrows, ncols, nbands`).
1443
1443
1444
1444
`direction` (str, default "lowerright"):
@@ -1495,7 +1495,7 @@ def __init__(self, signal, noise, napc):
1495
1495
1496
1496
`napc` (:class:`~spectral.PrincipalComponents`):
1497
1497
1498
- Noise-Adjusted Pricipal Components
1498
+ Noise-Adjusted Principal Components
1499
1499
'''
1500
1500
self .signal = signal
1501
1501
self .noise = noise
@@ -1592,7 +1592,7 @@ def reduce(self, X, **kwargs):
1592
1592
1593
1593
Threshold signal-to-noise ratio (SNR) to retain.
1594
1594
1595
- Returns a verions of `X` with reduced dimensionality.
1595
+ Returns a versions of `X` with reduced dimensionality.
1596
1596
1597
1597
Note that calling this method is equivalent to calling the
1598
1598
`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,
1725
1725
1726
1726
An optional array of initial purity indices. This can be used to
1727
1727
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`.
1729
1729
This should be an integer-valued array whose dimensions are equal
1730
1730
to the first two dimensions of `X`.
1731
1731
1732
1732
`display` (integer):
1733
1733
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`
1735
1735
window will be opened and dynamically display PPI values as the
1736
1736
function iterates. The value specifies the number of PPI iterations
1737
1737
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,
1751
1751
These keywords will be passed to the image display and only have an
1752
1752
effect if the `display` argument is nonzero.
1753
1753
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
1755
1755
case, the most recent value of the PPI array will be returned. This can be
1756
1756
used in conjunction with the `display` argument to view the progression of
1757
1757
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')):
1920
1920
for k in range (len (Fs )):
1921
1921
t = On * Fs [k ][q [n ]]
1922
1922
# 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
1924
1924
# will be zeroed out below. But to avoid divide-by-zero warning
1925
1925
# we set small values instead of zero.
1926
1926
t [t == 0.0 ] = 1e-10
0 commit comments