D27670: Correct bug in median computation
Hy Murveit <[email protected]>
| Newsgroups | gmane.comp.kde.education |
|---|---|
| Message-ID | <[email protected]> |
murveit created this revision. murveit added a reviewer: mutlaqja. Herald added a project: KDE Edu. Herald added a subscriber: kde-edu. murveit requested review of this revision. REVISION 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. REPOSITORY R321 KStars BRANCH median-fix (branched from master) REVISION DETAIL https://phabricator.kde.org/D27670 AFFECTED FILES kstars/fitsviewer/fitshistogram.cpp To: murveit, mutlaqja Cc: kde-edu, narvaez, apol