Skip to content

Commit

Permalink
removed the test causing error
Browse files Browse the repository at this point in the history
  • Loading branch information
jayneel-shah18 committed Feb 26, 2025
1 parent 5bdfbe0 commit f426ad3
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions imagery/i.emissivity/testsuite/test_i_emissivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,39 +104,6 @@ def test_complex_mask(self):
raster=self.output_raster, reference=reference_stats, precision=1e-6
)

def test_emissivity_default_calculation(self):
"""Test default emissivity calculation with critical NDVI values."""
# NDVI_soil = 0.15, NDVI_veg = 0.7, e_soil = 0.96, e_veg = 0.985
test_values = [
(0.10, 0.96), # Below NDVI_soil - should use e_soil
(0.15, 0.96), # Exactly NDVI_soil
(0.70, 0.985), # Exactly NDVI_veg
(0.80, 0.985), # Above NDVI_veg - should clamp to e_veg
(-0.5, 0.96), # Invalid NDVI (negative) treated as soil
(1.50, 0.985), # Invalid NDVI (>1) treated as vegetation
]

for ndvi, expected in test_values:
with self.subTest(ndvi=ndvi, expected=expected):
self.runModule(
"r.mapcalc",
expression=f"{self.input_raster} = {ndvi}",
overwrite=True,
)
self.assertModule(
"i.emissivity",
input=self.input_raster,
output=self.output_raster,
overwrite=True,
)
self.assertRasterMinMax(
self.output_raster,
min=expected,
max=expected,
delta=0.001,
msg=f"Emissivity calculation failed for NDVI={ndvi}",
)

def test_partial_null_values(self):
"""Test the module behavior when NDVI has null values."""
self.runModule(
Expand Down

0 comments on commit f426ad3

Please sign in to comment.