Skip to main content

Routines for analysis of non-interfometric wavefront testing.

Project description

by Scott Prahl

pypi github conda zenodo

License testing docs Downloads

lenstest is a collection of routines for non-interferometric testing of lenses and mirrors. Developed by Scott Prahl, this package contains code for the Foucault Knife Edge Test and the Ronchi Ruling Test. With lenstest, users can test the quality of their lenses and mirrors without the need for interferometric equipment.

Detailed documentation is available at <https://lenstest.readthedocs.io>.

Installation

  • Install with pip:

    pip install lenstest
  • or with conda:

    conda install -c conda-forge lenstest

or use immediately by clicking the Google Colaboratory button below

Colab

Foucault Example

import numpy as np
import matplotlib.pyplot as plt
import lenstest

D = 200
RoC = 400
z_offset = 10
x_offset = -0.5
conic = 0
phi = np.radians(0)

foucault.plot_lens_layout(D, RoC, x_offset, z_offset)
plt.show()

foucault.plot_knife_and_screen(D, RoC, x_offset, z_offset, phi=phi)
plt.show()

Produces

foucougram

Ronchi Example

10 meter parabolic mirror comparison.

import numpy as np
import matplotlib.pyplot as plt
import lenstest

D = 10000  # 10 meter mirror
F = 5
conic = -1
lp_per_mm = 0.133  # grating frequency lp/mm

RoC =  F * D * 2

print("    Mirror Diameter = %.0f mm" % D)
print("                 F# = %.1f" % F)
print("Radius of Curvature = %.0f mm" % RoC)
print("       Focal Length = %.0f mm" % (RoC/2))
print("   Ronchi Frequency = %.3f lp/mm" % lp_per_mm)

plt.subplots(2,3,figsize=(13,8))

for i, z_offset in enumerate([-63,35,133,231,329,429]):
    plt.subplot(2,3,i+1)
    x,y = lenstest.ronchi.gram(D, RoC, lp_per_mm, z_offset, conic=conic)
    plt.plot(x,y,'o', markersize=0.1, color='blue')
    lenstest.lenstest.draw_circle(D/2)
    plt.title("%.0fmm from focus"%z_offset)
    plt.gca().set_aspect("equal")
    if i in [1,2,4,5]:
        plt.yticks([])
    if i in [0,1,2]:
        plt.xticks([])
plt.show()

Produces

Ronchigram

License

lenstest is licensed under the terms of the MIT license.

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

lenstest-0.9.0.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

lenstest-0.9.0-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file lenstest-0.9.0.tar.gz.

File metadata

  • Download URL: lenstest-0.9.0.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for lenstest-0.9.0.tar.gz
Algorithm Hash digest
SHA256 4dcb5d0c8ef33d8d9ff16c26967b82fd45def45a1450bbbac7a15785ed21d631
MD5 b7e5d005d14c3e2754b8d79f4973866b
BLAKE2b-256 fa38b6d5aae750a5867dc439efb7bbfa979a8e272d237313c57ed409993ae964

See more details on using hashes here.

File details

Details for the file lenstest-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: lenstest-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for lenstest-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7330fb8d51274599ab42d70ccb02399e04d716dfc8ca7bbc7d41bcb4c0ca4b0e
MD5 8abe8582a30c6777d8c4b19f8ed31d9f
BLAKE2b-256 11c3a54a17455a3e0ab14f901a3685c9321fdf928c062151d14a810fce95e4f0

See more details on using hashes here.

Supported by

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