scippneutron.tof.chopper_cascade.Frame#

class scippneutron.tof.chopper_cascade.Frame(distance, subframes)[source]#

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.

subbounds()

The bounds of the individual subframes, stored as a DataGroup.

Attributes

distance

subframes

bounds()[source]#

The bounds of the frame, i.e., the global min and max time and wavelength.

Return type:

DataGroup

chop(chopper)[source]#

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.

Parameters:

chopper (Chopper) – Chopper to apply.

Returns:

Frame – Chopped frame.

propagate_to(distance)[source]#

Compute new frame by propagating to a distance.

Parameters:

distance (Variable) – New distance.

Returns:

Frame – Propagated frame.

subbounds()[source]#

The bounds of the individual subframes, stored as a DataGroup.

Return type:

DataGroup