Skip to content

Commit

Permalink
print an error when sensor is a list
Browse files Browse the repository at this point in the history
  • Loading branch information
ghislainp committed Feb 11, 2018
1 parent 2b19211 commit 2342c71
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions smrt/utils/memls_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from oct2py import octave

from smrt.core.result import Result, concat_results
from smrt import SMRTError
from smrt.core.sensitivity_study import SensitivityStudy

# MEMLS model
Expand Down Expand Up @@ -90,6 +91,8 @@ def run(sensor, snowpack, scattering_choice=ABORN, atmosphere=None, memls_path=N
ground_reflV = itertools.repeat(0)
else:
print("Using MEMLS with substrate has not been tested. Provide feeback if it works (or not)")
if isinstance(sensor.frequency, collections.Sequence):
raise SMRTError("Sensor must be single frequency for runnning memls_legagcy")
m = snowpack.substrate.reflection_matrix(sensor.frequency, snowpack.layer[-1].permittivity, np.cos(sensor.theta))
ground_reflH = m.diagonal()[1::2]
ground_reflV = m.diagonal()[0::2]
Expand Down

0 comments on commit 2342c71

Please sign in to comment.