Detector.surface_normal

Detector.surface_normal(param)[source]

Unit vector perpendicular to the detector surface at param.

The orientation is chosen as follows:

  • In 2D, the system (normal, tangent) should be right-handed.

  • In 3D, the system (tangent[0], tangent[1], normal) should be right-handed.

Here, tangent is the return value of surface_deriv at param.

Parameters:
paramarray-like or sequence

Parameter value(s) at which to evaluate. If ndim >= 2, a sequence of length ndim must be provided.

Returns:
normalnumpy.ndarray

Unit vector(s) perpendicular to the detector surface at param. If param is a single parameter, an array of shape (space_ndim,) representing a single vector is returned. Otherwise the shape of the returned array is

  • param.shape + (space_ndim,) if ndim is 1,

  • param.shape[:-1] + (space_ndim,) otherwise.