Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
added check to look for BIN_OUT in directory that param is in
Browse files Browse the repository at this point in the history
  • Loading branch information
cwishard committed Nov 11, 2021
1 parent 744949f commit e6deb35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/swiftest/swiftest/simulation_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,18 @@ def __init__(self, codename="Swiftest", param_file="", readbin=True):
}
self.codename = codename
if param_file != "" :
dir_path = os.path.dirname(os.path.realpath(param_file))
self.read_param(param_file, codename)
if readbin:
if os.path.exists(self.param['BIN_OUT']):
self.bin2xr()
elif os.path.exists(dir_path + '/' + self.param['BIN_OUT']):
self.param['BIN_OUT'] = dir_path + '/' + self.param['BIN_OUT']
self.bin2xr()
else:
print(f"BIN_OUT file {self.param['BIN_OUT']} not found.")
return


def add(self, plname, date=date.today().isoformat(), idval=None):
"""
Adds a solar system body to an existing simulation DataSet.
Expand Down

0 comments on commit e6deb35

Please sign in to comment.