SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
CheckImagesConfig.cpp
Go to the documentation of this file.
1
17/*
18 * CheckImagesConfig.cpp
19 *
20 * Created on: May 29, 2017
21 * Author: mschefer
22 */
23
24#include <string>
25#include <boost/program_options.hpp>
26
28
29using namespace Euclid::Configuration;
30namespace po = boost::program_options;
31
32namespace SourceXtractor {
33
34static const std::string CHECK_MODEL_FITTING { "check-image-model-fitting" };
35static const std::string CHECK_RESIDUAL { "check-image-residual" };
36static const std::string CHECK_BACKGROUND { "check-image-background" };
37static const std::string CHECK_VARIANCE { "check-image-variance" };
38static const std::string CHECK_SEGMENTATION { "check-image-segmentation" };
39static const std::string CHECK_PARTITION { "check-image-partition" };
40static const std::string CHECK_GROUPING { "check-image-grouping" };
41static const std::string CHECK_FILTERED { "check-image-filtered" };
42static const std::string CHECK_THRESHOLDED { "check-image-thresholded" };
43static const std::string CHECK_SNR { "check-image-snr" };
44static const std::string CHECK_AUTO_APERTURE { "check-image-auto-aperture" };
45static const std::string CHECK_APERTURE { "check-image-aperture" };
46static const std::string CHECK_PSF { "check-image-psf" };
47static const std::string CHECK_ML_DETECTION { "check-image-ml-detection" };
48static const std::string CHECK_MEASUREMENT_BACKGROUND { "check-image-measurement-background" };
49static const std::string CHECK_MEASUREMENT_VARIANCE { "check-image-measurement-variance" };
50static const std::string CHECK_FITTING_WINDOW { "check-image-fitting-window" };
51
52static const std::string CHECK_MOFFAT { "debug-image-moffat" };
53
55 Configuration(manager_id) {}
56
58 return { {"Check images", {
59 {CHECK_MODEL_FITTING.c_str(), po::value<std::string>()->default_value(""),
60 "Path to save the model fitting check image"},
61 {CHECK_RESIDUAL.c_str(), po::value<std::string>()->default_value(""),
62 "Path to save the model fitting residual check image"},
63 {CHECK_BACKGROUND.c_str(), po::value<std::string>()->default_value(""),
64 "Path to save the background check image"},
65 {CHECK_VARIANCE.c_str(), po::value<std::string>()->default_value(""),
66 "Path to save the variance check image"},
67 {CHECK_SEGMENTATION.c_str(), po::value<std::string>()->default_value(""),
68 "Path to save the segmentation check image"},
69 {CHECK_MEASUREMENT_BACKGROUND.c_str(), po::value<std::string>()->default_value(""),
70 "Path to save the background check images for measurement images"},
71 {CHECK_MEASUREMENT_VARIANCE.c_str(), po::value<std::string>()->default_value(""),
72 "Path to save the variance check images for measurement images"},
73 {CHECK_PARTITION.c_str(), po::value<std::string>()->default_value(""),
74 "Path to save the partition check image"},
75 {CHECK_GROUPING.c_str(), po::value<std::string>()->default_value(""),
76 "Path to save the grouping check image"},
77 {CHECK_FILTERED.c_str(), po::value<std::string>()->default_value(""),
78 "Path to save the filtered check image"},
79 {CHECK_THRESHOLDED.c_str(), po::value<std::string>()->default_value(""),
80 "Path to save the thresholded check image"},
81 {CHECK_SNR.c_str(), po::value<std::string>()->default_value(""),
82 "Path to save the SNR check image"},
83 {CHECK_AUTO_APERTURE.c_str(), po::value<std::string>()->default_value(""),
84 "Path to save the auto aperture check image"},
85 {CHECK_APERTURE.c_str(), po::value<std::string>()->default_value(""),
86 "Path to save the aperture check image"},
87 {CHECK_PSF.c_str(), po::value<std::string>()->default_value(""),
88 "Path to save the PSF check image"},
89 {CHECK_ML_DETECTION.c_str(), po::value<std::string>()->default_value(""),
90 "Path to save the ML detection check images"}
91 }}, {"Debug options (Use with caution!)", {
92 {CHECK_MOFFAT.c_str(), po::value<std::string>()->default_value(""),
93 "Path to save the moffat debug image (VERY SLOW)"},
94 {CHECK_FITTING_WINDOW.c_str(), po::value<std::string>()->default_value(""),
95 "Path to save the model fitting window check image"}
96 }}};
97}
98
108 m_group_filename = args.find(CHECK_GROUPING)->second.as<std::string>();
111 m_snr_filename = args.find(CHECK_SNR)->second.as<std::string>();
114 m_moffat_filename = args.find(CHECK_MOFFAT)->second.as<std::string>();
115 m_psf_filename = args.find(CHECK_PSF)->second.as<std::string>();
118}
119
120} // SourceXtractor namespace
121
122
std::map< std::string, boost::program_options::variable_value > UserValues
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
void initialize(const UserValues &args) override
T find(T... args)
static const std::string CHECK_FITTING_WINDOW
static const std::string CHECK_MODEL_FITTING
static const std::string CHECK_PSF
static const std::string CHECK_MEASUREMENT_BACKGROUND
static const std::string CHECK_AUTO_APERTURE
static const std::string CHECK_MOFFAT
static const std::string CHECK_SNR
static const std::string CHECK_PARTITION
static const std::string CHECK_MEASUREMENT_VARIANCE
static const std::string CHECK_BACKGROUND
static const std::string CHECK_ML_DETECTION
static const std::string CHECK_VARIANCE
static const std::string CHECK_THRESHOLDED
static const std::string CHECK_SEGMENTATION
static const std::string CHECK_APERTURE
static const std::string CHECK_FILTERED
static const std::string CHECK_GROUPING
static const std::string CHECK_RESIDUAL