scippneutron.tof.chopper_cascade.Frame#
- class scippneutron.tof.chopper_cascade.Frame(distance, subframes)#
A frame of neutrons, created from a single neutron pulse, potentially chopped into subframes by choppers.
- __init__(distance, subframes)#
Methods
__init__
(distance, subframes)bounds
()The bounds of the frame, i.e., the global min and max time and wavelength.
chop
(chopper)Compute a new frame by applying a chopper.
propagate_to
(distance)Compute new frame by propagating to a distance.
The bounds of the subframes, defined as the union over subframes.
Attributes
distance
subframes
- bounds()#
The bounds of the frame, i.e., the global min and max time and wavelength.
- Return type:
- chop(chopper)#
Compute a new frame by applying a chopper.
A frame is a polygon in time and wavelength. Its initial shape is distorted by propagation to the chopper. The chopper then cuts off the parts of the frame that is outside of the chopper opening. Here we apply and algorithm that computes a new polygon that is the intersection of the frame and the chopper opening.
In practice a chopper may have multiple openings, so a frame may be chopped into a number of subframes.
- propagate_to(distance)#
Compute new frame by propagating to a distance.
- subbounds()#
The bounds of the subframes, defined as the union over subframes.
This is not the same as the bounds of the individual subframes, but defined as the union of all subframes. Subframes that overlap in time are “merged” into a single subframe.
This function is to some extent experimental: It is not clear if taking the union of overlapping subframes has any utility in practice, since this may simply indicate a problem with the chopper cascade. Attempts to handle this automatically may be misguided.
- Return type: