-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENH: Allow to use bands IDs, names and common name added to mapped na…
…mes when trying to load a spectral band (#111)
- Loading branch information
1 parent
ee35508
commit e65c717
Showing
5 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" Script testing EOReader bands """ | ||
from CI.SCRIPTS.scripts_utils import READER, opt_path | ||
from eoreader.bands import BLUE, YELLOW | ||
|
||
|
||
def test_bands_s3_olci(): | ||
"""Test EOReader bands for Sentinel-3 OLCI""" | ||
prod_path = opt_path().joinpath( | ||
"S3A_OL_1_EFR____20191215T105023_20191215T105323_20191216T153115_0179_052_322_2160_LN1_O_NT_002.SEN3.zip" | ||
) | ||
prod = READER.open(prod_path) | ||
|
||
# Check all these bands are the same | ||
assert list(set(prod.to_band(["Oa07", YELLOW, "YELLOW"]))) == [YELLOW] | ||
|
||
|
||
def test_bands_l8(): | ||
"""Test EOReader bands for Landsat-8""" | ||
prod_path = opt_path().joinpath("LC08_L1GT_023030_20200518_20200527_01_T2") | ||
prod = READER.open(prod_path) | ||
|
||
# Check all these bands are the same | ||
assert list(set(prod.to_band(["BLUE", "Blue", 2, BLUE, "2"]))) == [BLUE] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters