added safegaurd to only resample surface if wl is provided
@@ -378,6 +378,7 @@ class IO:
if self.simulation_mode:
# If solving the inverse problem, the measurment is the surface reflectance
self.fm.surface.rfl = data['reflectance_file'].copy()
+ if self.fm.surface.wl is not None:
self.fm.surface.resample_reflectance()
meas = self.fm.surface.rfl
else:
