Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MVCM
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Paolo Veglio
MVCM
Commits
074cf294
Commit
074cf294
authored
2 years ago
by
Paolo Veglio
Browse files
Options
Downloads
Patches
Plain Diff
more spectral tests implemented
parent
895b6748
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_spectral_tests.py
+60
-0
60 additions, 0 deletions
tests/test_spectral_tests.py
with
60 additions
and
0 deletions
tests/test_spectral_tests.py
+
60
−
0
View file @
074cf294
...
...
@@ -119,6 +119,14 @@ def test_11_12um_diff(data, thresholds, ref_confidence):
assert
np
.
allclose
(
cmin
,
ref_confidence
.
diff11_12um_confidence
.
values
)
def
test_bt_difference_11_4um_test_ocean
():
pass
def
test_bt_difference_11_4um_test_land
():
pass
def
test_variability_11um_test
(
data
,
thresholds
,
ref_confidence
):
cmin
=
np
.
ones
(
data
.
latitude
.
shape
)
for
scene_name
in
[
'
Polar_Day_Ocean
'
,
'
Polar_Night_Ocean
'
]:
...
...
@@ -129,3 +137,55 @@ def test_variability_11um_test(data, thresholds, ref_confidence):
cmin
,
bit
=
SceneType
.
variability_11um_test
(
'
M15
'
,
cmin
)
assert
np
.
allclose
(
cmin
,
ref_confidence
.
var11um_confidence
.
values
)
def
test_oceanic_stratus_11_4um_test
(
data
,
thresholds
,
ref_confidence
):
cmin
=
np
.
ones
(
data
.
latitude
.
shape
)
for
scene_name
in
[
'
Land_Day
'
,
'
Land_Day_Coast
'
,
'
Land_Day_Desert
'
,
'
Land_Day_Desert_Coast
'
,
'
Ocean_Day
'
,
'
Ocean_Night
'
,
'
Polar_Day_Land
'
,
'
Polar_Day_Coast
'
,
'
Polar_Day_Desert
'
,
'
Polar_Day_Desert_Coast
'
,
'
Polar_Day_Ocean
'
,
'
Polar_Night_Ocean
'
]:
SceneType
=
tst
.
CloudTests
(
data
=
data
,
scene_name
=
scene_name
,
thresholds
=
thresholds
)
cmin
,
bit
=
SceneType
.
oceanic_stratus_11_4um_test
(
'
M15-M12
'
,
cmin
)
assert
np
.
allclose
(
cmin
,
ref_confidence
.
oceanic_stratus_11_4um_confidence
.
values
)
def
test_nir_reflectance_test
(
data
,
thresholds
,
ref_confidence
):
cmin
=
np
.
ones
(
data
.
latitude
.
shape
)
for
scene_name
in
[
'
Ocean_Day
'
,
'
Polar_Day_Ocean
'
]:
SceneType
=
tst
.
CloudTests
(
data
=
data
,
scene_name
=
scene_name
,
thresholds
=
thresholds
)
cmin
,
bit
=
SceneType
.
nir_reflectance_test
(
'
M07
'
,
cmin
)
assert
np
.
allclose
(
cmin
,
ref_confidence
.
NIR_reflectance_confidence
.
values
)
def
test_vis_nir_ratio_test
(
data
,
thresholds
,
ref_confidence
):
cmin
=
np
.
ones
(
data
.
latitude
.
shape
)
for
scene_name
in
[
'
Ocean_Day
'
,
'
Polar_Day_Ocean
'
]:
SceneType
=
tst
.
CloudTests
(
data
=
data
,
scene_name
=
scene_name
,
thresholds
=
thresholds
)
cmin
,
bit
=
SceneType
.
vis_nir_ratio_test
(
'
M07-M05ratio
'
,
cmin
)
assert
np
.
allclose
(
cmin
,
ref_confidence
.
Vis_NIR_ratio_confidence
.
values
)
def
test_16_21um_reflectance_test
(
data
,
thresholds
,
ref_confidence
):
cmin
=
np
.
ones
(
data
.
latitude
.
shape
)
for
scene_name
in
[
'
Ocean_Day
'
,
'
Polar_Day_Ocean
'
]:
SceneType
=
tst
.
CloudTests
(
data
=
data
,
scene_name
=
scene_name
,
thresholds
=
thresholds
)
cmin
,
bit
=
SceneType
.
test_16_21um_reflectance
(
'
M10
'
,
cmin
)
assert
np
.
allclose
(
cmin
,
ref_confidence
.
refl_16_21um_confidence
.
values
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment