42 for (
auto& image_info : image_infos) {
44 image_info.m_measurement_image,
45 image_info.m_weight_image,
46 image_info.m_weight_threshold,
47 image_info.m_coordinate_system,
49 image_info.m_saturation_level,
52 auto background_analyzer = background_analyzer_factory.createBackgroundAnalyzer(image_info.m_weight_type);
53 auto background_model = background_analyzer->analyzeBackground(
54 image_info.m_measurement_image,
55 image_info.m_weight_image,
57 image_info.m_measurement_image->getHeight(),
false),
58 measurement_frame->getVarianceThreshold());
60 if (image_info.m_is_background_constant) {
61 measurement_frame->setBackgroundLevel(image_info.m_constant_background_value);
63 measurement_frame->setBackgroundLevel(background_model.getLevelMap(), background_model.getMedianRms());
67 label << boost::filesystem::path(image_info.m_path).stem().string() <<
"_" << image_info.m_image_hdu;
68 measurement_frame->setLabel(label.
str());
70 if (image_info.m_weight_image !=
nullptr) {
71 if (image_info.m_absolute_weight) {
72 measurement_frame->setVarianceMap(image_info.m_weight_image);
75 image_info.m_weight_image,
76 background_model.getScalingFactor());
77 measurement_frame->setVarianceMap(scaled_image);
79 measurement_frame->setVarianceThreshold(image_info.m_weight_threshold*background_model.getScalingFactor());
82 measurement_frame->setVarianceMap(background_model.getVarianceMap());