View Issue Details

IDProjectCategoryView StatusLast Update
0001934CCdciel[All Projects] Generalpublic18-04-14 10:48
ReporterhanAssigned ToPatrick Chevalley 
PrioritylowSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version 
Target Version1.0Fixed in Version 
Summary0001934: Star detection, star missed
DescriptionPatrick, I'm sorry but have to report that in some cases a star is missed. With attached image (test three stars.fit) the third star is only detected if the star detection is set smaller then 16. It is something weird in the double star detection. If I move the star closer it is easily detected.(test three stars4.fit) What goes wrong? I'm really puzzled. It is something in TFits.GetStarList

The same with the previous "test small stars.fit". If you reduce the "Star detection window" to 10, the detection jumps but still misses one star.

Steps To ReproduceLoad attached FITS images.
TagsNo tags attached.

Activities

han

18-04-12 22:27

reporter  

test images HFD.zip (2,869 bytes)
missed star 2.png (28,130 bytes)
missed star 2.png (28,130 bytes)
missed star 3.png (27,435 bytes)
missed star 3.png (27,435 bytes)
missed star.png (23,740 bytes)
missed star.png (23,740 bytes)

han

18-04-13 11:42

reporter   ~0004711

I did some testing. It is a rounding and accuracy problem. By being very strict against double detection's it is missing the star on the edge/boundary. The problem is that the double detection doesn't use historical detection information but exclude any star outside the detection box. Making the double detection a little less strict solves the problem but introduces a few double detections in crowded star fields.

The detection box has to be exact positioned or historical star detection needs to be used.

It also possible that getHFD2 gives a tiny different star position depending on the test box placement.

han

18-04-13 12:32

reporter   ~0004712

The modification below will allow detection of all stars but give a few double detections in crowded fields. For a perfect detection I would implement a second image array where you mark the found star position area's and use this to exclude new stars. This is easy to implement.

     if ((hfd1>0)and(Undersampled or (hfd1>0.8))) and (hfd1<99)
        and (xc>=-0.5+(fitsX-(s div 2))) and (yc>=-0.5+(fitsY-(s div 2))) {prevent double detections in overlap area}
        and (xc<+0.5+(fitsX+(s div 2))) and (yc<+0.5+(fitsY+(s div 2)))
        and (vmax>treshold) and (vmax<(MaxADU-2*bg)) {new bright star but not saturated}
     then

Patrick Chevalley

18-04-13 17:50

administrator   ~0004713

Thank you, this look good, the 0.5 tolerance avoid to miss a star and the array prevent a double detection.
I use what you do in ASTAP to implement the array.
This is in:
https://github.com/pchev/ccdciel/commit/4eb49a8a11286b1f98ef3e054aa89984bfc92102

han

18-04-13 21:56

reporter   ~0004714

The code can be simplified. See below. The two lines containing the xc and yc conditions are redundant. In fact some more stars are detected. The star box size is less critical. My old value of 120 now works also.

I also noticed a smaller value for size:=round(2*hfd1); That works fine. I used a little more conservative value of 3*hfd1. See no difference.

So this works perfect. I'm impressed again by the performance. All problems solved. :)

     {check valid hfd }
     if ((hfd1>0)and(Undersampled or (hfd1>0.8))) and (hfd1<99)
        and (img_temp[0,round(xc),round(yc)]=0) {area not surveyed}
// and (xc>=(-0.5+fitsX-(s div 2))) and (yc>=(-0.5+fitsY-(s div 2))) {exclude overlap area}
 // and (xc<(0.5+fitsX+(s div 2))) and (yc<(0.5+fitsY+(s div 2)))
        and (vmax>treshold) and (vmax<(MaxADU-2*bg)) {new bright star but not saturated}
     then

Patrick Chevalley

18-04-14 10:48

administrator   ~0004715

I let this test with xc and yc to avoid to keep a measurement in the overlap area from a star disk truncated at the boundary.
But after testing this can be removed as you suggest because this truncated measurement are already rejected by the asymmetry test.

I change to 2*hfd1 (used as a radius, so marking a area 4xhfd1) for big defocused stars to avoid to exclude a too large area around this stars.

The change is in https://github.com/pchev/ccdciel/commit/3a618eb9cf23bb73096e570df9eb04295262d7e8
And I think this issue can be closed.

Issue History

Date Modified Username Field Change
18-04-12 22:27 han New Issue
18-04-12 22:27 han File Added: missed star.png
18-04-12 22:27 han File Added: missed star 3.png
18-04-12 22:27 han File Added: missed star 2.png
18-04-12 22:27 han File Added: test images HFD.zip
18-04-13 11:42 han Note Added: 0004711
18-04-13 12:32 han Note Added: 0004712
18-04-13 17:50 Patrick Chevalley Note Added: 0004713
18-04-13 21:56 han Note Added: 0004714
18-04-14 10:48 Patrick Chevalley Assigned To => Patrick Chevalley
18-04-14 10:48 Patrick Chevalley Status new => resolved
18-04-14 10:48 Patrick Chevalley Resolution open => fixed
18-04-14 10:48 Patrick Chevalley Target Version => 1.0
18-04-14 10:48 Patrick Chevalley Note Added: 0004715