fnrgf¶
- sunkit_image.radial.fnrgf(smap, radial_bin_edges, order, attenuation_coefficients, ratio_mix=[15, 1], scale=None, intensity_summary=<function nanmean>, intensity_summary_kwargs={}, width_function=<function std>, width_function_kwargs={}, application_radius=<Quantity 1. solRad>, number_angular_segments=130)[source]¶
Implementation of the fourier normalizing radial gradient filter (FNRGF).
The filter works as follows:
Fourier Normalizing Radial Gradient Filter approximates the local average and the local standard deviation by a finite Fourier series. This method enables the enhancement of finer details, especially in regions of lower contrast. It takes the input map and divides the region above the application radius and in the radial bins into various small angular segments. Then for each of these angular segments, the intensity summary and width is calculated. The intensity summary and the width of each angular segments are then used to find a Fourier approximation of the intensity summary and width for the entire radial bin, this Fourier approximated value is then used to noramlize the intensity in the radial bin.
Note
After applying the filter, current plot settings such as the image normalization may have to be changed in order to obtain a good-looking plot.
- Parameters:
smap (
sunpy.map.Map
) – A SunPy map.radial_bin_edges (
astropy.units.Quantity
) – A two-dimensional array of bin edges of size[2, nbins]
wherenbins
is the number of bins.order (
int
) – Order (number) of fourier coefficients and it can not be lower than 1.attenuation_coefficients (
float
) – A two dimensional array of shape[2, order + 1]
. The first row contain attenuation coefficients for mean calculations. The second row contains attenuation coefficients for standard deviation calculation.ratio_mix (
float
, optional) – A one dimensional array of shape[2, 1]
with values equal to[K1, K2]
. The ratio in which the original image and filtered image are mixed. Defaults to[15, 1]
.scale (
None
orastropy.units.Quantity
, optional) – The radius of the Sun expressed in map units. For example, in typical helioprojective Cartesian maps the solar radius is expressed in units of arcseconds. IfNone
(the default), then the map scale is used.intensity_summary (
function
, optional) – A function that returns a summary statistic of the radial intensity. Default isnumpy.nanmean
.intensity_summary_kwargs (
None
,dict
) – Keywords applicable to the summary function.width_function (
function
) – A function that returns a summary statistic of the distribution of intensity, at a given radius. Defaults tonumpy.std
.width_function_kwargs (
function
) – Keywords applicable to the width function.application_radius (
astropy.units.Quantity
) – The FNRGF is applied to emission at radii above the application_radius. Defaults to 1 solar radii.number_angular_segments (
int
) – Number of angular segments in a circular annulus. Defaults to 130.
- Returns:
sunpy.map.Map
– A SunPy map that has had the FNRGF applied to it.
References
Morgan, Habbal & Druckmüllerová, 2011, Astrophysical Journal 737, 88. https://iopscience.iop.org/article/10.1088/0004-637X/737/2/88/pdf.
The implementation is highly inspired by this doctoral thesis. DRUCKMÜLLEROVÁ, H. Application of adaptive filters in processing of solar corona images. https://dspace.vutbr.cz/bitstream/handle/11012/34520/DoctoralThesis.pdf.