Commit 86dba171 authored by Antoine Berchet's avatar Antoine Berchet
Browse files

Updating figures

parent 0cea6091
......@@ -3,9 +3,9 @@
dirout=/home/satellites13/aberchet/pytest/
dirout=/homel/aberchet/pytest/
export PYCIF_DATATEST=/home/chimereges/PYCIF_TEST_DATA/
mark="(dummy and article and inversion and not adjtltest) or (fwd and ref_config)"
mark="(fwd and ref_config)"
mark="test_in_ci and dummy and adjtltest"
mark="(dummy and article and inversion and not adjtltest and not uncertainties) or (fwd and ref_config)"
#mark="(fwd and ref_config)"
#mark="test_in_ci and dummy and adjtltest"
#export PYCIF_DATATEST=/tmp/PYCIF_DATA_TEST/
#pytest -s -m "test_in_ci" --basetemp=/home/satellites13/aberchet/pytest/ \
......
......@@ -108,7 +108,7 @@ def do_transforms(
# Update tmp_datastore
tmp_datastore["inputs"] = tmp_inputs
print('TTTTTTTTTTTTT',tmp_outputs)
# print('TTTTTTTTTTTTT',tmp_outputs)
tmp_datastore["outputs"] = tmp_outputs
# Create sub directory if needed
......@@ -125,7 +125,7 @@ def do_transforms(
missingperiod = do_simu
# Do the transform
print('WWWWWWWWWWWWWWWWWW',transform_mode)
# print('WWWWWWWWWWWWWWWWWW',transform_mode)
apply_transform = transf.forward if transform_mode in ["fwd", "tl"] \
else transf.adjoint
#print('rrrrr',tmp_datastore)
......
......@@ -17,7 +17,7 @@ def forward(
):
datastore = inout_datastore["inputs"]
print('ddddddddddd',datastore)
# print('ddddddddddd',datastore)
for trid in mapper["inputs"]:
input_type = trid[0]
......@@ -27,7 +27,7 @@ def forward(
# If the model does not need to compute a simulation,
# just skip this step
print('BBBBBBBBBBBBBBBBBBB',data2dump)
# print('BBBBBBBBBBBBBBBBBBB',data2dump)
transform.model.native2inputs(
data2dump, input_type, di, df, runsubdir, mode, onlyinit, do_simu
)
......
......@@ -151,8 +151,8 @@ def adjoint(
vaggreg = vmap2vaggreg(vdata[np.newaxis], tracer, tracer.domain)
# 2d maps to control vector slices
print('SSSSSSSSSSSSSSSSS',tracer.dim,tracer.xpointer,ds,tracer.hresoldim,tracer.vresoldim,
vaggreg.shape,tracer,tracer.domain)
# print('SSSSSSSSSSSSSSSSS',tracer.dim,tracer.xpointer,ds,tracer.hresoldim,tracer.vresoldim,
# vaggreg.shape,tracer,tracer.domain)
controlvect.dx[tracer.xpointer: tracer.xpointer + tracer.dim][
ds
* tracer.hresoldim
......
......@@ -277,7 +277,8 @@ def test_integration_inversion(dummy_config_inversion, settings, pytestconfig):
if config["datavect"]["components"][
"fluxes"]["parameters"]["CH4"]["hresol"] == "hpixels":
if config["datavect"]["components"][
"fluxes"]["parameters"]["CH4"]["hcorrelations"]["sigma"] == 500:
"fluxes"]["parameters"]["CH4"][
"hcorrelations"]["sigma"] == 500:
resol = "lowcorr"
else:
resol = "highcorr"
......@@ -333,7 +334,7 @@ def test_integration_inversion(dummy_config_inversion, settings, pytestconfig):
ax0 = plt.axes([0.05, 0.05, 0.73, 0.87])
im = plt.imshow(dstd, extent=(xmin, xmax, ymin, ymax),
cmap="YlOrRd", vmin=0, vmax=0.5)
cmap="YlOrRd", vmin=0, vmax=1)
sc = plt.scatter(coords["lon"], coords["lat"], c=coords["alt"],
cmap="Blues", linewidths=1, edgecolors="k", s=600)
plt.yticks(fontsize=25)
......@@ -363,11 +364,21 @@ def test_integration_inversion(dummy_config_inversion, settings, pytestconfig):
# Plot matrix of uncertainty reduction
if hasattr(controlvect, "pa"):
bfull = controlvect.build_b(controlvect)
# bfull = controlvect.build_b(controlvect)
pa = controlvect.pa
plt.imshow((bfull - pa)[:int(controlvect.dim / 2),
:int(controlvect.dim / 2)])
plt.figure(figsize=(21, 11))
ax0 = plt.axes([0.05, 0.05, 0.73, 0.87])
im = plt.imshow(pa[:int(controlvect.dim / 2),
:int(controlvect.dim / 2)],
vmin=-0.5, vmax=0.5)
plt.xticks(fontsize=20)
plt.yticks(fontsize=20)
ax1 = plt.axes([0.74, 0.05, 0.05, 0.87])
cb1 = plt.colorbar(im, cax=ax1)
plt.yticks(fontsize=25)
plt.ylabel("Posterior uncertainties (a.u.)", fontsize=30)
current_dir = os.path.abspath(
os.path.dirname(os.path.realpath(__file__)))
......@@ -378,4 +389,3 @@ def test_integration_inversion(dummy_config_inversion, settings, pytestconfig):
plt.savefig("{}/uncertaintyreduc_matrix_{}_{}_{}.pdf"
.format(figure_dir, title, resol, nsimmax))
plt.close()
\ No newline at end of file
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