09: Add argparse interface

This commit is contained in:
2022-11-17 12:07:32 +01:00
parent 46c794c1cb
commit b8235bce5b
2 changed files with 79 additions and 19 deletions

View File

@ -231,6 +231,33 @@
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e506d9a5",
"metadata": {},
"outputs": [],
"source": [
"import h5py\n",
"import numpy as np\n",
"from matplotlib import pyplot as plt\n",
"\n",
"# Load data\n",
"output_filename = \"preliminary_simulation.h5\"\n",
"with h5py.File(output_filename,'r') as f:\n",
" handler = f[\"mean-magn\"]\n",
" mean_magn = np.array(handler)\n",
" kappas = handler.attrs[\"kappas\"]\n",
"\n",
"# Plotterdeplotterdeplot\n",
"plt.figure()\n",
"plt.errorbar(kappas,[m[0] for m in mean_magn],yerr=[m[1] for m in mean_magn],fmt='-o')\n",
"plt.xlabel(r\"$\\kappa$\")\n",
"plt.ylabel(r\"$|m|$\")\n",
"plt.title(r\"Absolute field average on $3^4$ lattice, $\\lambda = 1.5$\")\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "d4640925",