Detector¶
Generic detector being the base class of all detectors. |
|
|
|
|
|
1D Tube detector used at PSI. |
|
|
|
|
|
Return pixel positions relative to center. |
Detector Object and Methods¶
- class Detector.Detector(position, direction)[source]¶
Generic detector being the base class of all detectors.
- Parameters
Position (-) – Position of object (default [0,0,0])
Direction (-) – Direction along which the object points (default [0,0,1])
- Raises
- NotImplementedError –
- __init__(position, direction)[source]¶
- Parameters
Position (-) – Position of object (default [0,0,0])
Direction (-) – Direction along which the object points (default [0,0,1])
- Raises
- NotImplementedError –
- plot(ax, offset=(0.0, 0.0, 0.0))[source]¶
- Parameters
ax (-) – Axis object into which the detector is plotted
Kwargs:
offset (3vector): Offset of detector due to bank position (default [0,0,0])
>>> GenericDetector = Detector(position=(0.0,1.0,0.0),direction=(1.0,0,0)) >>> GenericDetector.plot(ax) Plots detector tube in provided axis object.
TubeDetector1D Object and Methods¶
- class Detector.TubeDetector1D(position, direction, length=0.25, pixels=1024, diameter=0.02, split=[])[source]¶
1D Tube detector used at PSI. The detector is assumed to be a perfect cylinder consisting of pixels.
- Parameters
Position (-) – Position of object (default [0,0,0])
Direction (-) – Direction along which the object points (default [0,0,1])
Kwargs:
length (float): Length of detector tube in meters (default 0.25)
pixels (int): Number of pixels (default 1024)
diameter (float): Diameter of tube in meters (default 0.02)
split (list int): Edge pixels for slitting the tube into areas lid by analysers (default [0,57,57*2,57*3,57*4,57*5,57*6,57*7,57*8])
split (list int): Edge pixels for slitting the tube into areas lid by analysers (default [0,57,57*2,57*3,57*4,57*5,57*6,57*7,57*8])
- Raises
- AttributeError –
- __init__(position, direction, length=0.25, pixels=1024, diameter=0.02, split=[])[source]¶
- Parameters
Position (-) – Position of object (default [0,0,0])
Direction (-) – Direction along which the object points (default [0,0,1])
Kwargs:
length (float): Length of detector tube in meters (default 0.25)
pixels (int): Number of pixels (default 1024)
diameter (float): Diameter of tube in meters (default 0.02)
split (list int): Edge pixels for slitting the tube into areas lid by analysers (default [0,57,57*2,57*3,57*4,57*5,57*6,57*7,57*8])
split (list int): Edge pixels for slitting the tube into areas lid by analysers (default [0,57,57*2,57*3,57*4,57*5,57*6,57*7,57*8])
- Raises
- AttributeError –
- plot(ax, offset=(0.0, 0.0, 0.0), n=100)[source]¶
- Parameters
ax (-) – Axis object into which the detector is plotted
Kwargs:
offset (3vector): Offset of detector due to bank position (default [0,0,0])
n (int): Number of points on the surface to be plotted (default 100)
>>> Detector = TubeDetector1D(position=(0.0,1.0,0.0),direction=(1.0,0,0)) >>> Detector.plot(ax,offset=(0.0,0.0,0.0),n=100) Plots detector tube in provided axis object.