raypier.core.ctracer¶
Contains the core data-structures used in the tracing operation.
- class raypier.core.ctracer.Distortion¶
Bases:
object
A abstract base class to represents distortions on a face, a z-offset as a function of (x,y).
- class raypier.core.ctracer.FaceList¶
Bases:
object
A group of faces which share a transform
- sync_transforms()¶
sets the transforms from the owner’s VTKTransform
- class raypier.core.ctracer.GaussletBaseRayView¶
Bases:
raypier.core.ctracer.RayArrayView
- get_ray_list()¶
Returns the contents of this RayCollection as a list of Rays
- class raypier.core.ctracer.GaussletCollection¶
Bases:
object
A list-like collection of ray_t objects.
The RayCollection is the primary data-structure used in the ray-tracing operation.
The RayCollection is of variable length, in that it can grow as individual rays are added to it. Internally, the memory allocated to the array of ray_t structures is re-allocated to increase its capacity.
- add_gausslet()¶
Adds the given Ray instance to this collection
- add_gausslet_list()¶
Adds the given list of Rays to this collection
- clear_ray_list()¶
Empties this RayCollection (by setting the count to zero)
- config_parabasal_rays()¶
Initialise the parabasal rays for a symmetric (i.e. circular) modes, using the base_ray data for wavelength, and the given beam waist 1/e^2 radius. ‘working_dist’ indicates the distance from the base_ray origin to the centre of the gaussian beam waist. Negative values imply a beam waist before the origin. ‘radius’ is given in mm.
- copy_as_array()¶
Returns the contents of this RayCollection as a numpy array (the data is always copied).
- from_array()¶
Creates a new RayCollection from the given numpy array. The array dtype should be a ctracer.ray_dtype. The data is copied into the RayCollection
- get_gausslet_list()¶
Returns the contents of this RayCollection as a list of Rays
- project_to_plane()¶
Project the rays in the collection onto the intersection with the given plane, defined by an origin point on the plane and the plane normal vector.
- reset_length()¶
Sets the length of all rays in this RayCollection to Infinity
- class raypier.core.ctracer.InterfaceMaterial¶
Bases:
object
Abstract base class for objects describing the materials characterics of a Face
- class raypier.core.ctracer.Ray¶
Bases:
object
Ray - a wrapper around the ray_t C-structure.
The Ray extension class exists mainly as a convenience for manipulation of single or small numbers of rays from python. Large numbers of rays are more efficiently handled as either RayCollection objects, created in the tracing process, or as numpy arrays with the ‘ray_dtype’ dtype.
- E1_amp¶
Complex amplitude of the electric field polarised parallel to the E_vection.
- E2_amp¶
Complex amplitude of the electric field polarised perpendicular to the E_vection
- E_vector¶
Unit vector, perpendicular to the ray direction, which gives the direction of E-field polarisation
- accumulated_path¶
The total optical path up to the start-point of this ray.
- amplitude¶
E field amplitude
- direction¶
direction of the ray, normalised to a unit vector
- ellipticity¶
Provide the ratio of power in the RH circular polarisation to the LH circular polarisation. A value of zero indicates linear polarisation. +1 indicate RH polarisation, -1 is LH polarisation. Or maybe the other way round.
- end_face_idx¶
Index of the terminating face, in the global face list (created for each tracing operation)
- jones_vector¶
Jones polarisation vector expressed as a tuple (alpha, beta) where alpha and beta are complex
- length¶
The length of the ray. This is infinite in unterminated rays
- major_minor_axes¶
Find the vector giving the major and minor axes of the polarisation ellipse. For fully circularly polarised light, the current E_vector will be returned
- normal¶
normal vector for the face which created this ray
- origin¶
Origin coordinates of the ray
- parent_idx¶
Index of the parent ray in parent RayCollection
- phase¶
An additional phase-factor for the ray. At present, this handles the ‘grating phase’ factor generated by diffraction gratings. All other material surfaces leave this unchanged
- power¶
Optical power for the ray
- project_E()¶
Rotate the E_vector onto the given axis, projecting E1_amp and E2_amp as necessary.
- ray_type_id¶
Used to distinguish rays created by reflection vs transmission or some other mechanism. Transmission->0, Reflection->1
- refractive_index¶
complex refractive index through which this ray is propagating
- termination¶
the end-point of the ray (read only)
- wavelength_idx¶
The wavelength of the ray in vacuum, in microns
- class raypier.core.ctracer.RayArrayView¶
Bases:
object
An abstract class to provide the API for ray_t member access from python / numpy
- get_ray_list()¶
Returns the contents of this RayCollection as a list of Rays
- class raypier.core.ctracer.RayCollection¶
Bases:
raypier.core.ctracer.RayArrayView
A list-like collection of ray_t objects.
The RayCollection is the primary data-structure used in the ray-tracing operation.
The RayCollection is of variable length, in that it can grow as individual rays are added to it. Internally, the memory allocated to the array of ray_t structures is re-allocated to increase its capacity.
- add_ray()¶
Adds the given Ray instance to this collection
- add_ray_list()¶
Adds the given list of Rays to this collection
- clear_ray_list()¶
Empties this RayCollection (by setting the count to zero)
- copy_as_array()¶
Returns the contents of this RayCollection as a numpy array (the data is always copied).
- from_array()¶
Creates a new RayCollection from the given numpy array. The array dtype should be a ctracer.ray_dtype. The data is copied into the RayCollection
- get_ray_list()¶
Returns the contents of this RayCollection as a list of Rays
- reset_length()¶
Sets the length of all rays in this RayCollection to Infinity