cropImgCalibrated

xripl.visualizations.cropImgCalibrated(img, px2Um, pxRef, umRef, xMin, xMax, yMin, yMax, method='horizontal', plots=False)[source]

Crops the image and provides updated extents for spatial calibration of the image.

imgnumpy.ndarray

Image to be cropped.

px2Umfloat

Conversion factor micrometers / pixel for the image.

pxReftuple

Reference position in pixels for the uncropped image. This is based on a known feature, such as a fiducial or filter edge.

umReftuple

Reference position in micrometers. This is the same reference used for pxRef, but with the known target coordinates from metrology/design.

xMinint

Lower bound pixel for cropping in x-direction.

xMaxint

Upper bound pixel for cropping in x-direction.

yMinint

Lower bound pixel for cropping in y-direction.

yMaxint

Upper bound pixel for cropping in y-direction.

methodstr

Direction of shock propagation in the image. Default shock direction is horizontal.

plotsbool

Flag for plotting cropped image with spatially calibrated axes. Default is False.