blocks.Collimator()¶
-
class
feign.blocks.Collimator(*args, **kwargs)¶ A class used to represent a Collimator. Any gamma ray not passing through the Collimator will be rejected. Collimators have an impact only if they are attributed to Detector objects with
Detector.set_collimator(). The front and the back of the collimator cannot intersect.- Parameters
*args (str) – ID of the collimator
-
_id¶ ID of the collimator
- Type
str (optional)
-
color¶ color of the collimator in case of plotting the geometry.
- Type
str
-
set_back(back=None)¶ The function to set the back of the Collimator. Intersecting front and back is not accepted.
- Parameters
back (Segment()) – Opening of the collimator slit
-
set_color(color=None)¶ The function to set the color of the Collimator in case of plotting.
- Parameters
color (str) – color definition of Collimator in hex format.
-
set_front(front=None)¶ The function to set the front of the Collimator. Intersecting front and back is not accepted.
- Parameters
front (Segment()) – Opening of the collimator slit
Examples
>>> c1=Collimator() >>> c1.set_back(Segment(Point(0,0),Point(1,0))) >>> c1.set_front(Segment(Point(0.5,-1),Point(0.5,1))) ValueError('Collimator back and front should not intersect')