Author Topic: CosmeticCorrection Use Defect List bug  (Read 1171 times)

Offline dougggg

  • Newcomer
  • Posts: 18
CosmeticCorrection Use Defect List bug
« on: 2016 December 11 10:48:16 »
There is a subtle bug in the CosmeticCorrection Use Defect List option. When correcting a column or row, the implementation calculates the replacement value for a pixel to be the median value of the 24 pixels in the nearest 5x5 square excluding the pixel being corrected. When correcting a pixel in a column, the two pixels directly above and below in are included in the median calculation but they should not be since in a bad column these pixels are bad data. Similarly, when correcting a row the two pixels to the left and right are included in the median calculation. I have test data to confirm.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: CosmeticCorrection Use Defect List bug
« Reply #1 on: 2016 December 15 02:15:31 »
Thank you for reporting this interesting, and certainly subtle, issue. Can you upload an image for testing? It would help us fix the bug more quickly.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline dougggg

  • Newcomer
  • Posts: 18
Re: CosmeticCorrection Use Defect List bug
« Reply #2 on: 2016 December 16 13:03:21 »
I’m looking at the CosmeticCorrection code in github and I think my comment is mistaken. What I notice now is that it this is question of precedence. Hot/Cold pixels are corrected first and then the defect list is applied.