43 const SeFloat KRON_NRADIUS = 3*2.0;
44 const SeFloat CROWD_THRESHOLD_KRON = 0.1;
45 const SeFloat BADAREA_THRESHOLD_KRON = 0.1;
57 const auto& detection_image = detection_frame->getSubtractedImage();
58 const auto& detection_variance = detection_frame->getVarianceMap();
59 const auto& variance_threshold = detection_frame->getVarianceThreshold();
60 const auto& threshold_image = detection_frame->getThresholdedImage();
72 auto ell_aper = std::make_shared<EllipticalAperture>(cxx, cyy, cxy, KRON_NRADIUS);
75 const auto& min_pixel = ell_aper->getMinPixel(centroid_x, centroid_y);
76 const auto& max_pixel = ell_aper->getMaxPixel(centroid_x, centroid_y);
82 NeighbourInfo neighbour_info(min_pixel, max_pixel, pix_list, threshold_image);
92 for (
int pixel_y = min_pixel.m_y; pixel_y <= max_pixel.m_y; pixel_y++) {
93 for (
int pixel_x = min_pixel.m_x; pixel_x <= max_pixel.m_x; pixel_x++) {
98 if (ell_aper->getArea(centroid_x, centroid_y, pixel_x, pixel_y) > 0){
101 if (pixel_x >=0 && pixel_y >=0 && pixel_x < detection_image->getWidth() && pixel_y < detection_image->getHeight()) {
107 pixel_variance = detection_variance ? detection_variance->getValue(pixel_x, pixel_y) : 1;
110 if (pixel_variance < variance_threshold) {
111 value = detection_image->getValue(pixel_x, pixel_y);
126 radius_flux_sum += value*
sqrt(ell_aper->getRadiusSquared(centroid_x, centroid_y, pixel_x, pixel_y));