67 return { {
"Weight image", {
68 {
WEIGHT_IMAGE.c_str(), po::value<std::string>()->default_value(
""),
69 "Path to a fits format image to be used as weight image."},
71 "Is the weight map provided as absolute values or relative to background."},
72 {
WEIGHT_TYPE.c_str(), po::value<std::string>()->default_value(
"none"),
73 "Weight image type [none|background|rms|variance|weight]."},
75 "Weight map scaling factor."},
77 "Threshold for pixels to be considered bad pixels. In same units as weight map."},
79 "Use object symmetry to replace pixels above the weight threshold for photometry."},
117 auto weight_iter = WEIGHT_MAP.
find(weight_type_name);
118 if (weight_iter == WEIGHT_MAP.
end()) {
133 throw Elements::Exception() <<
"Please give an appropriate weight type for image: " << weight_image_filename;
135 throw Elements::Exception() <<
"Please give an appropriate weight type for image: " << weight_image_filename;
137 throw Elements::Exception() <<
"Setting absolute weight but providing *no* weight image does not make sense.";
139 if (weight_image_filename !=
"") {
140 boost::regex hdu_regex(
".*\\[[0-9]*\\]$");
142 for (
int i=0;; i++) {
144 if (boost::regex_match(weight_image_filename, hdu_regex)) {
177 scaled_weight_threshold *= flux_scale * flux_scale;