integration_tools.solidangle_rectangle_ana_numba

integration_tools.solidangle_rectangle_ana_numba

Compute the solid angle subtended by a rectangle of length a and b as seen by an observer located at (xp,yp,zp). Assume that the center of the rectangle is located at the origin and that the rectangle lie in the (xOy) plane.

The surface integral is computed analytically.

..warning: Some debugging in coordination with AlG reveal some round off numerical error performed during the JIT compilation step. Hence the pure python implementation in solidangle_rectangle_ana.

Parameters:
  • a (float>0) – rectangle side length
  • b (float>0) – rectangle side length (the other one)
  • xp (float) – observer position along x axis
  • yp (float) – observer position along y axis
  • zp (float) – observer position along z axis
Returns:

solid angle real value

Return type:

float>0