Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
EnPT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
EnMAP
GFZ_Tools_EnMAP_BOX
EnPT
Commits
544e6cc0
Commit
544e6cc0
authored
1 year ago
by
Daniel Scheffler
Browse files
Options
Downloads
Patches
Plain Diff
Refactor method names.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
a86afc47
No related branches found
Branches containing commit
Tags
v0.20.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
enpt/processors/atmospheric_correction/atmospheric_correction.py
+9
-9
9 additions, 9 deletions
...ocessors/atmospheric_correction/atmospheric_correction.py
with
9 additions
and
9 deletions
enpt/processors/atmospheric_correction/atmospheric_correction.py
+
9
−
9
View file @
544e6cc0
...
...
@@ -138,7 +138,7 @@ class AtmosphericCorrector(object):
return
True
def
_run_
AC
__land_mode
(
self
,
def
_run_
ac
__land_mode
(
self
,
enmap_ImageL1
:
EnMAPL1Product_SensorGeo
)
->
(
np
.
ndarray
,
np
.
ndarray
,
dict
):
"""
Run atmospheric correction in
'
land
'
mode, i.e., use SICOR for all surfaces.
"""
...
...
@@ -166,7 +166,7 @@ class AtmosphericCorrector(object):
return
boa_ref_vnir
,
boa_ref_swir
,
land_additional_results
def
_run_
AC
__water_mode
(
self
,
enmap_ImageL1
:
EnMAPL1Product_SensorGeo
def
_run_
ac
__water_mode
(
self
,
enmap_ImageL1
:
EnMAPL1Product_SensorGeo
)
->
(
np
.
ndarray
,
np
.
ndarray
):
"""
Run atmospheric correction in
'
water
'
mode, i.e., use ACWater/Polymer for water surfaces only.
...
...
@@ -208,7 +208,7 @@ class AtmosphericCorrector(object):
return
wl_ref_vnir
,
wl_ref_swir
,
water_additional_results
def
_run_
AC
__combined_mode
(
self
,
def
_run_
ac
__combined_mode
(
self
,
enmap_ImageL1
:
EnMAPL1Product_SensorGeo
)
->
(
np
.
ndarray
,
np
.
ndarray
,
dict
):
"""
Run atmospheric corr. in
'
combined
'
mode, i.e., use SICOR for land and ACWater/Polymer for water surfaces.
...
...
@@ -270,7 +270,7 @@ class AtmosphericCorrector(object):
return
wlboa_ref_vnir
,
wlboa_ref_swir
,
water_additional_results
,
land_additional_results
@staticmethod
def
_validate_
AC
_results
(
reflectance_vnir
:
np
.
ndarray
,
def
_validate_
ac
_results
(
reflectance_vnir
:
np
.
ndarray
,
reflectance_swir
:
np
.
ndarray
,
logger
:
Logger
):
for
detectordata
,
detectorname
in
zip
([
reflectance_vnir
,
reflectance_swir
],
...
...
@@ -308,20 +308,20 @@ class AtmosphericCorrector(object):
if
self
.
cfg
.
mode_ac
in
[
'
water
'
,
'
combined
'
]
and
not
acwater_operable
:
# use SICOR as fallback AC for water surfaces if ACWater/Polymer is not installed
reflectance_vnir
,
reflectance_swir
,
land_additional_results
=
\
self
.
_run_
AC
__land_mode
(
enmap_ImageL1
)
self
.
_run_
ac
__land_mode
(
enmap_ImageL1
)
else
:
if
self
.
cfg
.
mode_ac
==
'
combined
'
:
reflectance_vnir
,
reflectance_swir
,
water_additional_results
,
land_additional_results
=
\
self
.
_run_
AC
__combined_mode
(
enmap_ImageL1
)
self
.
_run_
ac
__combined_mode
(
enmap_ImageL1
)
elif
self
.
cfg
.
mode_ac
==
'
water
'
:
reflectance_vnir
,
reflectance_swir
,
water_additional_results
=
\
self
.
_run_
AC
__water_mode
(
enmap_ImageL1
)
self
.
_run_
ac
__water_mode
(
enmap_ImageL1
)
elif
self
.
cfg
.
mode_ac
==
'
land
'
:
reflectance_vnir
,
reflectance_swir
,
land_additional_results
=
\
self
.
_run_
AC
__land_mode
(
enmap_ImageL1
)
self
.
_run_
ac
__land_mode
(
enmap_ImageL1
)
else
:
raise
ValueError
(
self
.
cfg
.
mode_ac
,
...
...
@@ -329,7 +329,7 @@ class AtmosphericCorrector(object):
"
Choose one out of
'
land
'
,
'
water
'
,
'
combined
'
.
"
)
# validate outputs
self
.
_validate_
AC
_results
(
reflectance_vnir
,
reflectance_swir
,
logger
=
enmap_ImageL1
.
logger
)
self
.
_validate_
ac
_results
(
reflectance_vnir
,
reflectance_swir
,
logger
=
enmap_ImageL1
.
logger
)
# join results
enmap_ImageL1
.
logger
.
info
(
'
Joining results of atmospheric correction.
'
)
...
...
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