Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
geomultisens
gms_preprocessing
Commits
1cef998d
Commit
1cef998d
authored
Dec 13, 2017
by
Daniel Scheffler
Browse files
Bugfix
Former-commit-id:
541d89fe
parent
efc8f77d
Changes
1
Hide whitespace changes
Inline
Side-by-side
gms_preprocessing/algorithms/L2B_P.py
View file @
1cef998d
...
...
@@ -101,10 +101,9 @@ class L2B_object(L2A_object):
tgt_sensor
=
tgt_sen
,
tgt_LBA
=
tgt_LBA
,
nodataVal
=
self
.
arr
.
nodata
,
fallback_kwargs
=
dict
(
source_CWLs
=
src_cwls
,
target_CWLs
=
tgt_cwls
,
kind
=
'linear'
fallback_argskwargs
=
dict
(
args
=
dict
(
source_CWLs
=
src_cwls
,
target_CWLs
=
tgt_cwls
,),
kwargs
=
dict
(
kind
=
'linear'
)
))
self
.
arr
=
outArr
...
...
@@ -152,7 +151,7 @@ class SpectralHomogenizer(object):
return
outarr
def
predict_by_machine_learner
(
self
,
arrcube
,
method
,
src_satellite
,
src_sensor
,
src_LBA
,
tgt_satellite
,
tgt_sensor
,
tgt_LBA
,
nodataVal
=
None
,
**
fallback_kwargs
):
tgt_satellite
,
tgt_sensor
,
tgt_LBA
,
nodataVal
=
None
,
**
fallback_
args
kwargs
):
# TODO: add LBA validation to .predict()
PR
=
RSImage_Predictor
(
method
=
method
,
classifier_rootDir
=
self
.
classifier_rootDir
)
...
...
@@ -177,9 +176,9 @@ class SpectralHomogenizer(object):
self
.
logger
.
info
(
'Performing spectral homogenization using %s. Target is %s %s %s.'
%
(
method
,
tgt_satellite
,
tgt_sensor
,
tgt_LBA
))
outarr
=
PR
.
predict
(
arrcube
,
classifier
=
cls
,
nodataVal
=
nodataVal
)
elif
fallback_kwargs
:
elif
fallback_
args
kwargs
:
# fallback
outarr
=
self
.
interpolate_cube
(
arrcube
,
**
fallback_kwargs
)
outarr
=
self
.
interpolate_cube
(
arrcube
,
*
fallback_argskwargs
[
'args'
],
**
fallback_
args
kwargs
[
'kwargs'
]
)
else
:
raise
exc
...
...
Daniel Scheffler
@danschef
mentioned in commit
3fb500bb
·
Mar 31, 2020
mentioned in commit
3fb500bb
mentioned in commit 3fb500bbd258576134c9031293b6043b40c59266
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment