Skip to main content

Python package for calculating refractive index dispersion of various materials

Project description

ndispers

ndispers is a Python package for calculating refractive index dispersion of various crystals and glasses used in the field of nonlinear/ultrafast optics. It is based on Sellmeier equartions and thermo-optic coefficients (dn/dT) reported in literature.

You can easily compute

  • Refractive index
  • Group delay
  • Group velocity
  • Group index
  • Group velocity dispersion
  • Third-order dispersion
  • Walk-off angles
  • dn/dT
  • d^2n/dT^2

as a function of

  1. Wavelength of light
  2. Polar (theta) or azimuthal (phi) angles of wavevector with respect to dielectric principal axes of anisotropic crystals
  3. Temperature of crystal
  4. Polarization of light (ordinary- or extraordinary-ray)

The crystals have nonlinear-optics methods:

  • Phase-mismacth, dk
  • Phase-matching angles
  • Phase-mathcing factor, sinc^2(dk*L/2)
  • Effective nonlinear coefficient, deff

Installation

In terminal,

pip install ndispers

Simple example

At first, make an object of β-BBO crystal.

>>> import ndispers as nd
>>> bbo = nd.media.crystals.BetaBBO_Eimerl1987()

To look into the material information,

>>> bbo.help
β-BBO (β-Ba B_2 O_4) crystal

    - Point group : 3m  (C_{3v})
    - Crystal system : Trigonal
    - Dielectic principal axis, z // c-axis (x, y-axes are arbitrary)
    - Negative uniaxial, with optic axis parallel to z-axis
    - Tranparency range : 0.19 µm to 2.6 µm

    Sellmeier equation
    ------------------
    n(wl) = sqrt(A_i + B_i/(wl**2 - C_i) - D_i * wl**2) + dn/dT * (T - 20)  for i = o, e
    
    Validity range
    ---------------
    0.22 to 1.06 µm

    Ref
    ---
    - Eimerl, David, et al. "Optical, mechanical, and thermal properties of barium borate." Journal of applied physics 62.5 (1987): 1968-1983.
    - Nikogosyan, D. N. "Beta barium borate (BBO)." Applied Physics A 52.6 (1991): 359-368.

    Example
    -------
    >>> bbo = ndispers.media.crystals.BetaBBO_Eimerl1987()
    >>> bbo.n(0.6, 0.5*pi, 25, pol='e') # args: (wl_um, theta_rad, T_degC, pol)

To compute a refractive index,

>>> bbo.n(0.532, 0, 25, pol='o')
array(1.67488405)
>>> bbo.n(0.532, 3.1416/2, 25, pol='e')
array(1.55546588)

where the four arguments are, respectively,

  1. wavelength (in micrometer),
  2. theta angle (in radian),
  3. temperature (in degree Celsius),
  4. polarization (pol='o' or 'e', ordinary or extraordinary ray).

Default is pol='o'. Note that pol='e' corresponds to pol='o' in index surface when theta angle is 0 radians. Output values are generically of numpy.ndarray type. You can input an array to each argument, getting an output array of the same shape,

>>> import numpy as np
>>> wl_ar = np.arange(0.2, 1.5, 0.2)
>>> wl_ar
array([0.2, 0.4, 0.6, 0.8, 1. , 1.2, 1.4])
>>> bbo.n(wl_ar, 0, 25, pol='o')
array([1.89625189, 1.692713, 1.66892613, 1.66039556, 1.65560236, 1.65199986, 1.64874414])

See documentation for more features and examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ndispers-0.5.0.tar.gz (28.9 kB view details)

Uploaded Source

Built Distribution

ndispers-0.5.0-py2.py3-none-any.whl (68.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file ndispers-0.5.0.tar.gz.

File metadata

  • Download URL: ndispers-0.5.0.tar.gz
  • Upload date:
  • Size: 28.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for ndispers-0.5.0.tar.gz
Algorithm Hash digest
SHA256 c009ed8374732512e4fc9fed9f8f4fec09f3edb9e9030cea3afd80dc79f0ce7e
MD5 c95aff1318a86a038347a83e6aa6f4ee
BLAKE2b-256 9d5377735baafb33fc9c9a2cc9dfbcca7e1f93248da2e738b517a6bf7e6e77f4

See more details on using hashes here.

File details

Details for the file ndispers-0.5.0-py2.py3-none-any.whl.

File metadata

  • Download URL: ndispers-0.5.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 68.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.0

File hashes

Hashes for ndispers-0.5.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4fb0faa87fe4b980f0c97129c59bfa6a0247a786bd4d6aea55da8339dc65c12d
MD5 33b59af7efa1ea30e2a72eb54c9f1ba2
BLAKE2b-256 696100bb2d9cfb98b5dcbd43cf1ef6474316f3e0a133792eb29d88fa5b5d1589

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page