22 #include "SOURCEXTRACTORPLUSPLUS_VERSION.h"
29 #if BOOST_VERSION < 107300
30 #include <boost/io/detail/quoted_manip.hpp>
32 #include <boost/io/quoted.hpp>
35 namespace SourceXtractor {
39 using namespace Euclid::Table;
43 : m_config_manager(manager), m_filename(filename), m_rms(0) {
48 throw Elements::Exception() <<
"Can not add comments once the output table has been initialized";
60 m_rms = detection_frame_info.getBackgroundMedianRms();
71 size_t remaining = 80 - str.
str().size();
74 if (str.
str().size() != 80) {
85 quoted_value << boost::io::quoted(value,
'\'',
'\'');
91 size_t remaining = 80 - str.
str().size();
92 str << comment <<
std::string(remaining-comment.size(),
' ');
94 if (str.
str().size() != 80) {
105 str <<
"Version " << SOURCEXTRACTORPLUSPLUS_VERSION_STRING;
113 strftime(date_str,
sizeof(date_str),
"%Y-%m-%dT%H:%M:%SZ", &now);
114 str <<
"Called at " << date_str;
118 for (
auto&
e : entries) {
127 auto imhead_writer = Euclid::make_unique<FitsWriter>(
m_filename,
true);
128 imhead_writer->setHduName(
"LDAC_IMHEAD");
132 auto img_source = detection_image_config.getImageSource();
133 auto img_metadata = img_source->getMetadata();
134 for (
const auto &p : img_metadata) {
136 if (p.second.m_extra.count(
"comment"))
137 comment = p.second.m_extra.
at(
"comment");
138 if (p.second.m_value.type() ==
typeid(
std::string))
145 auto gain = detection_image_config.getGain();
160 for (
const auto& header : ldac_imhead) {
std::unique_ptr< T > make_unique(Args &&...args)