Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
__pycache__/
*.py[cod]

# Editor files
#mac
.DS_Store
*~

# C extensions
*.so

Expand Down
Binary file removed autotest/moouu/.DS_Store
Binary file not shown.
Binary file removed autotest/moouu/10par_xsec/.DS_Store
Binary file not shown.
Binary file removed autotest/moouu/10par_xsec/template/.DS_Store
Binary file not shown.
471 changes: 460 additions & 11 deletions autotest/pst_from_tests.py

Large diffs are not rendered by default.

Binary file not shown.
Binary file removed autotest/smoother/10par_xsec/template/.DS_Store
Binary file not shown.
Binary file removed bin/.DS_Store
Binary file not shown.
Binary file removed bin/linux/.DS_Store
Binary file not shown.
Binary file removed bin/win/.DS_Store
Binary file not shown.
Binary file removed docs/.DS_Store
Binary file not shown.
Binary file removed docs/_build/.DS_Store
Binary file not shown.
Binary file removed docs/_build/html/.DS_Store
Binary file not shown.
59 changes: 30 additions & 29 deletions pyemu/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -3613,36 +3613,37 @@ def _process_model_file(model_file, df):
raise Exception("wrong number of org_files for {0}".format(model_file))
org_arr = np.loadtxt(org_file[0])

for mlt in df_mf.mlt_file:
if pd.isna(mlt):
continue
mlt_data = np.loadtxt(mlt)
if org_arr.shape != mlt_data.shape:
raise Exception(
"shape of org file {}:{} differs from mlt file {}:{}".format(
org_file, org_arr.shape, mlt, mlt_data.shape
if 'mlt_file' in df_mf.columns:
for mlt in df_mf.mlt_file:
if pd.isna(mlt):
continue
mlt_data = np.loadtxt(mlt)
if org_arr.shape != mlt_data.shape:
raise Exception(
"shape of org file {}:{} differs from mlt file {}:{}".format(
org_file, org_arr.shape, mlt, mlt_data.shape
)
)
)
org_arr *= np.loadtxt(mlt)
if "upper_bound" in df.columns:
ub_vals = df_mf.upper_bound.value_counts().dropna().to_dict()
if len(ub_vals) == 0:
pass
elif len(ub_vals) > 1:
print(ub_vals)
raise Exception("different upper bound values for {0}".format(org_file))
else:
ub = float(list(ub_vals.keys())[0])
org_arr[org_arr > ub] = ub
if "lower_bound" in df.columns:
lb_vals = df_mf.lower_bound.value_counts().dropna().to_dict()
if len(lb_vals) == 0:
pass
elif len(lb_vals) > 1:
raise Exception("different lower bound values for {0}".format(org_file))
else:
lb = float(list(lb_vals.keys())[0])
org_arr[org_arr < lb] = lb
org_arr *= np.loadtxt(mlt)
if "upper_bound" in df.columns:
ub_vals = df_mf.upper_bound.value_counts().dropna().to_dict()
if len(ub_vals) == 0:
pass
elif len(ub_vals) > 1:
print(ub_vals)
raise Exception("different upper bound values for {0}".format(org_file))
else:
ub = float(list(ub_vals.keys())[0])
org_arr[org_arr > ub] = ub
if "lower_bound" in df.columns:
lb_vals = df_mf.lower_bound.value_counts().dropna().to_dict()
if len(lb_vals) == 0:
pass
elif len(lb_vals) > 1:
raise Exception("different lower bound values for {0}".format(org_file))
else:
lb = float(list(lb_vals.keys())[0])
org_arr[org_arr < lb] = lb

np.savetxt(model_file, np.atleast_2d(org_arr), fmt="%15.6E", delimiter="")

Expand Down
Loading