Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- `cilacc` path lookup no longer broken for editable installations (#2257)
- update `version.py` to use `importlib` & fix tagless installation #2255 (#2269)
- Fixed behaviour of `ZeissDataReader` when negative values are passed in the ROI (#2244)
- Fix `Parallel2D` `system_description` raising exception for near-zero vectors (#2316)
- Fix `show2D` truncating plots when count is not a multiple of `num_cols` (#2315)
- Dependencies:
- olefile and dxchange are optional dependencies, instead of required (#2209)
Expand Down
25 changes: 9 additions & 16 deletions Wrappers/Python/cil/framework/acquisition_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,24 +448,17 @@ def system_description(self):
\nReturns `advanced` if the the geometry has rotated or tilted rotation axis or detector, can also have offsets
'''

if not ComponentDescription.test_parallel(self.ray.direction, self.detector.normal):
return SystemConfiguration.SYSTEM_ADVANCED

vec = ComponentDescription.create_vector(self.detector.position - self.rotation_axis.position)
dot_product = vec.dot(vec)

rays_perpendicular_detector = ComponentDescription.test_parallel(self.ray.direction, self.detector.normal)

#rotation axis position + ray direction hits detector position
if numpy.allclose(self.rotation_axis.position, self.detector.position): #points are equal so on ray path
rotation_axis_centred = True
else:
vec_a = ComponentDescription.create_unit_vector(self.detector.position - self.rotation_axis.position)
rotation_axis_centred = ComponentDescription.test_parallel(self.ray.direction, vec_a)

if not rays_perpendicular_detector:
config = SystemConfiguration.SYSTEM_ADVANCED
elif not rotation_axis_centred:
config = SystemConfiguration.SYSTEM_OFFSET
if abs(dot_product) < 1e-8:
return SystemConfiguration.SYSTEM_SIMPLE

else:
config = SystemConfiguration.SYSTEM_SIMPLE

return config
return SystemConfiguration.SYSTEM_OFFSET


def rotation_axis_on_detector(self):
Expand Down
Loading