notebook demonstrating the leaf pairs
{
"cells": [
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
- "delivery = pymedphys.Delivery.from_logfile(filepath)"
+ "delivery = pymedphys.Delivery.from_logfile(filepath)\n",
+ "delivery = delivery._filter_cps()"
]
},
{
"metadata": {},
"outputs": [],
"source": [
+ "plt.figure(figsize=(10,10))\n",
"pymedphys.mudensity.display(GRID, mudensity)"
]
},
"execution_count": null,
"metadata": {},
"outputs": [],
- "source": []
+ "source": [
+ "jaw = np.array(delivery.jaw)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "mu = np.array(delivery.mu)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "mlc = np.array(delivery.mlc)\n",
+ "np.shape(mlc)"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "for i in range(40,80):\n",
+ " plt.figure()\n",
+ " plt.plot(mu, -mlc[:, i, 0])\n",
+ " plt.plot(mu, mlc[:, i, 1])\n",
+ " plt.title(f\"Leaf pair {i+1}\")\n",
+ " plt.xlabel('Cumulative MU')\n",
+ " plt.ylabel('MLC position according to trf logfile (mm)')\n",
+ " plt.show()"
+ ]
}
],
"metadata": {
