summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-17 17:56:09 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-08-17 17:56:09 (GMT)
commitcb070e1a77b6a0aa16542cfa3d124befad222c9e (patch)
treea0694ddd51364a6938c7ef3e1e98814a32c6e5e6
parent7eb464868d3603d011675263ca84c446b2ae2d74 (diff)
Remove fail criteria and reduce the threshold a bit. This perhaps needs to be configurable
-rw-r--r--kstars/fitsviewer/fitsdata.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/kstars/fitsviewer/fitsdata.cpp b/kstars/fitsviewer/fitsdata.cpp
index 84bd5d1..7f4064b 100644
--- a/kstars/fitsviewer/fitsdata.cpp
+++ b/kstars/fitsviewer/fitsdata.cpp
@@ -563,7 +563,8 @@ int FITSData::findOneStar(const QRectF &boundary)
float massX=0, massY=0, totalMass=0;
- double threshold = stats.mean[0] * 1.40;
+ // TODO replace magic number with something more useful to understand
+ double threshold = stats.mean[0] * 1.3;
for (int y=subY; y < subH; y++)
{
@@ -599,7 +600,7 @@ int FITSData::findOneStar(const QRectF &boundary)
{
for (int r=maxR; r > 1; r--)
{
- int pass=0, fail=0;
+ int pass=0;
for (float theta=0; theta < 2*M_PI; theta += (2*M_PI)/10.0)
{
@@ -612,8 +613,6 @@ int FITSData::findOneStar(const QRectF &boundary)
if (image_buffer[testX + testY * stats.width] > running_threshold)
pass++;
- else if (fail++ > 3)
- break;
}
qDebug() << "Testing for radius " << r << " passes # " << pass << " @ threshold " << running_threshold;