PyDDM.ddm_calc.generate_mask

PyDDM.ddm_calc.generate_mask

generate_mask(im, centralAngle, angRange)

Generates a mask of the same size as im to avoid radially averaging the whole DDM matrix.

If the DDM matrix is not to be radially averaged, we can use a mask to average values of the matrix only in some angular range around a central angle.

Parameters
  • im (ndarray) – Image (2D) of same size you want the mask to be.

  • centralAngle (float) – Central angle of the angular range to average over

  • angRange (float) – Range to overage over.

Returns

mask – Mask with 1s corresponding to the angular region specified and 0s elsewhere.

Return type

ndarray