Spectral

Latest version: v0.23.1

Safety actively analyzes 630094 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 5

0.15.0

Installing

To install, uncompress the archive, `cd` into the unpacked directory, and type


python setup.py install


Instead of downloading the archive, the latest release of the software can be automatically downloaded and installed using `pip`:


pip install -U spectral


For information on package dependencies, see the [web site](http://spectralpython.net).

New Features
- Added Minimum Noise Fraction (`mnf`) algorithm (a.k.a., Noise-Adjusted
Principal Components). An associated `noise_from_diffs` function enables
estimation of image noise from a homogeneous region of the image.

Changes
- When calling `envi.save_image`, assume an ndarray with two dimensions is
a single-band image (i.e., don't require an explicit third dimension).
- [Issue 9] All SpyFile subclass read methods now have an optional
`use_memmap` argument to indicate whether the memmap interface should be
used (vice direct file read) on a per-call basis. Default values are
specific to the particular method and file interleave.

Bug Fixes
- [Issue 7] Handle recognize comment lines in ENVI headers and accept blank
parameter values in the header. Thanks to Don March (http://ohspite.net)
- [Issue 2] Garbage results were being generated for several algorithms when
a NaN value was present in the image data. Reasonable checks are now
performed in several algorithms and an optional `allow_nan` argument (False
by default) was added to `calc_stats`.
- [Issue 1] For images with more rows than columns, the row/col of the pixel
under the mouse cursor did not display if the row index was greater than
the image width.

Performance Improvements
- [Issue 5] Improved BilFile.read_bands performance. Thanks to Don March
(http://ohspite.net)
- [Issue 8] Faster creation/display of RGB images for display. Thanks to
Don March (http://ohspite.net)

0.14

To install, uncompress the archive, `cd` into the unpacked directory, and type


python setup.py install


Instead of downloading the archive, the latest release of the software can be automatically downloaded and installed using `pip`:


pip install -U spectral


For information on package dependencies, see the [web site](http://spectralpython.sourceforge.net).

Changes
- Attempt to use Pillow fork of PIL, if available, rather than older PIL.
- `view_cube` now uses common color scale limits on all side faces.
- When creating an `AsterDatabase` instance, directories in the `SPECTRAL_DATA`
environment variable are search for the specified file (after the current
directory).
- `spectral.imshow` accepts an optional `fignum` argument to render to an
existing figure.
- Class labels in a `spectral.imshow` window can be reassigned even when class
labels were not provided in the function call (all pixels will start with
class 0).
- File `spectral/algorithms/perceptron.py` can be used independently of the
rest of the package.

Bug Fixes
- Front and left sides of the image cube displayed by `view_cube` were
mirrored left-right. Cube aspect ratio was being computed incorrectly for
non-square images. These bugs were introduced by a recent release.
- Global covariance was not being scaled properly in the
`MahalanobisDistanceClassifier`. Mathematically, it does not affect results
and did not affect results on the test data but for large covariance with
many classes, it could have cause rounding/truncation that would affect
results.
- PerceptronClassifier constructor was failing due to recent changes in
base class code. Unit tests have been added to ensure it continues to work
properly.

Performance Improvements
- PerceptronClassifier is roughly an order of magnitude faster due to better
use of numpy. Inputs are now scaled and weights are initialized withing the
data limits, which usually results in fewer iterations for convergence.

Page 5 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.