Skip to content

Commit

Permalink
set correct size for zero acceptance in grid and vector configuration (
Browse files Browse the repository at this point in the history
  • Loading branch information
swhite2401 authored Dec 4, 2023
1 parent d95aa5c commit 2f72fc2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyat/at/acceptance/boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,11 @@ def radial_boundary(mask, grid):
msg = ("No particle survived, please check your grid "
"or lattice. Acceptance set to [0.0, 0.0].")
warnings.warn(AtWarning(msg))
return numpy.zeros((2, 1))
cnt = numpy.flip(config.shape)
if len(cnt) == 1:
return numpy.zeros(2)
else:
return numpy.zeros((2, 1))

if config.mode is GridMode.RADIAL:
return radial_boundary(mask, grid)
Expand Down

0 comments on commit 2f72fc2

Please sign in to comment.