raypier.core.cmaterials

class raypier.core.cmaterials.BaseDispersionCurve

Bases: object

Base class for DispersionCurve objects. This extension class provides efficient C-API methods for evaluation of the refractive index for a given wavelength, based on one of various dispersion functions (e.g. Sellmeier curves) and a set of coefficients obtained from https://refractiveindex.info

Parameters
  • formula_id (int, readonly) – Specifies the formula to use in evaluating this dispersion-curve

  • wavelength_min (float, readonly) – Minimum wavelength that can be evaluated, in microns.

  • wavelength_max (float, readonly) – Maximum wavelength that can be evaluated, in microns.

  • coefs (list[float], readonly) – an array-like list of coefficients for the particular formula used.

  • absorption (float, readonly) – The (constant) absorption coefficient used to evaluate the complex refractive index. Given in cm^-1.

evaluate_n()

Calculates the complex refractive index for the given wavelengths.

Parameters

wavelen (double[:]) – An array-like collection of wavelength, in microns.

Returns

The refractive index for the given wavelength.

Return type

complex128[:]

class raypier.core.cmaterials.CircularApertureMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

Similar to the TransparentMaterial i.e. it generates an outgoing ray with identical direction, polarisation etc. to the incoming ray. The material attenuates the E_field amplitudes according to the radial distance from the surface origin.

Parameters
  • outer_radius (double) – Rays passing outside this radius are not intercepted.

  • radius (double) – The radius of the inner hole.

  • edge_width (double) – Rays passing through the inner hole are attenuated according to their proximity to the edge. The edge-width sets the width of the error-function (errf) used to calculate the attenuation.

  • invert (int) – Inverts the aperture to make a field-stop.

  • origin ((double, double, double)) – The centre point of the aperture.

class raypier.core.cmaterials.CoatedDispersiveMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

A full implementation of the Fresnel Equations for a single-layer coated dielectric interface. The refractive index for each ray is obtained by look up of the provided dispersio-curve objects for the materials on each side of the interface.

Parameters
class raypier.core.cmaterials.DielectricMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

Simulates Fresnel reflection and refraction at a normal dielectric interface.

The surface normal is assumed to be pointing “out” of the material.

Parameters
  • n_inside (complex) – The refractive index on the inside of the material interface

  • n_outside (complex) – The refractive index on the outside of the material interface

class raypier.core.cmaterials.DiffractionGratingMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

A specialised material modelling the behaviour of a reflective diffraction grating.

Parameters
  • lines_per_mm (double) – The grating line density

  • order (int) – The order-of-diffraction

  • efficiency (double) – A value from 0.0 to 1.0 giving the reflection efficiency of the grating

  • origin ((double, double, double)) – A vector (3-tuple) indicating the origin of the grating. Unimportant in most cases. This affects the “grating phase” which is unobservable in most situations.

class raypier.core.cmaterials.FullDielectricMaterial

Bases: raypier.core.cmaterials.DielectricMaterial

Model for dielectric using full Fresnel equations to give true phase and amplitude response

Parameters
  • reflection_threshold (double) – Sets the amplitude threshold for generating a reflected ray.

  • transmission_threshold (double) – Sets the amplitude threshold for generating a transmitted ray.

class raypier.core.cmaterials.LinearPolarisingMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

Simulates a perfect polarising beam splitter. P-polarisation is 100% transmitted while S- is reflected

class raypier.core.cmaterials.OpaqueMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

A perfect absorber i.e. it generates no rays

class raypier.core.cmaterials.PECMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

Simulates a Perfect Electrical Conductor. I.e. incident rays are reflected with 100% reflectivity.

class raypier.core.cmaterials.PartiallyReflectiveMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

A simple materials with a fixed reflectivity.

Parameters

reflectivity (double) – The material power-reflectivity given as a value from 0.0. to 1.0

class raypier.core.cmaterials.RectangularApertureMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

A rectangular aperture.

Parameters
  • outer_width (double) –

  • outer_height (double) –

  • width (double) –

  • height (double) –

  • edge_width (double) –

  • invert (int) –

  • origin ((double, double, double)) –

class raypier.core.cmaterials.ResampleGaussletMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

This is a special pseudo-material which generates new rays not by the normal process of refraction or reflection of an incoming ray, but by computing a new set of Gausslets by computing the E-field at a set of grid points and launching new Gausslets from these points.

The material needs the set of new launch-positions to be given up front (i.e. before tracing).

Parameters
  • size (int) – The size of the new GaussletCollection to allocate up front.

  • eval_func (callable) – A callable taking a GaussletCollection as its single argument. The new outgoing rays will be returned by this callable.

class raypier.core.cmaterials.SingleLayerCoatedMaterial

Bases: raypier.core.cmaterials.FullDielectricMaterial

A material with a single-layer dielectric coating at the interface.

Parameters
  • n_coating (complex) – The complex refractive index for the coating.

  • thickness (double) – The thickness of the coating in microns

class raypier.core.cmaterials.TransparentMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

A perfect transmitter i.e. it generates an outgoing ray with identical direction, polarisation etc. to the incoming ray. It does project the polarisation vectors to it’s S- and P-directions, however.

class raypier.core.cmaterials.WaveplateMaterial

Bases: raypier.core.ctracer.InterfaceMaterial

An idealised optical retarder.

Parameters
  • retardance (double) – The optical retardance, given in terms of numbers-of-wavelengths.

  • fast_axis ((double, double, double)) – A vector giving the “fast” polarisation axis

apply_retardance()

Applies the retardance to the given Ray object.

Parameters

r (raypier.core.ctracer.Ray) – an input Ray object.

Returns

a new Ray instance

Return type

raypier.core.ctracer.Ray