Removed spurious prints. Do better CosmoTool exception translation
This commit is contained in:
parent
22aa572370
commit
1fe8f58105
5 changed files with 63 additions and 7 deletions
|
@ -105,6 +105,9 @@ def loadRamsesAll(basepath, snapshot_id, **kwargs):
|
|||
Args:
|
||||
basepath (str): The base path of the snapshot (i.e. the directory holding the output_XXXXX directories)
|
||||
snapshot_id (int): The identifier of the snapshot to load.
|
||||
|
||||
Keyword args:
|
||||
verboseMulti (bool): If true, print some progress information on loading multiple files
|
||||
|
||||
See Also:
|
||||
cosmotool.loadRamses
|
||||
|
@ -112,8 +115,15 @@ def loadRamsesAll(basepath, snapshot_id, **kwargs):
|
|||
"""
|
||||
cpu_id = 0
|
||||
output = None
|
||||
verbose = kwargs.get('verboseMulti',False)
|
||||
new_kw = dict(kwargs)
|
||||
if 'verboseMulti' in new_kw:
|
||||
del new_kw['verboseMulti']
|
||||
while True:
|
||||
s = loadRamses("%s/output_%05d" % (basepath,snapshot_id), snapshot_id, cpu_id, **kwargs)
|
||||
base = "%s/output_%05d" % (basepath,snapshot_id)
|
||||
if verbose:
|
||||
print("Loading sub-snapshot %s (cpu_id=%d)" % (base,cpu_id))
|
||||
s = loadRamses(base, snapshot_id, cpu_id, **new_kw)
|
||||
if s == None:
|
||||
break
|
||||
if output == None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue