optics Package

cavity Module

cavity.py - A Cavity class and related functions for representing a Fabry-Perot cavity

class gtrace.optics.cavity.Cavity(r1=0.9, r2=0.99, L=1.0, R1=-1.5, R2=1.5, wl=1.064e-06, power=False)[source]

Bases: traits.has_traits.HasTraits

A class to represent a Fabry-Perot cavity.

Attributes

r1: Input mirror reflectivity (amplitude)

r2: End mirror reflectivity (amplitude)

rp1: Input mirror reflectivity (power)

rp2: End mirror reflectivity (power)

L: Length

R1: ROC of the input mirror (positive when concave to incident light, i.e.
convex seen from inside the cavity)
R2: ROC of the end mirror (positive when concave to incident light, i.e.
concave seen from inside the cavity)

wl: Wavelength

FSR()[source]

Returns the free spectral range of the cavity.

Nbounce()[source]

Bounce number

finesse()[source]

Returns the finesse of the cavity.

intra(f=0, d=0)[source]

Returns the intra cavity field amplitude. It assumes the cavity was locked to the incident light first. Then computes the intra-cavity field amplitude for the light with a frequency shift f from the original light with the cavity length changed by d from the initial state.

== Input arguments ==

f: Frequency shift of the light in Hz.

d: Cavity length detuning in m.

== Returned parameter ==

The intra-cavity field amplitude at the input mirror surface (a complex number).

modeSpacing()[source]

Return the transverse mode spacing of the cavity (commonly called gamma). It is a fractional number defined by gamma = (mode spacing frequency)/FSR.

pole()[source]

Cavity pole frequency [Hz]

powerGain()[source]

Ratio of the intra-cavity power to the input power.

refl(f=0, d=0)[source]

Returns the amplitude reflectivity of the cavity. It assumes the cavity was locked to the incident light first. Then computes the amplitude reflectivity for the light with a frequency shift f from the original light with the cavity length changed by d from the initial state.

== Input arguments ==

f: Frequency shift of the light in Hz.

d: Cavity length detuning in m.

== Returned parameter ==

The amplitude reflectivity of the cavity (a complex number).

spotSize()[source]

Returns the beam spot sizes on the input and end mirrors as a tuple (w1,w2).

storageTime()[source]

Storage time

trans(f=0, d=0)[source]

Returns the amplitude transmissivity of the cavity. It assumes the cavity was locked to the incident light first. Then computes the amplitude transmissivity for the light with a frequency shift f from the original light with the cavity length changed by d from the initial state.

== Input arguments ==

f: Frequency shift of the light in Hz.

d: Cavity length detuning in m.

== Returned parameter ==

The amplitude transmissivity of the cavity (a complex number).

waist(size=False)[source]

Return the q-parameter or the radius of the beam at the cavity waist.

Input arguments

size: (optional) if set to true, the first element of the returned tuple will be the waist size, rather than the q-parameter.

==Returned parameters ==

(q0, d): This function returns a tuple with two elements.
The first element is the q-parameter of the cavity mode at the cavity waist. If size=True is given, it becomes the waist size (1/e^2 radius). The second element is the distance of the cavity waist from the input mirror.
gtrace.optics.cavity.finesse(r1, r2, power=False)[source]

Returns the finesse of a cavity

consts Module

gtrace.optics.consts.n_fused_silica(wl)[source]

Calculate the index of refraction of fused silica for a given wavelength.

gtrace.optics.consts.n_sapphire_extraordinary(wl)[source]

Calculate the index of refraction of Sapphire extraordinary axis for a given wavelength.

gtrace.optics.consts.n_sapphire_ordinary(wl)[source]

Calculate the index of refraction of Sapphire ordinary axis for a given wavelength.

gtrace.optics.consts.sellmeier(wl, B1, B2, B3, C1, C2, C3)[source]

Calculate index of refraction using Sellmeiers equation

n^2 = 1+B1*wl^2/(wl^2 - C1) + B2*wl^2/(wl^2 - C2) + B3*wl^2/(wl^2 - C3)

See below for the coefficients for specific materials. http://www.cvimellesgriot.com/products/Documents/Catalog/Dispersion_Equations.pdf

gaussian Module

gaussian - Gaussian Optics Module

This module contains several utility functions for gaussian optics.

gtrace.optics.gaussian.ROCandWtoQ(ROC=1.0, w=1.0, wl=1.064e-06)[source]
gtrace.optics.gaussian.Rw2q(ROC=1.0, w=1.0, wl=1.064e-06)[source]

