<table><tr><td style="">TallFurryMan created this revision.<br />TallFurryMan added reviewers: mutlaqja, alexcherney, wreissenberger.<br />Herald added a project: KDE Edu.<br />Herald added a subscriber: kde-edu.<br />TallFurryMan requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D23892">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>Fixed HFR calculation in the FITSData class, which was accumulating integer instead of double values.<br />
This led to incorrect consolidation of HFR over multiple stars in the focus procedure and incoherent results in full-frame mode.</p>

<p>In order to debug, added HFR values directly in the FITS view, next to circular star marks.<br />
The HFR values are now displayed only for the focus module, they do not appear in the regular FITS viewer.</p>

<p>Took the opportunity to adjust the Focus module UI, so that buttons are bigger and a few UI hiccups are resolved.</p>

<p>Notes:</p>

<p>At the time of this differential, the FITS viewer and the Focus module do not detect the same amount of stars.<br />
Apparently, the "JMIndex" in the case of the FITS viewer is taken from the histogram, and equals 0, causing the detection threshold to be computed from the frame mean ADU, and set too high.<br />
The "JMIndex" in the case of the Focus module is left to its default value 100, causing the detection threshold to be computed from the frame standard deviation, and set properly.</p>

<p>On another subject, the CCD Simulator seems to produce the same SNR even as the optical simulation approaches the optimal focus point.<br />
This causes rendered stars to be smaller, and thus to be missed by the FITS detector. In other words, the more focused the frame is, the less stars are detected.<br />
Because of this problem, the focus procedure sometimes fails with the CCD Simulator.</p></div></div><br /><div><strong>TEST PLAN</strong><div><ul class="remarkup-list">
<li class="remarkup-list-item">Run an autofocus procedure using the CCD Simulator or a real CCD night test so that a dozen of stars are detected.</li>
<li class="remarkup-list-item">Verify the HFR consolidated for a particular focuser position is the mean value of HFR registered for detected stars.</li>
<li class="remarkup-list-item">Verify the procedure is overall more stable than before the change.</li>
</ul></div></div><br /><div><strong>REPOSITORY</strong><div><div>R321 KStars</div></div></div><br /><div><strong>BRANCH</strong><div><div>improve__stacked_focus (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23892">https://phabricator.kde.org/D23892</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>kstars/ekos/focus/focus.cpp<br />
kstars/ekos/focus/focus.ui<br />
kstars/fitsviewer/fitsdata.cpp<br />
kstars/fitsviewer/fitsview.cpp<br />
kstars/fitsviewer/fitsview.h</div></div></div><br /><div><strong>To: </strong>TallFurryMan, mutlaqja, alexcherney, wreissenberger<br /><strong>Cc: </strong>kde-edu, narvaez, apol<br /></div>