Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
EnMAP
GFZ_Tools_EnMAP_BOX
EnPT
Commits
38772e09
Commit
38772e09
authored
Mar 25, 2020
by
Daniel Scheffler
Browse files
Added a GUI test mode to EnPTController. Added keywords to setup.py.
Signed-off-by:
Daniel Scheffler
<
danschef@gfz-potsdam.de
>
parent
9c796dba
Pipeline
#7857
passed with stages
in 57 minutes and 41 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
enpt/execution/controller.py
View file @
38772e09
...
...
@@ -35,6 +35,7 @@ import zipfile
import
shutil
import
weakref
import
warnings
import
pickle
from
..options.config
import
EnPTConfig
from
..io.reader
import
L1B_Reader
...
...
@@ -142,23 +143,39 @@ class EnPT_Controller(object):
def
run_all_processors
(
self
):
"""Run all processors at once."""
try
:
self
.
read_L1B_data
()
if
self
.
cfg
.
run_deadpix_P
:
self
.
L1_obj
.
correct_dead_pixels
()
# self.run_toaRad2toaRef() # this is only needed for geometry processor but AC expects radiance
self
.
run_dem_processor
()
if
self
.
cfg
.
enable_ac
:
self
.
run_atmospheric_correction
()
else
:
self
.
L1_obj
.
logger
.
info
(
'Skipping atmospheric correction as configured and '
'computing top-of-atmosphere reflectance instead.'
)
self
.
run_toaRad2toaRef
()
self
.
run_geometry_processor
()
self
.
run_orthorectification
()
self
.
write_output
()
finally
:
self
.
cleanup
()
if
os
.
getenv
(
'IS_ENPT_GUI_TEST'
)
!=
"1"
:
try
:
self
.
read_L1B_data
()
if
self
.
cfg
.
run_deadpix_P
:
self
.
L1_obj
.
correct_dead_pixels
()
# self.run_toaRad2toaRef() # this is only needed for geometry processor but AC expects radiance
self
.
run_dem_processor
()
if
self
.
cfg
.
enable_ac
:
self
.
run_atmospheric_correction
()
else
:
self
.
L1_obj
.
logger
.
info
(
'Skipping atmospheric correction as configured and '
'computing top-of-atmosphere reflectance instead.'
)
self
.
run_toaRad2toaRef
()
self
.
run_geometry_processor
()
self
.
run_orthorectification
()
self
.
write_output
()
finally
:
self
.
cleanup
()
else
:
print
(
'EnPT Controller received the following configuration:'
)
print
(
repr
(
self
.
cfg
))
if
not
os
.
path
.
isdir
(
self
.
cfg
.
output_dir
):
raise
NotADirectoryError
(
self
.
cfg
.
output_dir
)
with
open
(
os
.
path
.
join
(
self
.
cfg
.
output_dir
,
'received_args_kwargs.pkl'
))
as
outF
:
pickle
.
dump
(
dict
(
json_config
=
self
.
cfg
.
json_config
,
kwargs
=
self
.
cfg
.
kwargs
),
outF
)
@
classmethod
def
_cleanup
(
cls
,
tempDir
,
warn_message
):
...
...
setup.py
View file @
38772e09
...
...
@@ -69,7 +69,7 @@ setup(
zip_safe
=
False
,
scripts
=
[
'bin/enpt_cli.py'
],
data
=
[],
# TODO
keywords
=
'enpt'
,
keywords
=
[
'EnPT'
,
'EnMAP'
,
'EnMAP-Box'
,
'hyperspectral'
,
'remote sensing'
,
'satellite'
,
'processing chain'
]
,
classifiers
=
[
'Development Status :: 2 - Pre-Alpha'
,
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)'
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment