fix projection of terma profiles
"get_distance_to_surface(100)"
]
},
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "def get_off_axis_distance_at_iso(off_axis_distance, depth):\n",
+ " vertical_distance_to_source = depth + SSD\n",
+ " off_axis_distance_at_iso = 1000 / vertical_distance_to_source * off_axis_distance\n",
+ " \n",
+ " return off_axis_distance_at_iso"
+ ]
+ },
{
"cell_type": "code",
"execution_count": null,
"source": [
"def terma_profile_at_depth(x_i, depth):\n",
" terma = [\n",
- " get_scaled_spectrum_terma([depth], x_val)[0]\n",
- " for depth, x_val in zip(get_distance_to_surface(depth), x_i)\n",
+ " get_scaled_spectrum_terma([distance_to_surface], x_val)[0]\n",
+ " for distance_to_surface, x_val \n",
+ " in zip(get_distance_to_surface(depth), get_off_axis_distance_at_iso(x_i, depth))\n",
" ]\n",
" \n",
" return terma\n",
"\n",
- "x_i = np.linspace(0, 170)\n",
+ "x_i = np.linspace(0, 150)\n",
"\n",
"# Approximate half profile of TERMA at 10 cm depth\n",
"plt.plot(x_i, terma_profile_at_depth(x_i, 100))"
