diff --git a/gprMax/cmds_geometry/add_surface_roughness.py b/gprMax/cmds_geometry/add_surface_roughness.py index 00eb86cf..a79898a5 100644 --- a/gprMax/cmds_geometry/add_surface_roughness.py +++ b/gprMax/cmds_geometry/add_surface_roughness.py @@ -154,7 +154,7 @@ class AddSurfaceRoughness(UserObjectGeometry): if zs == zf: logger.exception(f"{self.__str__()} dimensions are not specified correctly") raise ValueError - if ys not in [volume.ys and volume.yf]: + if ys not in [volume.ys, volume.yf]: logger.exception(f"{self.__str__()} can only be used on the external " + "surfaces of a fractal box") raise ValueError fractalrange = (round_value(limits[0] / grid.dy), round_value(limits[1] / grid.dy)) @@ -182,7 +182,7 @@ class AddSurfaceRoughness(UserObjectGeometry): requestedsurface = "yplus" elif zs == zf: - if zs not in [volume.zs and volume.zf]: + if zs not in [volume.zs, volume.zf]: logger.exception(f"{self.__str__()} can only be used on the external " + "surfaces of a fractal box") raise ValueError fractalrange = (round_value(limits[0] / grid.dz), round_value(limits[1] / grid.dz))