Commit 541d89fe authored by Daniel Scheffler's avatar Daniel Scheffler
Browse files

Bugfix

parent a59921e3
Pipeline #1718 canceled with stage
in 4 minutes and 37 seconds
...@@ -101,10 +101,9 @@ class L2B_object(L2A_object): ...@@ -101,10 +101,9 @@ class L2B_object(L2A_object):
tgt_sensor=tgt_sen, tgt_sensor=tgt_sen,
tgt_LBA=tgt_LBA, tgt_LBA=tgt_LBA,
nodataVal=self.arr.nodata, nodataVal=self.arr.nodata,
fallback_kwargs=dict( fallback_argskwargs=dict(
source_CWLs=src_cwls, args=dict(source_CWLs=src_cwls, target_CWLs=tgt_cwls,),
target_CWLs=tgt_cwls, kwargs=dict(kind='linear')
kind='linear'
)) ))
self.arr = outArr self.arr = outArr
...@@ -152,7 +151,7 @@ class SpectralHomogenizer(object): ...@@ -152,7 +151,7 @@ class SpectralHomogenizer(object):
return outarr return outarr
def predict_by_machine_learner(self, arrcube, method, src_satellite, src_sensor, src_LBA, 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() # TODO: add LBA validation to .predict()
PR = RSImage_Predictor(method=method, classifier_rootDir=self.classifier_rootDir) PR = RSImage_Predictor(method=method, classifier_rootDir=self.classifier_rootDir)
...@@ -177,9 +176,9 @@ class SpectralHomogenizer(object): ...@@ -177,9 +176,9 @@ class SpectralHomogenizer(object):
self.logger.info('Performing spectral homogenization using %s. Target is %s %s %s.' self.logger.info('Performing spectral homogenization using %s. Target is %s %s %s.'
% (method, tgt_satellite, tgt_sensor, tgt_LBA)) % (method, tgt_satellite, tgt_sensor, tgt_LBA))
outarr = PR.predict(arrcube, classifier=cls, nodataVal=nodataVal) outarr = PR.predict(arrcube, classifier=cls, nodataVal=nodataVal)
elif fallback_kwargs: elif fallback_argskwargs:
# fallback # fallback
outarr = self.interpolate_cube(arrcube, **fallback_kwargs) outarr = self.interpolate_cube(arrcube, *fallback_argskwargs['args'], **fallback_argskwargs['kwargs'])
else: else:
raise exc 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