Coverage for src/ufig/psf_estimation/correct_brighter_fatter.py: 100%

12 statements  

« prev     ^ index     » next       coverage.py v7.6.9, created at 2024-12-12 19:08 +0000

1# Copyright (c) 2017 ETH Zurich, Cosmology Research Group 

2""" 

3Created on 05 May, 2018 

4@author: Tomasz Kacprzak 

5""" 

6 

7 

8def brighter_fatter_remove(col_mag, col_fwhm, col_e1, col_e2, dict_corr): 

9 fac = (col_mag - dict_corr["mag_ref"]) / dict_corr["mag_ref"] 

10 col_fwhm_rem = col_fwhm + fac * dict_corr["c1r"] 

11 col_e1_rem = col_e1 + fac * dict_corr["c1e1"] 

12 col_e2_rem = col_e2 + fac * dict_corr["c1e2"] 

13 return col_fwhm_rem, col_e1_rem, col_e2_rem 

14 

15 

16def brighter_fatter_add(col_mag, col_fwhm, col_e1, col_e2, dict_corr): 

17 fac = (col_mag - dict_corr["mag_ref"]) / dict_corr["mag_ref"] 

18 col_fwhm_add = col_fwhm - fac * dict_corr["c1r"] 

19 col_e1_add = col_e1 - fac * dict_corr["c1e1"] 

20 col_e2_add = col_e2 - fac * dict_corr["c1e2"] 

21 return col_fwhm_add, col_e1_add, col_e2_add