Skip to content

Commit e346efe

Browse files
committed
Fix bugs:
1. Visualization.py: dose > 0 criteria removed for visualization 2. influence_matrix.py: Downsampling beamlets when removing corner beamlets
1 parent a7ffa7c commit e346efe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

portpy/photon/influence_matrix.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,9 @@ def preprocess_beams(self, structure='PTV', remove_corner_beamlets=False, is_bev
526526
sampled_beamlets = down_sample_2d_grid[a]
527527
b = [np.where(sampled_beamlets == down_sample_beamlets[i]) for i in range(len(down_sample_beamlets))]
528528
opt_beamlets = [actual_beamlets[i] for i in b]
529-
orig_beamlets = beam_2d_grid[a]
530-
opt_orig_beamlets = np.stack([orig_beamlets[i] for i in b])
529+
if remove_corner_beamlets:
530+
orig_beamlets = beam_2d_grid[a]
531+
opt_orig_beamlets = np.stack([orig_beamlets[i] for i in b])
531532
beam_map = down_sample_2d_grid
532533
else:
533534
opt_beamlets = np.unique(np.sort(beam_map[beam_map >= 0]))

0 commit comments

Comments
 (0)