33 namespace po = boost::program_options;
44 DetectionImageConfig::DetectionImageConfig(
long manager_id) :
Configuration(manager_id),
45 m_gain(0), m_saturation(0), m_flux_scale(1.0), m_interpolation_gap(0) {
49 return { {
"Detection image", {
51 "Path to a fits format image to be used as detection image."},
53 "Detection image gain in e-/ADU (0 = infinite gain)"},
55 "Detection image flux scale"},
57 "Detection image saturation level (0 = no saturation)"},
59 "Interpolate bad pixels in detection image"},
61 "Maximum number if pixels to interpolate over"}
74 auto fits_image_source = std::make_shared<FitsImageSource<DetectionImage::PixelType>>(
m_detection_image_path);
79 double detection_image_gain = 0, detection_image_saturate = 0;
82 if (img_metadata.count(
"GAIN"))
83 detection_image_gain = boost::get<double>(img_metadata.at(
"GAIN").m_value);
84 if (img_metadata.count(
"SATURATE"))
85 detection_image_saturate = boost::get<double>(img_metadata.at(
"SATURATE").m_value);
90 else if (img_metadata.count(
"FLXSCALE")) {
91 m_flux_scale = boost::get<double>(img_metadata.at(
"FLXSCALE").m_value);
98 m_gain = detection_image_gain;
125 throw Elements::Exception() <<
"getDetectionImage() call on not initialized DetectionImageConfig";
132 throw Elements::Exception() <<
"getCoordinateSystem() call on not initialized DetectionImageConfig";