Skip to content

Commit

Permalink
fix: Save processed cornerflow output before plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
adigitoleo committed Feb 19, 2024
1 parent 03f0631 commit a995ed0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/test_corner_flow_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,31 @@ def test_prescribed(self, outdir, seed, ncpus):
directions.append(bingham_vectors)

if outdir is not None:
np.savez(
f"{out_basepath}_path.npz",
strains_1=path_strains[0],
strains_2=path_strains[1],
strains_3=path_strains[2],
strains_4=path_strains[3],
paths_1=np.asarray(paths[0]),
paths_2=np.asarray(paths[1]),
paths_3=np.asarray(paths[2]),
paths_4=np.asarray(paths[3]),
)
np.savez(
f"{out_basepath}_strength.npz",
strength_1=indices[0],
strength_2=indices[1],
strength_3=indices[2],
strength_4=indices[3],
)
np.savez(
f"{out_basepath}_angles.npz",
angles_1=angles[0],
angles_2=angles[1],
angles_3=angles[2],
angles_4=angles[3],
)
markers = ("s", "o", "v", "*")
cmaps = ["cmc.batlow_r"] * len(markers)
fig_domain = _vis.figure(figsize=(10, 3))
Expand Down

0 comments on commit a995ed0

Please sign in to comment.