SourceXtractorPlusPlus  0.10
Please provide a description of the project.
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_MOFFAT { "check-image-moffat" };
47 static const std::string CHECK_PSF { "check-image-psf" };
48 
49 CheckImagesConfig::CheckImagesConfig(long manager_id) :
50  Configuration(manager_id) {}
51 
53  return { {"Check images", {
54  {CHECK_MODEL_FITTING.c_str(), po::value<std::string>()->default_value(""),
55  "Path to save the model fitting check image"},
56  {CHECK_RESIDUAL.c_str(), po::value<std::string>()->default_value(""),
57  "Path to save the model fitting residual check image"},
58  {CHECK_MODEL_BACKGROUND.c_str(), po::value<std::string>()->default_value(""),
59  "Path to save the background check image"},
60  {CHECK_MODEL_VARIANCE.c_str(), po::value<std::string>()->default_value(""),
61  "Path to save the variance check image"},
62  {CHECK_SEGMENTATION.c_str(), po::value<std::string>()->default_value(""),
63  "Path to save the segmentation check image"},
64  {CHECK_PARTITION.c_str(), po::value<std::string>()->default_value(""),
65  "Path to save the partition check image"},
66  {CHECK_GROUPING.c_str(), po::value<std::string>()->default_value(""),
67  "Path to save the grouping check image"},
68  {CHECK_FILTERED.c_str(), po::value<std::string>()->default_value(""),
69  "Path to save the filtered check image"},
70  {CHECK_THRESHOLDED.c_str(), po::value<std::string>()->default_value(""),
71  "Path to save the thresholded check image"},
72  {CHECK_SNR.c_str(), po::value<std::string>()->default_value(""),
73  "Path to save the SNR check image"},
74  {CHECK_AUTO_APERTURE.c_str(), po::value<std::string>()->default_value(""),
75  "Path to save the auto aperture check image"},
76  {CHECK_APERTURE.c_str(), po::value<std::string>()->default_value(""),
77  "Path to save the aperture check image"},
78  {CHECK_MOFFAT.c_str(), po::value<std::string>()->default_value(""),
79  "Path to save the moffat check image"},
80  {CHECK_PSF.c_str(), po::value<std::string>()->default_value(""),
81  "Path to save the PSF check image"},
82  }}};
83 }
84 
92  m_group_filename = args.find(CHECK_GROUPING)->second.as<std::string>();
93  m_filtered_filename = args.find(CHECK_FILTERED)->second.as<std::string>();
95  m_snr_filename = args.find(CHECK_SNR)->second.as<std::string>();
97  m_aperture_filename = args.find(CHECK_APERTURE)->second.as<std::string>();
98  m_moffat_filename = args.find(CHECK_MOFFAT)->second.as<std::string>();
99  m_psf_filename = args.find(CHECK_PSF)->second.as<std::string>();
100 }
101 
102 } // SourceXtractor namespace
103 
104 
CheckImagesConfig.h
SourceXtractor::CheckImagesConfig::m_filtered_filename
std::string m_filtered_filename
Definition: CheckImagesConfig.h:109
SourceXtractor::CheckImagesConfig::m_model_fitting_residual_filename
std::string m_model_fitting_residual_filename
Definition: CheckImagesConfig.h:103
std::string
STL class.
SourceXtractor::CheckImagesConfig::m_snr_filename
std::string m_snr_filename
Definition: CheckImagesConfig.h:111
std::map::find
T find(T... args)
SourceXtractor::CHECK_PARTITION
static const std::string CHECK_PARTITION
Definition: CheckImagesConfig.cpp:39
SourceXtractor::CheckImagesConfig::m_model_variance_filename
std::string m_model_variance_filename
Definition: CheckImagesConfig.h:105
SourceXtractor::CheckImagesConfig::m_segmentation_filename
std::string m_segmentation_filename
Definition: CheckImagesConfig.h:106
SourceXtractor::CHECK_FILTERED
static const std::string CHECK_FILTERED
Definition: CheckImagesConfig.cpp:41
SourceXtractor::CheckImagesConfig::m_psf_filename
std::string m_psf_filename
Definition: CheckImagesConfig.h:115
SourceXtractor::CHECK_APERTURE
static const std::string CHECK_APERTURE
Definition: CheckImagesConfig.cpp:45
SourceXtractor::CheckImagesConfig::m_moffat_filename
std::string m_moffat_filename
Definition: CheckImagesConfig.h:114
Euclid::Configuration
SourceXtractor::CHECK_SNR
static const std::string CHECK_SNR
Definition: CheckImagesConfig.cpp:43
SourceXtractor::CheckImagesConfig::m_group_filename
std::string m_group_filename
Definition: CheckImagesConfig.h:108
SourceXtractor::CheckImagesConfig::getProgramOptions
std::map< std::string, Configuration::OptionDescriptionList > getProgramOptions() override
Definition: CheckImagesConfig.cpp:52
SourceXtractor
Definition: Aperture.h:30
SourceXtractor::CHECK_MODEL_BACKGROUND
static const std::string CHECK_MODEL_BACKGROUND
Definition: CheckImagesConfig.cpp:36
SourceXtractor::CHECK_PSF
static const std::string CHECK_PSF
Definition: CheckImagesConfig.cpp:47
SourceXtractor::CHECK_AUTO_APERTURE
static const std::string CHECK_AUTO_APERTURE
Definition: CheckImagesConfig.cpp:44
SourceXtractor::CHECK_GROUPING
static const std::string CHECK_GROUPING
Definition: CheckImagesConfig.cpp:40
std::string::c_str
T c_str(T... args)
SourceXtractor::CHECK_SEGMENTATION
static const std::string CHECK_SEGMENTATION
Definition: CheckImagesConfig.cpp:38
SourceXtractor::CheckImagesConfig::m_thresholded_filename
std::string m_thresholded_filename
Definition: CheckImagesConfig.h:110
SourceXtractor::CheckImagesConfig::m_aperture_filename
std::string m_aperture_filename
Definition: CheckImagesConfig.h:113
SourceXtractor::CHECK_MODEL_VARIANCE
static const std::string CHECK_MODEL_VARIANCE
Definition: CheckImagesConfig.cpp:37
std::map
STL class.
SourceXtractor::CheckImagesConfig::initialize
void initialize(const UserValues &args) override
Definition: CheckImagesConfig.cpp:85
SourceXtractor::CheckImagesConfig::m_model_fitting_filename
std::string m_model_fitting_filename
Definition: CheckImagesConfig.h:102
SourceXtractor::CHECK_RESIDUAL
static const std::string CHECK_RESIDUAL
Definition: CheckImagesConfig.cpp:35
SourceXtractor::CheckImagesConfig::m_model_background_filename
std::string m_model_background_filename
Definition: CheckImagesConfig.h:104
SourceXtractor::CHECK_MODEL_FITTING
static const std::string CHECK_MODEL_FITTING
Definition: CheckImagesConfig.cpp:34
SourceXtractor::CheckImagesConfig::m_partition_filename
std::string m_partition_filename
Definition: CheckImagesConfig.h:107
SourceXtractor::CheckImagesConfig::m_auto_aperture_filename
std::string m_auto_aperture_filename
Definition: CheckImagesConfig.h:112
Euclid::Configuration::Configuration
SourceXtractor::CHECK_THRESHOLDED
static const std::string CHECK_THRESHOLDED
Definition: CheckImagesConfig.cpp:42
SourceXtractor::CHECK_MOFFAT
static const std::string CHECK_MOFFAT
Definition: CheckImagesConfig.cpp:46