# ultrafast.core module¶

This module contains the core functionality required for performing ultrafast optics calculations. It currently focusses on providing classes for describing materials commonly employed in ultrafast optics.

class ultrafast.core.Material(n, range_, name=None, references=None, comments=None)[source]

Bases: object

Parameters: n (callable) – Dispersion function range (tuple) – Valid range for dispersion function (low,high) name (string) – Material name references (string) – Reference(s) for material properties comments (string) – Comments

Base class describing a (dispersive) material utilized in ultrafast optics.

The dispersion function n is a callable which takes one argument, the angular frequency in $$rad/fs$$, and returns the refractive index at this angular frequency.

The frequency range range_ is a tuple of length 2 describing the lower and upper angular frequencies for which n is valid.

name = None

Name of the material. This can be used for reference, e.g. in case the instance name is not related to the material

references = None

Reference(s) for material properties, e.g. journal articles

comments = None
range_

Range of angular frequencies ($$rad/fs$$) over which dispersion function n is valid. A numeric tuple of the form (low,high).

n

A callable which takes one argument, the angular frequency in $$rad/fs$$, and returns the refractive index at this angular frequency.

wavevector(omega)[source]
Parameters: omega (float) – Angular frequency in $$rad / fs$$

Returns the effective wavevector ($$\omega n / c$$) at the angular frequency omega

brewster(omega, inc_mat=None)[source]
Parameters: omega (float) – Angular frequency in $$rad / fs$$ inc_mat (ultrafast.core.Material) – Incident material

Returns the Brewster angle for light rays incident from the material inc_mat. If None, inc_mat is assumed to be air.

class ultrafast.core.RIIDMaterial(db)[source]
Parameters: db (string) – Database entry

Class describing a dispersive material catalogued in the RefractiveIndex.info database.

An instance is built from the RefractiveIndex.info database entry db. Entries are stored as YAML files. As such, db may be a path to a local YAML file, or a URL to a remote YAML file accessible via HTTP.

type_ = None

String describing the dispersion data type as defined in the RefractiveIndex.info database, e.g.: formula 1, tabulated k, etc

exception ultrafast.core.UltrafastError[source]

Bases: Exception

Ultrafast module base exception class

exception ultrafast.core.RangeError(value, valid, message)[source]
Parameters: value (float, int) – Invalid value valid (tuple) – Valid range message (string) – Error message

Raised when the numeric value value is found to be out of the valid range defined by valid. valid is a tuple of length 2 in the form of (low,high).

exception ultrafast.core.PropertySetError(property_, message)[source]
Parameters: property (string) – Property attribute message (string) – Error message

Raised when a attempting to set the property attribute property_ to an invalid value.

ultrafast.core.frequency(lambda_)[source]
Parameters: lambda (float) – Wavelength in $$\mu m$$

Wavelength to angular frequency conversion.

Returns the corresponding angular frequency in $$rad / fs$$

ultrafast.core.wavelength(omega)[source]
Parameters: omega (float) – Angular frequency in $$rad / fs$$

Angular frequency to wavelength conversion.

Returns the corresponding wavelength in $$\mu m$$

ultrafast.core.c = 0.29979245800000004

Speed of light in $$\mu m / fs$$. Defined for convenience

ultrafast.core.air = <ultrafast.core.RIIDMaterial object>

ultrafast.core.RIIDMaterial describing air (Ciddor 1996). Defined for convenience