SourceXtractorPlusPlus icon indicating copy to clipboard operation
SourceXtractorPlusPlus copied to clipboard

More flexible priors

Open rgavazzi opened this issue 2 years ago • 0 comments

Trying to limit the number of faulty low snr fits for sources near a brighter one (leading to large and elongated sources most often). I've played with priors on the source size (for single Sersic fit), but I think I've reached the limits of flexibility of the built-in priors in the code. So, I was wondering if it could be possible to improve the simple Gaussian that could apply to more than one free parameter at a time. It could take the form of a lambda function, right?

add_prior( lambda x,y : myfunction(x,y), freepar1, freepar2 ) ??? Bearing in mind how this term is added to the likelihood term (or chi2).

My current understanding is that the penalty is -2*log( prior_pdf(x) )... which is equivalent to (x-xm)^2 / sigma_x^2 for Gaussian.

the example above would do the job for 2 coupled parameters but ideally the possibility to use an array of free parameters (and assuming myfunction( x::array ) would quite often matrix multiply x with a covariance matrix xT C^-1 x ).

rgavazzi avatar Nov 18 '22 16:11 rgavazzi