laserbeamsize.image_tools Module

Image manipulation routines needed for beam analysis.

Full documentation is available at <https://laserbeamsize.readthedocs.io>

Functions

rotate_image(original, x0, y0, phi)

Create image rotated about specified centerpoint.

axes_arrays(xc, yc, dx, dy, phi[, ...])

Return x, y arrays needed to draw semi-axes of ellipse.

ellipse_arrays(xc, yc, dx, dy, phi[, npoints])

Return x, y arrays to draw a rotated ellipse.

major_axis_arrays(image, xc, yc, dx, dy, phi)

Return x, y, z, and distance values along semi-major axis.

minor_axis_arrays(image, xc, yc, dx, dy, phi)

Return x, y, z, and distance values along semi-minor axis.

rotated_rect_arrays(xc, yc, dx, dy, phi[, ...])

Return x, y arrays to draw a rotated rectangle.

create_test_image(h, v, xc, yc, dx, dy, phi)

Create a 2D test image with an elliptical beam and possible noise.

crop_image_to_rect(image, xc, yc, xmin, ...)

Return image cropped to specified rectangle.

crop_image_to_integration_rect(image, xc, ...)

Return image cropped to integration rectangle.

create_cmap(vmin, vmax[, band_percentage])

Create a colormap with a specific range, mapping vmin to 0 and vmax to 1.

create_plus_minus_cmap(data)

Create a color map with reds for positive and blues for negative values.