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_px, yc_px, d_major, d_minor, phi)

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

ellipse_arrays(xc_px, yc_px, d_major, ...[, ...])

Return x, y arrays to draw a rotated ellipse.

major_axis_arrays(image, xc_px, yc_px, ...)

Return x, y, z, and distance values of an image along the major axis.

minor_axis_arrays(image, xc_px, yc_px, ...)

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

rotated_rect_arrays(xc_px, yc_px, d_major, ...)

Return x, y points for rotated rectangle with specified center.

create_test_image(h, v, xc_px, yc_px, ...[, ...])

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

crop_image_to_rect(image, xc_px, yc_px, ...)

Return image cropped to specified rectangle.

crop_image_to_integration_rect(image, xc_px, ...)

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.