Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Band map #367

Merged
merged 5 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions env_tests/test_modtran_json_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ class JsonTest(unittest.TestCase):
"""

def test_midlat_summer_albedo(self):

"""
Test the mid latitude summer albedo configuration.
"""
Expand Down Expand Up @@ -56,7 +55,6 @@ def test_midlat_summer_albedo(self):
self.assertTrue(d == data)

def test_tropical_albedo(self):

"""
Test the tropical albedo configuration.
"""
Expand Down Expand Up @@ -87,13 +85,11 @@ def test_tropical_albedo(self):
self.assertTrue(d == data)

def test_thermal_channel(self):

"""
Test surface brightness configuration.
"""
pass


if __name__ == "__main__":

unittest.main()
1 change: 0 additions & 1 deletion tests/test_read_subset.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@


class TestReadSubset(unittest.TestCase):

img, geobox = ut.create_test_image((1200, 1500))
img[:] = 1

Expand Down
3 changes: 0 additions & 3 deletions tests/test_reformat_tp5.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@


class Tp5ReformatTest(unittest.TestCase):

"""
Test that the string formatting matches the old
output method.
Expand All @@ -29,7 +28,6 @@ def test_midlat_summer_albdo0(self):
ref_albedo = "".join(src.readlines())

with tempfile.TemporaryDirectory() as tmpdir:

out_fname = pjoin(tmpdir, "test-midlat-summer.tp5")
with open(out_fname, "w") as src:
kwargs = {
Expand Down Expand Up @@ -66,7 +64,6 @@ def test_midlat_summer_transmittance(self):
ref_trans = "".join(src.readlines())

with tempfile.TemporaryDirectory() as tmpdir:

out_fname = pjoin(tmpdir, "test-midlat-summer-trans.tp5")
with open(out_fname, "w") as src:
kwargs = {
Expand Down
8 changes: 4 additions & 4 deletions tests/test_tiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,20 @@ def test_boundary_2(self):

def test_exception_1(self):
"""Test empty image:"""
for (samples, lines, xtile, ytile) in self.exception_input1:
for samples, lines, xtile, ytile in self.exception_input1:
tiles_list = list(generate_tiles(samples, lines, xtile, ytile))
self.assertEqual(tiles_list, [], "Expected an empty tile list.")

def test_exception_2(self):
"""Test empty tiles:"""
for (samples, lines, xtile, ytile) in self.exception_input2:
for samples, lines, xtile, ytile in self.exception_input2:
self.assertRaises(
ZeroDivisionError, generate_tiles, samples, lines, xtile, ytile
)

def do_test(self, test_input):
"""Check sizes and coverage for a list of test input."""
for (samples, lines, xtile, ytile) in test_input:
for samples, lines, xtile, ytile in test_input:
tiles_list = list(generate_tiles(samples, lines, xtile, ytile))

self.check_sizes(xtile, ytile, tiles_list)
Expand Down Expand Up @@ -126,7 +126,7 @@ def check_tiling(self, samples, lines, tiles_list):
# keyword flags. This confuses pylint.
# pylint: enable=unbalanced-tuple-unpacking

for (tag, flat_index) in zip(unique, unique_indices):
for tag, flat_index in zip(unique, unique_indices):
index = numpy.unravel_index(flat_index, (lines, samples))
self.assertGreater(tag, 0, "Hole in coverage detected at " + repr(index))
self.assertIn(tag, tag_dict, "Tile overlap detected at " + repr(index))
Expand Down
1 change: 0 additions & 1 deletion wagl/acquisition/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ def acquisitions_s2_sinergise(pathname):

acqs = []
for band_id in band_configurations:

# If it is a configured B-format transform it to the correct format
if re.match("[0-9].?", band_id):
band_name = "B{}".format(band_id.zfill(2))
Expand Down
Loading
Loading