Commit 4db59c1c authored by teresa.bister's avatar teresa.bister
Browse files

[simulations] fixes to make simulations pass new unit tests

parent 6d37bfe8
Pipeline #369374 passed with stages
in 6 minutes and 28 seconds
......@@ -1094,7 +1094,11 @@ class SourceGeometry:
"""
if ((source_density is None) and (sources is None)) or (n_src == 0):
print("No explicit sources have been set!")
self.n_src, self.rmax = 0, 0
self.n_src = 0
self.rmax = 0 if rmax is None else rmax
return
if isinstance(source_density, str) or isinstance(sources, str):
self._set_source_catalog(source_density, sources)
return
self.rmax, self.n_src = rmax, n_src
......@@ -1122,8 +1126,6 @@ class SourceGeometry:
self._set_source_density()
elif (sources is not None):
self._set_source_positions(source_density, sources, fluxes)
elif isinstance(source_density, str) or isinstance(sources, str):
self._set_source_catalog(source_density, sources)
else:
raise Exception("Source scenario not understood.")
......
Markdown is supported
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