Commit d7a17f2
committed
Set default BandInfo.band_{quantity,unit} to None (fixes #46).
When reading ENVI files, the band_quantity attribute of the SpyFile's BandInfo
object was being set to "Wavelength". While that is usually the case, it is
not always. Now, that assumption is no longer made and the band_quantity and
band_unit attributes are defaulted to None in the BandInfo object (the previous
default was an empty string).
* graphics/spypylab.py:
(plot): Handle band_quantity and band_unit default value None.
* io/envi.py:
(open): band_quantity defaults to None instead of "Wavelength". If
"wavelength units" is not specified in the header, default band_unit to
None instead of empty string.
(add_band_info_to_metadata): Handle and band_unit default value None.
* spectral.py:
(BandInfo.__init__): Initialize band_quantity and band_unit to None.1 parent 8bbf5df commit d7a17f2
3 files changed
+14
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
1304 | | - | |
1305 | | - | |
1306 | | - | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
1307 | 1313 | | |
1308 | 1314 | | |
1309 | 1315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
354 | | - | |
355 | | - | |
| 354 | + | |
356 | 355 | | |
357 | 356 | | |
358 | 357 | | |
| |||
666 | 665 | | |
667 | 666 | | |
668 | 667 | | |
669 | | - | |
670 | | - | |
| 668 | + | |
| 669 | + | |
671 | 670 | | |
672 | 671 | | |
673 | 672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
225 | | - | |
| 224 | + | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| |||
0 commit comments