lib.tests module

DECONVOLUTION RESULT TESTS

This module contains methods for measuring the pixel and ellipticity errors of a given stack of deconvolved images

Author:Samuel Farrens <samuel.farrens@gmail.com>
Version:1.0
Date:16/01/2017
lib.tests.test_deconvolution(deconv_data, clean_data_file, random_seed=None, kernel=None, metric='mean')[source]

Test deconvolution

This method tests the quality of the deconvolved images

Parameters:
  • deconv_data (np.ndarray) – Deconvolved data, 3D array
  • clean_data_file (str) – Clean data file name
  • random_seed (int, optional) – Random seed
  • kernel (int, optional) – Standard deviation of Gaussian kernel
  • metric (str {mean, median}, optional) – Metric for averaging results (default is ‘mean’)
Returns:

Return type:

np.ndarray pixel errors, np.ndarray ellipticity errors

Raises:

ValueError – If the number of clean images does not match the number of deconvolved images

lib.tests.test_images(results, truth, kernel=None, metric='mean')[source]

Test Image Results

This method tests the quality of the recovered images

Parameters:
  • results (np.ndarray) – Resulting images, 3D array
  • truth (str) – True images, 3D array
  • kernel (int, optional) – Standard deviation of Gaussian kernel
  • metric (str {mean, median}, optional) – Metric for averaging results (default is ‘mean’)
Returns:

Return type:

np.ndarray pixel errors, ellipticity errors, PSNR

Raises:

ValueError – If the number of clean images does not match the number of deconvolved images

lib.tests.test_psf_estimation(psf_data, true_psf_file, kernel=None, metric='mean')[source]

Test PSF Estimation

This method tests the quality of the estimated PSFs

Parameters:
  • psf_data (np.ndarray) – Estimated PSFs, 3D array
  • true_psf_file (str) – True PSFs file name
  • kernel (int, optional) – Standard deviation of Gaussian kernel
  • metric (str {mean, median}, optional) – Metric for averaging results (default is ‘mean’)
Returns:

Return type:

np.ndarray pixel errors, np.ndarray ellipticity errors

Raises:

ValueError – If the number of clean images does not match the number of deconvolved images