Get the q-parameter from the ROC and w.

gtrace.optics.gaussian.appertureCut(r=1.0, w=3.0)[source]
gtrace.optics.gaussian.beamClip(a=1.0, w=3.0)[source]
gtrace.optics.gaussian.modeMatching(q1, q2x, q2y=False)[source]

Mode matching between two beams with different q-parameters. The axes of the two beams are assumed to be matched.

q1: q-parameter of the first beam. This beam is assumed to be circular.

q2x: q-parameter of the second beam in x-direction. If the second beam
is also circular, omit the next argument.
q2y: q-parameter of the second beam in y-direction. Specify this parameter
if the second beam is eliptic.
gtrace.optics.gaussian.modeSpacing(g1, g2)[source]
gtrace.optics.gaussian.optimalMatching(q1, q2)[source]

Returns a mode (q-parameter) which best matches the given two q-parameters, q1 and q2.

Returned values: (q, match)

q: The best matching q-parameter

match: Mode matching rate

gtrace.optics.gaussian.q2R(q)[source]

Convert a q-parameter to the ROC

gtrace.optics.gaussian.q2w(q, wl=1.064e-06)[source]

Convert a q-parameter to the beam size

gtrace.optics.gaussian.q2zr(q)[source]

Convert a q-parameter to Rayleigh range.

gtrace.optics.gaussian.qToROC(q)[source]
gtrace.optics.gaussian.qToRadius(q, wl=1.064e-06)[source]
gtrace.optics.gaussian.w02zr(w0, wl=1.064e-06)[source]

Convert Rayleigh range to the waist size

gtrace.optics.gaussian.zr2w0(zr, wl=1.064e-06)[source]

Convert Rayleigh range to the waist size

geometric Module

gtrace.optics.geometric.deflection_angle(theta, n1, n2, deg=True)[source]
gtrace.optics.geometric.line_arc_intersection(pos, dirVect, chord_center, chordNormVect, invROC, diameter, verbose=False)[source]

Compute the intersection point between a line and an arc.

pos: Origin of the line dirVect: Direction of the line chord_center: The center of the chord made by the arc. chordNormVect: Normal vector of the chord. invROC: Inverse of the ROC of the arc. Positive for concave surface. diameter: Length of the chord.

gtrace.optics.geometric.line_plane_intersection(pos, dirVect, plane_center, normalVector, diameter)[source]

Compute the intersection point between a line and a plane

A line is specified by its origin (pos) and the direction vector (dirVect). A plane is specfied by its center coordinates (plane_center) and the normal vector (normalVector). The plane has its size (diameter).

The returned value is a dictionary of with the following keys: “Intersection Point”: numpy array of the coordinates of the intersection point. “isHit”: A boolean value of whether the line intersects with the plane or not. “distance”: Distance between the origin of the line and the intersection point. “distance from center”: Distance between the center of the plane and the intersection point.

gtrace.optics.geometric.normSpheric(normAngle, invROC, dist_from_center)[source]

Returns the local normal angle of a spheric mirror at a distance from the center.

normAngle: The angle formed by the normal vector of the mirror
at the center and the x-axis.

invROC: 1/R, where R is the ROC of the mirror.

dist_from_center: The distance from the center of the point where
the local normal is requested. This is a signed value. For a mirror facing +x (the normal vector points towards positive x direction), this distance is positive for points with positive y coordinate, and negative for points with negative y coordinate.
gtrace.optics.geometric.refl_defl_angle(beamAngle, normAngle, n1, n2, invROC=None)[source]

Returns a tuples of reflection and deflection angles.

beamAngle: The angle formed by the propagation direction vector
of the incident beam and the x-axis.
normAngle: The angle formed by the normal vector of the surface
and the x-axis.

n1: Index of refraction of the incident side medium.

n2: Index of refraction of the transmission side medium.

gtrace.optics.geometric.vc_deflect(theta, theta1, n1, n2)[source]

Deflection angle helper function for VariCAD. theta is the angle of the surface measured from right. theta1 is the angle of the incident beam measured from right. It returns an angle of the deflected beam measured from right.

gtrace.optics.geometric.vc_reflect(theta, theta1)[source]
gtrace.optics.geometric.vector_rotation_2D(vect, angle)[source]

unit Module

gtrace.optics.unit.deg2rad(deg)[source]
gtrace.optics.unit.rad2deg(rad)[source]

Table Of Contents

Previous topic

draw Package

This Page