Commit 1cef998d authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Bugfix


Former-commit-id: 541d89fe
parent efc8f77d
......@@ -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_argskwargs):
# 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_argskwargs:
# fallback
outarr = self.interpolate_cube(arrcube, **fallback_kwargs)
outarr = self.interpolate_cube(arrcube, *fallback_argskwargs['args'], **fallback_argskwargs['kwargs'])
else:
raise exc
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment