desihub / desimeter

DESI coordinates and transformations
BSD 3-Clause "New" or "Revised" License
2 stars 4 forks source link

Finding of fibers + angles #102

Closed segasai closed 4 years ago

segasai commented 4 years ago

This is my script to find fibers + angles. The script depends on sep package + scikit-image. (I didn't add them to requirements.txt yet)

julienguy commented 4 years ago

Thank you Sergey!

If you don't mind we will rework the script, because we already have a full infrastructure to analysis the back illuminated fibers. I'll keep you in the loop.

A future improvement would be to detect the phi arms of positioners with broken fibers. I think it should not be too difficult if we focus only on the region where we know a detection is missing. Screenshot from 2020-06-26 11-10-35

segasai commented 4 years ago

On Fri, 2020-06-26 at 11:12 -0700, julienguy wrote:

Thank you Sergey! If you don't mind we will rework the script, because we already have a full infrastructure to analysis the back illuminated fibers. I'll keep you in the loop. sure A future improvement would be to detect the phi arms of positioners with broken fibers. I think it should not be too difficult if we focus only on the region where we know a detection is missing.

Yes, I think given that I have the outline of the fiber now I think it is possible (and I was planning to do it originally) to just 1) apply the canny filter to the whole image (in blocks to avoid issues due to brightness gradients) 2) then apply matched filters of rotated fiber outlines to identify fibers including broken ones .

That removes the need to rely on the back illuminated image.

segasai commented 4 years ago

Just one more comment. I've played a bit with the code trying to see if it is possible to detect the fibers without the back illuminated image (i.e. to detect the broken fibers). here is the result applying matched filter technique (on the left is the filtered image with peaks corresponding to the location of fibers and the actual image on the right. experiment I don't think in the current form it can work reliably enough (unless we have a good idea of a small area where the broken fiber should be in the plane) (the code performing that search is in the last experimental commit)

julienguy commented 4 years ago

I have reorganize this code into routines, added multiprocessing, and included it in a script that also does the match to the metrology. This is in another branch bright-image-analysis, so I am closing this PR.