further exp on gamma
"import matplotlib.pyplot as plt\n",
"\n",
"from pymedphys.dcm import coords_and_dose_from_dcm\n",
- "from pymedphys.gamma import gamma_dcm"
+ "from pymedphys.gamma import gamma_dcm, gamma_shell"
]
},
{
"outputs": [],
"source": [
"gamma_options = {\n",
- " 'dcm_ref_filepath': \"../../../../Documents/RD.Ecl_WOmask.dcm\",\n",
- " 'dcm_eval_filepath': \"../../../../Documents/RD.Pin.dcm\",\n",
+ " 'dcm_ref_filepath': \"../../../../Downloads/RD.Ecl_WOmask.dcm\",\n",
+ " 'dcm_eval_filepath': \"../../../../Downloads/RD.Pin.dcm\",\n",
" 'dose_percent_threshold': 3,\n",
" 'distance_mm_threshold': 3,\n",
" 'interp_fraction': 5,\n",
"gamma_shell_method = gamma_dcm(**gamma_options)"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "valid_gamma = gamma_shell_method[np.invert(np.isnan(gamma_shell_method))]\n",
+ "\n",
+ "# shell_pass = valid_gamma < 1\n",
+ "\n",
+ "100*np.sum(valid_gamma <= 1) / len(valid_gamma)"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
"\n"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "[len(coord) for coord in coords_evaluation]"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "coords_reference"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "coords_evaluation"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
"lower_dose_cutoff"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "distance_step_size = distance_mm_threshold / 5\n",
+ "\n",
+ "aligned_gamma = gamma_shell(coords_reference, dose_reference,\n",
+ " coords_reference, dose_evaluation,\n",
+ " distance_mm_threshold, dose_threshold,\n",
+ " lower_dose_cutoff=lower_dose_cutoff, distance_step_size=distance_step_size)"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
- "version": "3.6.6"
+ "version": "3.7.0"
}
},
"nbformat": 4,
