separate_polarities#

smart.polarity_separation_line.separate_polarities(im_map, feature_mask, dilation_radius: ~astropy.units.quantity.Annotated[~astropy.units.quantity.Quantity, Unit("arcsec")] = <Quantity 3. arcsec>)[source]#

Divide detected feature into a positive and a negative mask, and dilate both masks.

Parameters:
  • im_map (Map) – Processed SunPy magnetogram map.

  • feature_mask (ndarray) – Binary mask of the feature.

  • dilation_radius (int, optional) – Radius of the disk for binary dilation (default is 3 arcsecs).

Returns:

  • dilated_negmask (ndarray) – Dilated mask of the negative region of the feature.

  • dilated_posmask (ndarray) – Dilated mask of the positive region of the feature.