Commit 0e2f14fc authored by Antoine Berchet's avatar Antoine Berchet
Browse files

Updating figures for article

parent 95d2741a
......@@ -81,14 +81,14 @@ def adjoint(
mapper["inputs"][trid]["weight_file"] = {}
mapper["inputs"][trid]["weight_file"][ddi] = wgt_file
weights = get_weights(
transf,
wgt_file,
domain_in,
domain_out,
is_lbc)
if not is_sparse:
inout_datastore["inputs"][trid][ddi] = {"adj_out":
do_regridding_adj(
......
......@@ -73,6 +73,5 @@ def get_weights(
with open(wgt_file, "wb") as f:
pickle.dump(weights, f)
loaded_weights = True
return weights
......@@ -75,9 +75,13 @@ def plot_inversion(pytestconfig):
nsims = 25
if splt == 0:
nsims = 10
# ymax = 200
# if splt == 3:
# ymax = 600
# ax[1][splt].set_ylim([0, 125000])
# ax[1][splt].set_xlim([1, nsims])
# ax[1][splt].set_ylim([0, ymax])
ax[1][splt].set_xlim([1, 2 * nsims])
ax[1][splt].xaxis.set_tick_params(labelsize=labelsize)
ax[1][splt].yaxis.set_tick_params(labelsize=labelsize)
......
......@@ -426,7 +426,8 @@ def test_integration_inversion(dummy_config_inversion, settings, pytestconfig):
"../../figures_artifact/"))
Path(figure_dir).mkdir(parents=True, exist_ok=True)
plt.savefig("{}/posterior_matrix_{}_{}_{}.pdf"
.format(figure_dir, title, resol, nsimmax))
.format(figure_dir, title, resol, nsimmax),
bbox_inches='tight')
plt.close()
# Prior matrix
......@@ -451,5 +452,6 @@ def test_integration_inversion(dummy_config_inversion, settings, pytestconfig):
"../../figures_artifact/"))
Path(figure_dir).mkdir(parents=True, exist_ok=True)
plt.savefig("{}/prior_matrix_{}_{}_{}.pdf"
.format(figure_dir, title, resol, nsimmax))
.format(figure_dir, title, resol, nsimmax),
bbox_inches='tight')
plt.close()
Supports Markdown
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