FinitePlane

class marxs.math.geometry.FinitePlane(kwargs={})[source] [edit on github]

Bases: Geometry

Base class for geometrically flat optical elements.

Attributes Summary

loc_coos_name

name for output columns with interaction point in local coordinates.

shape

Methods Summary

get_local_euklid_bases(interpos_local)

Obtain a local eukledian base at a set of positions.

intersect(dir, pos)

Calculate the intersection point between a ray and the element

Attributes Documentation

loc_coos_name = ['y', 'z']

name for output columns with interaction point in local coordinates.

shape = 'box'

Methods Documentation

get_local_euklid_bases(interpos_local)[source] [edit on github]

Obtain a local eukledian base at a set of positions.

Parameters:
interpos_localnumpy.ndarray of shape (N, 2)

coordinates in the coordiante system of the geometry (x, y)

Returns:
e_1, e_2, nnumpy.ndarray of shape (N, 4)

Vectors pointing in direction 1, 2, and normal to the surface.

intersect(dir, pos)[source] [edit on github]

Calculate the intersection point between a ray and the element

Parameters:
dirnumpy.ndarray of shape (N, 4)

homogeneous coordinates of the direction of the ray

posnumpy.ndarray of shape (N, 4)

homogeneous coordinates of a point on the ray

Returns:
intersectboolean array of length N

True if an intersection point is found.

interposnumpy.ndarray of shape (N, 4)

homogeneous coordinates of the intersection point. Values are set to np.nan if no intersection point is found.

interpos_localnumpy.ndarray of shape (N, 2)

y and z coordinates in the coordiante system of the active plane (not normalized to the dimensions of the element in question, but in absolute units).