54 return { {
"Detection image", {
56 "Path to a fits format image to be used as detection image."},
58 "Path to a fits format image to be used as coordinates reference only."},
60 "Detection image gain in e-/ADU (0 = infinite gain)"},
62 "Detection image flux scale"},
64 "Detection image saturation level (0 = no saturation)"},
66 "Interpolate bad pixels in detection image"},
68 "Maximum number if pixels to interpolate over"}
93 throw Elements::Exception() <<
"Either detection or reference image can be provided, not both";
98 boost::regex hdu_regex(
".*\\[[0-9]*\\]$");
100 for (
int i=0;; i++) {
130 double detection_image_gain = 0, detection_image_saturate = 0;
131 auto img_metadata = fits_image_source->getMetadata();
133 if (img_metadata.count(
"GAIN")){
135 if (
double* double_gain = boost::get<double>(&img_metadata.at(
"GAIN").m_value)){
136 detection_image_gain = *double_gain;
137 }
else if (
int64_t *int64_gain = boost::get<int64_t>(&img_metadata.at(
"GAIN").m_value)){
138 detection_image_gain = (double) *int64_gain;
145 if (img_metadata.count(
"SATURATE")){
147 if (
double* double_saturate = boost::get<double>(&img_metadata.at(
"SATURATE").m_value)){
148 detection_image_saturate = *double_saturate;
149 }
else if (
int64_t *int64_saturate = boost::get<int64_t>(&img_metadata.at(
"SATURATE").m_value)){
150 detection_image_saturate = (double) *int64_saturate;
160 else if (img_metadata.count(
"FLXSCALE")) {
162 if (
double* f_scale = boost::get<double>(&img_metadata.at(
"FLXSCALE").m_value)){
164 }
else if (
int64_t *int64_f_scale = boost::get<int64_t>(&img_metadata.at(
"FLXSCALE").m_value)){
176 extension.
m_gain = detection_image_gain;