cwitools.measurement.major_pa

cwitools.measurement.major_pa(fits_in, obj_mask=None, obj_id=1, var_data=None, coords='image')

Calculate the position angle of the major axis of an extended object.

Parameters:
  • fits_in (HDU or HDUList) – 2D or 3D flux-like data.
  • obj_mask (numpy.ndarray) – 2D or 3D data with labelled object regions.
  • obj_id (int or list) – Integer or list of integers of object IDs to use.
  • var_data (numpy.ndarray) – Variance image.
  • coords (str) –

    Desired coordinate system for the output. ‘image’: Counterclockwise from up. Non-square pixel sampling is NOT

    considered.

    ’wcs’: East to North. Non-square pixel sampling is considered.

Returns:

The position angle in degrees of the object’s major axis.

The output angles are restricted in -90 to +90.

(float: Error of the position angle if variance image is provided.)

Return type:

float