xpsi-group / xpsi

X-PSI: X-ray Pulse Simulation and Inference
Other
34 stars 21 forks source link

Problem in the example run with small background at some channels #367

Open thjsal opened 7 months ago

thjsal commented 7 months ago

Generating data and modeling it using the scripts from examples_fast (after removing the noise, not rounding the count numbers, and matching the resolution settings) seem to lead a situation where a wrong parameter vector (found after short sampling) is strongly favored against the true vector (difference in log-likelihood of more than 100). This seems to be due to the background being very small at the highest energy channels, and background marginalization starting from zero (instead of negative values).

With true parameters the peak of the likelihood is close to the B=0 integration boundary, but for a wrong parameter vector predicting a slightly higher best-fit background, the curve is fully within the integration domain. If modifying X-PSI to allow negative backgrounds, the true parameter vector becomes indeed a better fit than the wrong vector. However, negative backgrounds are hard to justify physically.

However, setting background limits around the true background might solve this issue (to be checked). Showing how to set them in the example might be anyway a good thing.