Skip to content

Commit e6e3893

Browse files
authored
Merge pull request #120 from mfmceneaney/fix_rescaling
format: Formatted python code.
2 parents 83f33f2 + b5829c9 commit e6e3893

3 files changed

Lines changed: 21 additions & 6 deletions

File tree

py/saga/orchestrate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,12 @@
1212

1313

1414
def create_jobs(
15-
configs, base_dir="./", submit_path="submit.sh", yaml_path="args.yaml", aliases=None, replacements=None,
15+
configs,
16+
base_dir="./",
17+
submit_path="submit.sh",
18+
yaml_path="args.yaml",
19+
aliases=None,
20+
replacements=None,
1621
):
1722
"""
1823
Parameters

py/saga/plot.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,13 +1401,21 @@ def plot_results_array(
14011401
continue
14021402

14031403
# Format graph titles and axes depending on location in grid array
1404-
if j != 0 and use_grid_ylabels and graph_array[i][j-1] is not None:
1404+
if j != 0 and use_grid_ylabels and graph_array[i][j - 1] is not None:
14051405
plot_results_kwargs_array[i][j]["ylabel"] = ""
1406-
if i != 0 and use_grid_titles and graph_array[i-1][j] is not None:
1406+
if i != 0 and use_grid_titles and graph_array[i - 1][j] is not None:
14071407
plot_results_kwargs_array[i][j]["title"] = ""
1408-
if i != shape[0] - 1 and use_grid_xlabels and graph_array[i+1][j] is not None:
1408+
if (
1409+
i != shape[0] - 1
1410+
and use_grid_xlabels
1411+
and graph_array[i + 1][j] is not None
1412+
):
14091413
plot_results_kwargs_array[i][j]["xlabel"] = ""
1410-
if j != shape[1] - 1 and use_grid_hist_ylabels and graph_array[i][j+1] is not None:
1414+
if (
1415+
j != shape[1] - 1
1416+
and use_grid_hist_ylabels
1417+
and graph_array[i][j + 1] is not None
1418+
):
14111419
plot_results_kwargs_array[i][j]["hist_ylabel"] = ""
14121420

14131421
# Plot results

py/saga/rescale.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ def rescale_graph_data(
134134
# Set y values to constant and update scaled y errors if requested
135135
scaled_y_mean = y_mean if yvalue < -1 else [yvalue for i in range(len(y_mean))]
136136
if yvalue >= -1:
137-
scaled_yerr_mean *= np.sqrt(1 - np.square(yvalue * tpol_factor))
137+
scaled_yerr_mean = (
138+
np.divide(1.0, np.sqrt(scaled_ct_mean)) * 1.0 / (tpol_factor * tdil_factor)
139+
) * np.sqrt(1 - np.square(yvalue * tpol_factor * tdil_factor))
138140

139141
# Create a length 1 list of graph data with scaled graph results
140142
graph_list = np.array(

0 commit comments

Comments
 (0)