22#include "SOURCEXTRACTORPLUSPLUS_VERSION.h"
29#if BOOST_VERSION < 107300
30#include <boost/io/detail/quoted_manip.hpp>
32#include <boost/io/quoted.hpp>
51 if (str.
str().size() > 80) {
55 size_t remaining = 80 - str.
str().size();
56 if (comment.
size() < remaining) {
60 str << comment.
substr(0, remaining);
70 quoted_value << boost::io::quoted(value,
'\'',
'\'');
76 if (str.
str().size() > 80) {
80 size_t remaining = 80 - str.
str().size();
81 if (comment.
size() < remaining) {
85 str << comment.
substr(0, remaining);
95 str <<
"Version " << SOURCEXTRACTORPLUSPLUS_VERSION_STRING;
103 strftime(date_str,
sizeof(date_str),
"%Y-%m-%dT%H:%M:%SZ", &now);
104 str <<
"Called at " << date_str;
108 for (
auto& e : entries) {
120 m_rms = detection_frame_info.getBackgroundMedianRms();
121 m_gain = detection_frame_info.getGain();
133 hdu_name <<
"LDAC_OBJECTS_" <<
m_part_nb;
147 imhead_writer->setHduName(hdu_name.
str());
149 imhead_writer->setHduName(
"LDAC_IMHEAD");
156 if (p.second.m_extra.count(
"comment")) {
157 comment = p.second.m_extra.
at(
"comment");
159 if (p.second.m_value.type() ==
typeid(
std::string)) {
160 ldac_imhead.
emplace_back(generateHeader(p.first, boost::get<std::string>(p.second.m_value), comment));
162 ldac_imhead.
emplace_back(generateHeader(p.first, p.second.m_value, comment));
168 ldac_imhead.
emplace_back(generateHeader(
"SPPBKDEV",
m_rms,
"Median background RMS"));
171 generateHistory(ldac_imhead);
FitsWriter & setHduName(const std::string &name)
T emplace_back(T... args)
std::unique_ptr< T > make_unique(Args &&... args)