This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Code for calculating refractive index of air, under varying atmospheric conditions, is provided in this module. Functions for conversion of wave length of light in vacuum to that in air, and vice-versa are also defined.

The code is based on the documentation for the NIST online refractive index of air calculator.


Refractive index can be calculated using two different equations: one due to Edlén and another due to Ciddor.

>>> ref_index.ciddor(wave=633.0, t=20, p=101325, rh=20)
>>> ref_index.edlen(wave=633.0, t=20, p=101325, rh=20)
>>> ref_index.edlen(wave=633.0, t=20, p=101325, rh=80)
>>> ref_index.ciddor(wave=633.0, t=20, p=101325, rh=80)
>>> ref_index.edlen(wave=633.0, t=60, p=101325, rh=80)
>>> ref_index.ciddor(wave=633.0, t=60, p=101325, rh=80)

Conversion of wave length of light in vacuum to that in air, and vice-versa. Both of these functions use the Ciddor equation, as implemented in ciddor_ri() and ciddor().

>>> ref_index.vac2air(633.0)
>>> ref_index.air2vac(632.82500476826874)

>>> ref_index.vac2air(np.array([633.0, 550.0, 400.0]))
array([ 632.82500477,  549.84723175,  399.88692724])
>>> x = ref_index.vac2air(np.array([633.0, 550.0, 400.0]))
>>> ref_index.air2vac(x)
array([ 633.0000014 ,  550.00000164,  400.00000243])

Note that the reversibility of air2vac() is ~1e-5nm.

Default temperature is 15∘C, pressure is 101325Pa, relative humidity is 0, and CO2 concentration is 450µmole/mole. All these can be changed.

>>> ref_index.vac2air(633.0, t=20, p=100000.0, rh=50)
>>> ref_index.air2vac(632.83051710791892, t=20, p=100000.0, rh=50)

For more details please see the docstring for the module. Detailed description of the equations can be found in the NIST documentation.


The module can be installed using pip and easy_install.

$ pip install ref_index


$ easy_install ref_index


All equations used in this module come from the documentation for the NIST online refractive index calculator, written by Jack A. Stone and Jay H. Zimmerman.

Please send comments and suggestions to the email id prasanthhn in the domain.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ref_index-1.0.tar.gz (9.0 kB) Copy SHA256 Checksum SHA256 Source Oct 12, 2011

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting