subtract_constant

laserbeamsize.background.subtract_constant(original, background, iso_noise=True)[source]

Return image with a constant value subtracted.

Subtract threshold from entire image. If iso_noise is False then negative values are set to zero.

The returned array is an array of float with the shape of original.

Parameters:
  • original – the image to work with

  • background – value to subtract every pixel

Returns:

image – 2D float array with constant background subtracted