Correct bug in median computation
ClosedPublic

Authored by murveit on Feb 26 2020, 8:24 AM.

Details

Summary

When there were small ranges of values, e.g. in bias images, a lack of consistency in binning logic caused the median algorithm to fail.

Test Plan

Median values will be the same for most images.
Some images had median calculation failures because of an off-by-one error caused by an inconsistency on bin assignment in histogram computations
For instance, in https://indilib.org/forum/ekos/6520-median-computation-in-fitsviewer-wrong.html#50100 Herrhausen provided an image which previously
got median values of 0. With this fix, the correct median values (768 for each channel) should be calculated.

Diff Detail

Repository
R321 KStars
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
murveit created this revision.Feb 26 2020, 8:24 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptFeb 26 2020, 8:24 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
murveit requested review of this revision.Feb 26 2020, 8:24 AM
mutlaqja accepted this revision.Feb 26 2020, 6:02 PM
This revision is now accepted and ready to land.Feb 26 2020, 6:02 PM
This revision was automatically updated to reflect the committed changes.