Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Science and Engineering > Astronomy

    ref_index 1.0

    Download button

    No screenshots available
    Downloads: 133  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Prasanth Nair | More programs
    BSD License / FREE
    October 12th, 2011, 17:10 GMT
    ROOT / Science and Engineering / Astronomy

     Read user reviews (0)  Refer to a friend  Subscribe

    ref_index description

    Refractive index of air, and vacuum-air wave length conversion

    ref_index is a Python tool for calculating refractive index of air, under varying atmospheric conditions. 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.

    Examples

    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)
    1.0002716285340578
    >>> ref_index.edlen(wave=633.0, t=20, p=101325, rh=20)
    1.0002716291691649
    >>> ref_index.edlen(wave=633.0, t=20, p=101325, rh=80)
    1.0002711197635226
    >>> ref_index.ciddor(wave=633.0, t=20, p=101325, rh=80)
    1.0002711183472626
    >>> ref_index.edlen(wave=633.0, t=60, p=101325, rh=80)
    1.0002339748542823
    >>> ref_index.ciddor(wave=633.0, t=60, p=101325, rh=80)
    1.0002340241754055


    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)
    632.82500476826874
    >>> ref_index.air2vac(632.82500476826874)
    633.00000139949032

    >>> 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)
    632.83051710791892
    >>> ref_index.air2vac(632.83051710791892, t=20, p=100000.0, rh=50)
    633.00000131884678


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

    Installation

    The module can be installed using pip and easy_install.

    pip install ref_index

    or,

    easy_install ref_index


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    refractive index | wave length | wave conversion | refractive | index | wave

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM