# Asymmetry¶

pawlikMorphLSST.asymmetry.minapix(image: numpy.ndarray, mask: numpy.ndarray, apermask: numpy.ndarray, starMask=None) → List[int]

Find the pixel that minimises the asymmetry parameter, A

Selects a range of candidate centroids within the brightest region that compromises of 20% of the total flux within object. Then measures the asymmetry of the image under rotation around that centroid. Then picks the centroid that yields the minimum A value.

Parameters
• image (np.ndarray) – Image that the minimum asymmetry pixel is to be found in.

• mask (np.ndarray) – Precomputed mask that describes where the object of interest is in the image

Returns

Centroid – The minimum asymmetry pixel position.

Return type

List[int]

pawlikMorphLSST.asymmetry.calcA(img: numpy.ndarray, pixmap: numpy.ndarray, apermask: numpy.ndarray, centroid: List[int], angle: float, starMask=None, noisecorrect=False) → List[float]

Function to calculate A, the asymmetry parameter.

$A=\frac{\sum\left|I_0-I_{\theta}\right|}{2\sum I_0}-A_{bgr}$

Where $$I_0$$ is the original image, $$I_{\theta}$$ is the image rotated by $$\theta$$ degrees, and $$A_{bgr}$$ is the asymmerty of the sky.

See Conselice et al. for full details.

Near direct translation of IDL code.

Parameters
• img (np.ndarray) – Image to be analysed.

• pixmap (np.ndarray) – Mask that covers object of interest.

• centroid (np.ndarray) – Pixel position of the centroid to be used for rotation.

• angle (float) – Angle to rotate object, in degrees.

• noisecorrect (bool, optional) – Default value False. If true corrects for background noise

Returns

A, Abgr – Returns the asymmetry value and its background value.

Return type

List(float)

pawlikMorphLSST.asymmetry.calculateAsymmetries(image: numpy.ndarray, pixelmap: numpy.ndarray) → Tuple[float]

helper function to calculate all asymmetries

Parameters
• image (np.ndarray, 2d float) – image of a galaxy for which the asymmetries should be calculated.

• pixelmap (np.ndarray, 2d uint8) – Pixel mask of the galaxy calculated from image.

Returns

A, As, As90 – The calculated asymmetry values.

Return type

Tuple, float