Skip to content

Commit

Permalink
Update MACS_User_notebook.ipynb
Browse files Browse the repository at this point in the history
Updated wheel
  • Loading branch information
thallor1 committed Feb 4, 2025
1 parent 51d8451 commit 74e585c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions docs/source/notebooks/MACS_User_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"metadata": {},
"outputs": [],
"source": [
"#!pip install -q git+https://github.com/thallor1/pyMACS.git requests"
"!pip install -q git+https://github.com/thallor1/pyMACS.git requests"
]
},
{
Expand Down Expand Up @@ -76,14 +76,12 @@
}
],
"source": [
"#More complex example of pyMACS usage\n",
"#Set up our pyMACS object\n",
"\n",
"from pyMACS.virtualMACS import VirtualMACS\n",
"import pyMACS\n",
"import numpy as np\n",
"\n",
"\n",
"\n",
"macs_instr = VirtualMACS('resolution',cifName=None,useOld=True)\n",
"macs_instr.sample.formula_weight=432.7\n",
"macs_instr.sample.a = a\n",
Expand Down Expand Up @@ -238,7 +236,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_95747/1738536076.py:61: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown\n",
"/tmp/ipykernel_101424/1738536076.py:61: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown\n",
" fig.show()\n"
]
},
Expand Down Expand Up @@ -335,14 +333,14 @@
"outputs": [
{
"ename": "FileNotFoundError",
"evalue": "[Errno 2] No such file or directory: '/home/tjh/mambaforge/envs/mantid/lib/python3.10/site-packages/pyMACS/scripting/interp_fwhm/MACS_Ef_3p7_interp_dQx.pck'",
"evalue": "[Errno 2] No such file or directory: '/home/tjh/mambaforge/envs/mantid/lib/python3.10/site-packages/pyMACS/scripting/MACS_Ef_3p7_interp_dQx.pck'",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mFileNotFoundError\u001b[0m Traceback (most recent call last)",
"Cell \u001b[0;32mIn[8], line 6\u001b[0m\n\u001b[1;32m 4\u001b[0m omegas \u001b[38;5;241m=\u001b[39m np\u001b[38;5;241m.\u001b[39mlinspace(\u001b[38;5;241m0\u001b[39m,\u001b[38;5;241m10\u001b[39m,\u001b[38;5;241m50\u001b[39m)\n\u001b[1;32m 5\u001b[0m macs_instr\u001b[38;5;241m.\u001b[39mkidney\u001b[38;5;241m.\u001b[39mEf\u001b[38;5;241m=\u001b[39mmacsEf\n\u001b[0;32m----> 6\u001b[0m interp_dQx, interp_dQz, interp_dE \u001b[38;5;241m=\u001b[39m \u001b[43mmacs_instr\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_res_fwhm_interp_objects\u001b[49m\u001b[43m(\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 7\u001b[0m \u001b[38;5;66;03m#These interpolators require input in terms of lab fram, not H,K,L. This is done in the following way.\u001b[39;00m\n\u001b[1;32m 8\u001b[0m qx1,qz1 \u001b[38;5;241m=\u001b[39m macs_instr\u001b[38;5;241m.\u001b[39msample\u001b[38;5;241m.\u001b[39mHKL_to_QxQz(H1,K1,L1)\n",
"File \u001b[0;32m~/mambaforge/envs/mantid/lib/python3.10/site-packages/pyMACS/virtualMACS.py:1094\u001b[0m, in \u001b[0;36mVirtualMACS.load_res_fwhm_interp_objects\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 1092\u001b[0m f_dQx \u001b[38;5;241m=\u001b[39m interp_dir\u001b[38;5;241m+\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mMACS_Ef_3p7_interp_dQx.pck\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 1093\u001b[0m f_dQz \u001b[38;5;241m=\u001b[39m interp_dir\u001b[38;5;241m+\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mMACS_Ef_3p7_interp_dQz.pck\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[0;32m-> 1094\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28;43mopen\u001b[39;49m\u001b[43m(\u001b[49m\u001b[43mf_dQx\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[38;5;124;43mrb\u001b[39;49m\u001b[38;5;124;43m\"\u001b[39;49m\u001b[43m)\u001b[49m \u001b[38;5;28;01mas\u001b[39;00m input_file:\n\u001b[1;32m 1095\u001b[0m interp_dQx \u001b[38;5;241m=\u001b[39m pickle\u001b[38;5;241m.\u001b[39mload(input_file)\n\u001b[1;32m 1096\u001b[0m \u001b[38;5;28;01mwith\u001b[39;00m \u001b[38;5;28mopen\u001b[39m(f_dQz, \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mrb\u001b[39m\u001b[38;5;124m\"\u001b[39m) \u001b[38;5;28;01mas\u001b[39;00m input_file:\n",
"\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/home/tjh/mambaforge/envs/mantid/lib/python3.10/site-packages/pyMACS/scripting/interp_fwhm/MACS_Ef_3p7_interp_dQx.pck'"
"\u001b[0;31mFileNotFoundError\u001b[0m: [Errno 2] No such file or directory: '/home/tjh/mambaforge/envs/mantid/lib/python3.10/site-packages/pyMACS/scripting/MACS_Ef_3p7_interp_dQx.pck'"
]
}
],
Expand Down

0 comments on commit 74e585c

Please sign in to comment.