Skip to content

Commit f4d4e53

Browse files
author
Jevgenija Rudzusika
committed
pep fixed
1 parent 5b74fc7 commit f4d4e53

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

odl/tomo/geometry/conebeam.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -486,11 +486,13 @@ def src_position(self, angle, flying_focal_spot=(0, 0)):
486486
+ np.multiply.outer(flying_focal_spot[:, 1], tangent))
487487
center_to_src_init = center_to_src_init + ffs_shift
488488
# broadcasting to perform matrix multiplication "manually",
489-
# since existing numpy functions do cross product along the outer dimensions,
490-
# which we don't need here
491-
center_to_src_init = np.repeat(center_to_src_init, 2, axis=-2).reshape(-1, 2, 2)
489+
# since existing numpy functions do cross product along the outer
490+
# dimensions, which we don't need here
491+
center_to_src_init = np.repeat(center_to_src_init, 2,
492+
axis=-2).reshape(-1, 2, 2)
492493
pos_vec = (self.translation[None, :]
493-
+ np.sum(self.rotation_matrix(angle) * center_to_src_init, axis=-1))
494+
+ np.sum(self.rotation_matrix(angle) * center_to_src_init,
495+
axis=-1))
494496
if squeeze_out:
495497
pos_vec = pos_vec.squeeze()
496498

@@ -1347,9 +1349,10 @@ def src_position(self, angle, flying_focal_spot=(0, 0, 0)):
13471349
+ np.multiply.outer(flying_focal_spot[:, 1], tangent))
13481350
center_to_src_init = center_to_src_init + ffs_shift
13491351
# broadcasting to perform matrix multiplication "manually",
1350-
# since existing numpy functions do cross product along the outer dimensions,
1351-
# which we don't need here
1352-
center_to_src_init = np.repeat(center_to_src_init, 3, axis=-2).reshape(-1, 3, 3)
1352+
# since existing numpy functions do cross product along the outer
1353+
# dimensions, which we don't need here
1354+
center_to_src_init = np.repeat(center_to_src_init, 3,
1355+
axis=-2).reshape(-1, 3, 3)
13531356
# `circle_component` has shape (a, ndim)
13541357
circle_component = np.sum(rot_matrix * center_to_src_init, axis=-1)
13551358

0 commit comments

Comments
 (0)