SourceXtractorPlusPlus  0.14
Please provide a description of the project.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
29 using namespace Euclid::Configuration;
30 namespace po = boost::program_options;
31 
32 namespace SourceXtractor {
33 
34 static const std::string CHECK_MODEL_FITTING { "check-image-model-fitting" };
35 static const std::string CHECK_RESIDUAL { "check-image-residual" };
36 static const std::string CHECK_MODEL_BACKGROUND { "check-image-background" };
37 static const std::string CHECK_MODEL_VARIANCE { "check-image-variance" };
38 static const std::string CHECK_SEGMENTATION { "check-image-segmentation" };
39 static const std::string CHECK_PARTITION { "check-image-partition" };
40 static const std::string CHECK_GROUPING { "check-image-grouping" };
41 static const std::string CHECK_FILTERED { "check-image-filtered" };
42 static const std::string CHECK_THRESHOLDED { "check-image-thresholded" };
43 static const std::string CHECK_SNR { "check-image-snr" };
44 static const std::string CHECK_AUTO_APERTURE { "check-image-auto-aperture" };
45 static const std::string CHECK_APERTURE { "check-image-aperture" };
46 static const std::string CHECK_PSF { "check-image-psf" };
47 
48 static const std::string CHECK_MOFFAT { "debug-image-moffat" };
49 
50 CheckImagesConfig::CheckImagesConfig(long manager_id) :
51  Configuration(manager_id) {}
52 
54  return { {"Check images", {
55  {CHECK_MODEL_FITTING.c_str(), po::value<std::string>()->default_value(""),
56  "Path to save the model fitting check image"},
57  {CHECK_RESIDUAL.c_str(), po::value<std::string>()->default_value(""),
58  "Path to save the model fitting residual check image"},
59  {CHECK_MODEL_BACKGROUND.c_str(), po::value<std::string>()->default_value(""),
60  "Path to save the background check image"},
61  {CHECK_MODEL_VARIANCE.c_str(), po::value<std::string>()->default_value(""),
62  "Path to save the variance check image"},
63  {CHECK_SEGMENTATION.c_str(), po::value<std::string>()->default_value(""),
64  "Path to save the segmentation check image"},
65  {CHECK_PARTITION.c_str(), po::value<std::string>()->default_value(""),
66  "Path to save the partition check image"},
67  {CHECK_GROUPING.c_str(), po::value<std::string>()->default_value(""),
68  "Path to save the grouping check image"},
69  {CHECK_FILTERED.c_str(), po::value<std::string>()->default_value(""),
70  "Path to save the filtered check image"},
71  {CHECK_THRESHOLDED.c_str(), po::value<std::string>()->default_value(""),
72  "Path to save the thresholded check image"},
73  {CHECK_SNR.c_str(), po::value<std::string>()->default_value(""),
74  "Path to save the SNR check image"},
75  {CHECK_AUTO_APERTURE.c_str(), po::value<std::string>()->default_value(""),
76  "Path to save the auto aperture check image"},
77  {CHECK_APERTURE.c_str(), po::value<std::string>()->default_value(""),
78  "Path to save the aperture check image"},
79  {CHECK_PSF.c_str(), po::value<std::string>()->default_value(""),
80  "Path to save the PSF check image"}
81  }}, {"Debug options (Use with caution!)", {
82  {CHECK_MOFFAT.c_str(), po::value<std::string>()->default_value(""),
83  "Path to save the moffat debug image (VERY SLOW)"}
84  }}};
85 }
86 
87 void CheckImagesConfig::initialize(const UserValues& args) {
94  m_group_filename = args.find(CHECK_GROUPING)->second.as<std::string>();
95  m_filtered_filename = args.find(CHECK_FILTERED)->second.as<std::string>();
97  m_snr_filename = args.find(CHECK_SNR)->second.as<std::string>();
99  m_aperture_filename = args.find(CHECK_APERTURE)->second.as<std::string>();
100  m_moffat_filename = args.find(CHECK_MOFFAT)->second.as<std::string>();
101  m_psf_filename = args.find(CHECK_PSF)->second.as<std::string>();
102 }
103 
104 } // SourceXtractor namespace
105 
106 
static const std::string CHECK_PSF
void initialize(const UserValues &args) override
static const std::string CHECK_SEGMENTATION
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
static const std::string CHECK_RESIDUAL
STL class.
static const std::string CHECK_THRESHOLDED
STL class.
static const std::string CHECK_SNR
static const std::string CHECK_MODEL_FITTING
static const std::string CHECK_MODEL_VARIANCE
static const std::string CHECK_MOFFAT
static const std::string CHECK_FILTERED
T find(T...args)
static const std::string CHECK_MODEL_BACKGROUND
static const std::string CHECK_GROUPING
static const std::string CHECK_AUTO_APERTURE
T c_str(T...args)
static const std::string CHECK_PARTITION
static const std::string CHECK_APERTURE