pymf.filter_map_cmf

pymf.filter_map_cmf(image, templates, response, noise_map=None, sigma_noise=None)

Computes and applies a constrained matched filter to a given map. The filter is build from a provided source template and the power spectrum of the map.

Parameters:
image: 2D float array

Input image.

templates: 3D float array

Data cube containing the individual source templates that will be used to construct the filter. The dimensions are supposed to be n * n_x * n_y, where n is the number of templates and n_x and n_y are the number of pixels along the * and y axis of the images. The latter have to be identical to the dimensions of image.

response: float array

Array containing the desired response of the filter to each provided source

template. noise_map: 2D float array, optional

The provided noise map will be used to compute noise power spectrum. Otherwise the noise power spectrum is directly computed from the image. Default: None

sigma_noise: float, optional

Standard deviation of the map noise. Does allow analytic computation of the noise power spectrum. Useful for tests with white noise. Default: None

Returns:
filtered_image: 2D float array

Image convolved with the computed constrained matched filter.

filter_ft: 2D float array

2D window function of the constrained matched filter.

noise: float

Noise level of the filtered map.