File:Mplwp dispersion curves.svg

From testwiki
Jump to navigation Jump to search
    Original file (SVG file, nominally 600 × 400 pixels, file size: 53 KB)

    This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

    Summary

    Description
    English: Plot of refractive index vs. wavelength of various glasses. For dispersion. The wavelengths in the gray-shaded portion correspond to the visible spectrum.
    Русский: Зависимость показателя преломления от длины волны в диапазоне 0,3...1,6 мкм некоторых оптических стёкол
    Date
    Source Own work
    Author Geek3
    Other versions Derivative works of this file:  Indice refraction dispersion verres flint crown.svg
    SVG development
    InfoField
     The SVG code is valid.
     This plot was created with mplwp, the Matplotlib extension for Wikipedia plots.
    Source code
    InfoField

    mplwp source code

    The plot was generated with mplwp 1.7
    #!/usr/bin/python
    # -*- coding: utf8 -*-
    
    import matplotlib.pyplot as plt
    import matplotlib as mpl
    import numpy as np
    from math import *
    
    code_website = 'http://commons.wikimedia.org/wiki/User:Geek3/mplwp'
    try:
        import mplwp
    except ImportError, er:
        print 'ImportError:', er
        print 'You need to download mplwp.py from', code_website
        exit(1)
    
    name = 'Mplwp_dispersion curves.svg'
    fig = mplwp.fig_standard(mpl)
    xlim = 0.3, 1.6; fig.gca().set_xlim(xlim)
    ylim = 1.4, 1.9; fig.gca().set_ylim(ylim)
    mplwp.set_bordersize(fig, 60.5, 26.5, 24.5, 48.5)
    plt.gca().axvspan(0.38, 0.78, alpha=0.5, color='#aaaaaa')
    
    # functions: https://refractiveindex.info
    def n(l, coeff):
        n21 = 0.
        for a,b in coeff:
            n21 += a * l**2 / (l**2 - b)
        return sqrt(1. + max(0, n21))
    
    # coefficients for the https://en.wikipedia.org/wiki/Sellmeier_equation
    LASF9 = ((2.00030, 0.01214), (0.29893, 0.05387), (1.80692, 156.53083))
    SF10 = ((1.62154, 0.01222), (0.25629, 0.05957), (1.64448, 147.46879))
    F2 = ((1.34533, 0.00998), (0.20907, 0.04705), (0.93736, 111.88676))
    BaK4 = ((1.28835, 0.00780), (0.13282, 0.03156), (0.94540, 105.96588))
    BK7 = ((1.18319, 0.00722), (0.08718, 0.02682), (1.03134, 101.70236))
    FK51A = ((0.97125, 0.00472), (0.21690, 0.01536), (0.90465, 168.68133))
    
    x = np.linspace(xlim[0], xlim[1], 5001)
    y = [n(xx, LASF9) for xx in x]
    plt.plot(x, y, color='#0000cc')
    plt.text(1.5, 1.84, 'Lanthanum dense flint LaSF9', ha='right')
    
    y = [n(xx, SF10) for xx in x]
    plt.plot(x, y, color='#0000cc')
    plt.text(1.5, 1.71, 'Dense flint SF10', ha='right')
    
    y = [n(xx, F2) for xx in x]
    plt.plot(x, y, color='#0000cc')
    plt.text(1.5, 1.608, 'Flint F2', ha='right')
    
    y = [n(xx, BaK4) for xx in x]
    plt.plot(x, y, color='#0000cc')
    plt.text(1.5, 1.565, 'Barium crown BaK4', ha='right')
    
    y = [n(xx, BK7) for xx in x]
    plt.plot(x, y, color='#0000cc')
    plt.text(1.5, 1.515, 'Borosilicate crown BK7', ha='right')
    
    y = [n(xx, FK51A) for xx in x]
    plt.plot(x, y, color='#0000cc')
    plt.text(1.5, 1.45, 'Fluorite crown FK51A', ha='right')
    
    plt.xlabel(r'wavelength $\lambda$ [$\mu m$]')
    plt.ylabel(r'refractive index n')
    
    plt.savefig(name)
    mplwp.postprocess(name)
    

    Licensing

    I, the copyright holder of this work, hereby publish it under the following license:
    w:en:Creative Commons
    attribution share alike
    This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
    You are free:
    • to share – to copy, distribute and transmit the work
    • to remix – to adapt the work
    Under the following conditions:
    • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
    • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.

    Captions

    Add a one-line explanation of what this file represents

    Items portrayed in this file

    depicts

    11 January 2018

    image/svg+xml

    File history

    Click on a date/time to view the file as it appeared at that time.

    Date/TimeThumbnailDimensionsUserComment
    current19:52, 21 January 2018Thumbnail for version as of 19:52, 21 January 2018600 × 400 (53 KB)wikimediacommons>Geek3unit µm fixed

    There are no pages that use this file.