56 while(it !=
cards.end())
58 cardMap.insert(std::pair<std::string, headerIterator>(it->keyword(), it));
78 return cardMap.find(keyword)->second;
104 if(keyword ==
"COMMENT" || keyword ==
"HISTORY")
109 it = (
cardMap.find(keyword))->second;
118 if(it->keyword() ==
"COMMENT" || it->keyword() ==
"HISTORY")
120 while(mit->second->keyword() == it->keyword() && it->comment() != mit->second->comment()) ++mit;
136 if(it->keyword() ==
"SIMPLE" || it->keyword() ==
"BITPIX" || it->keyword() ==
"NAXIS"
137 || it->keyword() ==
"NAXIS1" || it->keyword() ==
"NAXIS2" || it->keyword() ==
"NAXIS3" || it->keyword() ==
"EXTEND"
138 || it->keyword() ==
"BZERO" || it->keyword() ==
"BSCALE" || it->keyword() ==
"LONGSTRN")
143 if(it->keyword() ==
"COMMENT")
145 if(it->comment().find(
"FITS (Flexible Image") != std::string::npos)
erase(it);
146 else if(it->comment().find(
"and Astrophysics'") != std::string::npos)
erase(it);
149 if(nit ==
end())
break;
161 if(card.
type() != fitsType<fitsCommentType>() && card.
type() != fitsType<fitsHistoryType>())
163 std::cerr <<
"attempt to duplicate keyword: " << card.
keyword() <<
"\n";
169 cards.push_back(card);
174 cardMap.insert( std::pair<std::string, headerIterator>(card.
keyword(), insertedIt) );
182 for(it = head.
begin(); it != head.
end(); ++it)
200 if(card.
type() != fitsType<fitsCommentType>() && card.
type() != fitsType<fitsHistoryType>())
202 std::cerr <<
"attempt to duplicate keyword: " << card.
keyword() <<
"\n";
211 cardMap.insert(std::pair<std::string, headerIterator>(card.
keyword(), insertedIt));
222 if(card.
type() != fitsType<fitsCommentType>() && card.
type() != fitsType<fitsHistoryType>())
224 std::cerr <<
"attempt to duplicate keyword:" << card.
keyword() <<
"\n";
233 cardMap.insert(std::pair<std::string, headerIterator>(card.
keyword(), insertedIt));
248 it =
cardMap.find(keyword)->second;
258 std::cerr <<
"Fits header card with keyword: " << keyword <<
" not found.\n";
268 const std::string & repoName,
273 std::string hist =
"Git status for " + repoName +
":";
274 head.
append(
"", fitsHistoryType(), hist);
278 if(modified) hist +=
", modified";
280 head.
append(
"", fitsHistoryType(), hist);
constexpr units::realT k()
Boltzmann Constant.
void fitsHeaderGitStatus(fitsHeader &head, const std::string &repoName, const char *sha1, int modified)
Write the status of a Git repository to HISTORY in a FITS header.