domeckert / pyproffit

Pyproffit is a Python code for the analysis of X-ray brightness profiles from clusters of galaxies
GNU General Public License v3.0
18 stars 4 forks source link

profile.PSF : brentq root-finder should start to 0 in this case #14

Closed ghost closed 2 years ago

ghost commented 2 years ago

rmax finding should start from zero, peaked PSF function such as a Gaussian fade too quickly. the attached example psffunc returns an error because its rmax is less than 1 arcmin

def gaussian(x): FWHM=5./60. # Full Width Half Maximum in arcmin sigma=FWHM/2.35 # standard deviation as a function of the FWHM return np.exp(-x**2/(2*sigma**2))

botteon commented 2 years ago

I am also experiencing issues with a gaussian PSF. The error (brentq related) is ValueError: f(a) and f(b) must have different signs. However the solution proposed does not solve the problem

domeckert commented 2 years ago

Thanks @botteon , I'll have a look