Calculate correct FWHM statistic and draw circles at 1/20 of max
This commit is contained in:
+7
-1
@@ -49,7 +49,7 @@ void drawStars(QImage &img, const std::vector<Star> &stars)
|
||||
painter.setPen(Qt::red);
|
||||
for(auto star : stars)
|
||||
{
|
||||
painter.drawEllipse(QPointF(star.m_x, star.m_y), star.m_sx, star.m_sy);
|
||||
painter.drawEllipse(QPointF(star.m_x, star.m_y), star.hw20X(), star.hw20Y());
|
||||
}
|
||||
img = pix.toImage();
|
||||
}
|
||||
@@ -319,6 +319,8 @@ void LoadRunable::run()
|
||||
|
||||
if(m_analyzeLevel>= Stars)
|
||||
{
|
||||
double fwhmX = 0;
|
||||
double fwhmY = 0;
|
||||
const int radius = 13;
|
||||
StarFit starFit(radius);
|
||||
std::vector<Star> stars;
|
||||
@@ -335,10 +337,14 @@ void LoadRunable::run()
|
||||
//printStarModel(radius, r, star);
|
||||
star.m_x += x;
|
||||
star.m_y += y;
|
||||
fwhmX += star.fwhmX();
|
||||
fwhmY += star.fwhmY();
|
||||
stars.push_back(star);
|
||||
}
|
||||
}
|
||||
drawStars(img, stars);
|
||||
info.append(StringPair(QObject::tr("FWHM X"), QString::number(fwhmX/stars.size())));
|
||||
info.append(StringPair(QObject::tr("FWHM Y"), QString::number(fwhmY/stars.size())));
|
||||
}
|
||||
qDebug() << "Star fit" << timer.restart();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user