23 #include "SOURCEXTRACTORPLUSPLUS_VERSION.h"
25 #if BOOST_VERSION < 107300
26 #include <boost/io/detail/quoted_manip.hpp>
28 #include <boost/io/quoted.hpp>
31 namespace SourceXtractor {
35 using namespace Euclid::Table;
39 : m_config_manager(manager), m_filename(filename), m_rms(0) {
44 throw Elements::Exception() <<
"Can not add comments once the output table has been initialized";
56 m_rms = detection_frame.getFrame()->getBackgroundMedianRms();
67 size_t remaining = 80 - str.
str().size();
70 if (str.
str().size() != 80) {
81 quoted_value << boost::io::quoted(value,
'\'',
'\'');
87 size_t remaining = 80 - str.
str().size();
88 str << comment <<
std::string(remaining-comment.size(),
' ');
90 if (str.
str().size() != 80) {
101 str <<
"Version " << SOURCEXTRACTORPLUSPLUS_VERSION_STRING;
109 strftime(date_str,
sizeof(date_str),
"%Y-%m-%dT%H:%M:%SZ", &now);
110 str <<
"Called at " << date_str;
114 for (
auto&
e : entries) {
123 auto imhead_writer = Euclid::make_unique<FitsWriter>(
m_filename,
true);
124 imhead_writer->setHduName(
"LDAC_IMHEAD");
128 auto img_source = detection_image_config.getImageSource();
129 auto img_metadata = img_source->getMetadata();
130 for (
const auto &p : img_metadata) {
132 if (p.second.m_extra.count(
"comment"))
133 comment = p.second.m_extra.
at(
"comment");
134 if (p.second.m_value.type() ==
typeid(
std::string))
141 auto gain = detection_image_config.getGain();
156 for (
const auto& header : ldac_imhead) {
std::unique_ptr< T > make_unique(Args &&...args)