Howdy,
I was wondering is there a way to compare two trajectory files.
My plan is to read two trajectory files and compare actual fluences using average gamma, histogram and map.
I tried the following and I see some results and no errors.
`
`
tlog_1 = TrajectoryLog(path_to_file_1)
tlog_2 = TrajectoryLog(path_to_file_2)
fluence_1 = tlog_1.fluence.actual.array
fluence_2 = tlog_2.fluence.actual.array
img_1 = image.load(tlog_1.fluence.actual.calc_map(), dpi=25.4 / 0.1)
img_2 = image.load(tlog_2.fluence.actual.calc_map(), dpi=25.4 / 0.1)
gamma_map = imag_1.gamma(img_2, doseTA=0.1, distTA=0.1, threshold=0.1)
avg_gamma = np.nanmean(gamma_map)
if np.isnan(avg_gamma):
avg_gamma = 0
pixels_passing = np.sum(gamma_map[~np.isnan(gamma_map)] < 1)
all_calcd_pixels = np.sum(gamma_map[~np.isnan(gamma_map)] >= 0)
pass_prcnt = pixels_passing / all_calcd_pixels * 100
gamma_map = np.nan_to_num(gamma_map)
passfail_array = gamma_map >= 1
print(avg_gamma)
plt.imshow(gamma_map, aspect=‘auto’, vmax=1, cmap=get_array_cmap())
plt.colorbar()
plt.show()
`
`
Any suggestions/advise would be appreciated.
Thanks !