ISO 11146 Calculation of Laser Beam Center and Diameter
Project description
Simple and fast calculation of beam sizes from a single monochrome image based on the ISO 11146 method of variances. Some effort has been made to make the algorithm less sensitive to background offset and noise.
Installation
Just use pip:
pip install laserbeamsize
Usage
Finding the center and dimensions of a good beam image:
import imageio
import laserbeamsize as lbs
beam = imageio.imread("t-hene.pgm")
x, y, dx, dy, phi = lbs.beam_size(beam)
print("The image center is at (%g, %g)" % (x,y))
print("The horizontal width is %.1f pixels" % dx)
print("The vertical height is %.1f pixels" % dy)
print("The beam oval is rotated is %.1f°" % (phi*180/3.1416))
Handling non-zero backgrounds and other issues are explained in Jupyter notebooks at <https://laserbeamsize.readthedocs.io>
Source code repository
Source is hosted by github:
<https://github.com/scottprahl/laserbeamsize>
License
laserbeamsize is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
laserbeamsize-1.1.0.tar.gz
(9.3 kB
view details)
File details
Details for the file laserbeamsize-1.1.0.tar.gz.
File metadata
- Download URL: laserbeamsize-1.1.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.3.1.post20200515 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
028ff249c00324497b0b30cc6a08afc05a5bcb7baa9ed93ce6db3d9e8ce3bff4
|
|
| MD5 |
a98ad5d13c36aad63037082d8deebdf2
|
|
| BLAKE2b-256 |
08f770888a334a2de3cc683350e5e139745c5ddc2e23e937f0251b468f487f6e
|