Muon fit improvement#2736
Conversation
…defined asymmetry in both the x and y directions. Updating the muon ring fitter test to include ring asymmetry.
This comment has been minimized.
This comment has been minimized.
|
Could you please provide the code that produced your images? I can't reproduce this systematic over-estimation of the radius locally. |
|
@maxnoe It is very simple even with current test. But in case of non symmetric ring you will get the error even with small ring. |
|
Could you please provide a minimal example that re-produces this error in a self contained script or test that can just be run? |
|
Ah sure ... You will need this branch :muon_fit_improvement To run it you will need : |
Did you reproduce the error ? |
|
The test is passing for me: |
|
I think you can always find some specific example where a fit is not getting to the true answer within some tight tolerance. The question I am trying to understand here is whether there is really an issue, or that is just the expected resolution of such a method. Do you have any concrete evidence, that there is a bug? Or a proposal for an improvement? |
|
In the current state even a very good muons (momentum > 13 GeV and theta [0,0.1 deg]) and impact point about [0-13]~m are only 30 % efficient to fit the muon in a good way. The example of the ring i show is very much simple to be fitted correctly. |
|
@burmist-git Ok, but have you identified a concrete issue? Do you propose to change the existing methods somehow? Add a new method? |
|
@maxnoe Yes the non ideal muons (asymmetric in terms of pixel intensity) are not fitted well. For this reason i have implemented the test with intensity asymmetry. The plan in very simple use the first method for defining the seed parameter and then fit with second method or similar one. |
|
@burmist-git I think you misunderstand me: I am asking if you have identified a bug. The symptom I have now understood. |
|
Yes, the kundu_chaudhuri method is good but only in case of uniform intensities ring or part of the ring: In reality one have always muons with some intensity non uniformity. It is function of muon inclination and muon impact point. So this is main reason why I included the intensity asymmetry into the toy simulation. The taubin_circle_fit as well have two problems:
|
|
Sorry for asking again, I will try to express myself more clearly: Do you think there there is an actual bug here, as in "A programming mistake"? Or is it "just" that the correctly implemented current methods are not well-suited? |
|
The ring fitting procedure has no bugs. It is working correctly mean : doing exactly what it is asked to do. With little ajustement of the logic it will do much better. |
…ing less asymmetrical still can be fitted with chaudhuri kundu method (not real fit). While the ring with much larger asymmetry can be fitted only with updated taubin circle fit and one more introduced methode. This newly introduced method uses the chaudhuri kundu formulas (on the mask) to get the approximate initial values of r, xc and yc and feed it to taubin circle fit.
…udhuri kundu formula to calculate the initial muon ring parameters and fead them to the taubin fit.
|
The ring fitting procedure has been updated . I added the weight into the taubin fit. And added the ring fitting combined method (kundu_chaudhuri_taubin). This newly introduced method uses the chaudhuri kundu formulas (on the mask) to get the approximate initial values of r, xc and yc and feed it to taubin circle fit. The tests with much more distorted ring have been successfully passed. Note these more distorted rings (colosseum like asymmetry) could not be fitted correctly with old taubin fit without weights. |
…: The API for MuonFitter has been modified.
…l] -> np.array([],dtype=bool)
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mexanick
left a comment
There was a problem hiding this comment.
LGTM. Not sure why CI jobs status is not yet reported, from the actions page it looks like it passed without issues.
This comment has been minimized.
This comment has been minimized.
|
@mexanick No jobs ran for the latest commit here. |
Co-authored-by: Maximilian Linhoff <maximilian.linhoff@cta-observatory.org>
|
Ok, with the latest push, jobs are passing |
Analysis Details0 IssuesCoverage and DuplicationsProject ID: cta-observatory_ctapipe_AY52EYhuvuGcMFidNyUs |
|
@burmist-git Thanks a lot for this contribution. It would be nice if you could report somewhere (e.g. in an ASWG call) on the improvements on the muon analysis resulting from this change |
|
Sure, this needs to be done. However, there are many things coming up next month, including the next sprint and the ICRC. |






The muon ring fitter needs to be improved.
The existing toy tests for muons are overly simplified.
Realistic simulations reveal significant discrepancies between the true ring and the fitted result (see the attached PNG). The fitted parameters are shown in green.
The second major component will be fitting the muon impact point while accounting for the muon’s inclination.
I stated with :
Enhance the toy model for muon ring simulation by incorporating user-defined asymmetry in both the x and y directions.
Update the muon ring fitter test to include this ring asymmetry.