scippneutron.absorption.types.SampleShape#

class scippneutron.absorption.types.SampleShape[source]#
__init__()#

Methods

__init__()

beam_intersection(start_point, direction)

Computes the length of the intersection between the shape and the beam starting at start_point and travelling in the direction direction.

quadrature(kind)

Returns quadrature points and weights for evaluating integrals over the shape.

Attributes

volume

Volume of the shape

abstract beam_intersection(start_point, direction)[source]#

Computes the length of the intersection between the shape and the beam starting at start_point and travelling in the direction direction.

Return type:

Variable

abstract quadrature(kind)[source]#

Returns quadrature points and weights for evaluating integrals over the shape. The method returns a tuple where the first entry is an array containing vectors representing points in the shape and the second entry is an array containing the weights associated with the points.

Parameters:

kind (Any) – if the shape supports different kinds of quadratures this argument denotes which one to use

Return type:

tuple[Variable, Variable]

abstract property volume: Variable#

Volume of the shape