|
ifw-daq
1.0.0
IFW Data Acquisition modules
|
Classes | |
| struct | BasicKeyword |
| A type safe version of FormattedKeyword that consist of the three basic components of a FITS keyword keyword record: name, value and optional comment. More... | |
| struct | BasicKeywordBase |
| Non template base class that is purely used to avoid type-deduction issues of ValueType. More... | |
| class | CfitsioError |
| Represents errors from cfitsio. More... | |
| struct | EsoKeywordTraits |
| struct | ValueKeywordTraits |
Typedefs | |
| using | UniqueFitsFile = std::unique_ptr< fitsfile, void(*)(fitsfile *) noexcept > |
| Defines unique ownership type to cfitsio fitsfile. More... | |
| using | ValueKeyword = BasicKeyword< ValueKeywordTraits > |
| Standard FITS value keyword. More... | |
| using | EsoKeyword = BasicKeyword< EsoKeywordTraits > |
| ESO hiearchical keyword. More... | |
| using | KeywordVariant = std::variant< ValueKeyword, EsoKeyword > |
| The different variants of keywords that are supported. More... | |
| using | KeywordVector = std::vector< KeywordVariant > |
| Vector of keywords. More... | |
Functions | |
| void | DefaultClose (fitsfile *ptr) noexcept |
| Default close function that is used by UniqueFitsFile as a deleter. More... | |
| void | InitPrimaryHduNoImage (fitsfile *ptr) |
| Initializes an empty FITS file with a primary HDU. More... | |
| UniqueFitsFile | CreateEmpty (char const *filename) |
Creates empty FITS file using fits_create_file and returns a pointer with a deleter that will close the file. More... | |
| std::vector< KeywordVariant > | ParseJsonKeywords (char const *keywords) |
| Parse and return FITS keywords. More... | |
| std::vector< KeywordVariant > | ParseJsonKeywords (nlohmann::json const &keywords) |
| Parse and return FITS keywords. More... | |
| constexpr bool | operator< (ValueKeyword const &, EsoKeyword const &) noexcept |
| EsoKeyword is sorted after ValueKeyword. More... | |
| constexpr bool | operator< (EsoKeyword const &, ValueKeyword const &) noexcept |
| EsoKeyword is sorted after ValueKeyword. More... | |
| template<class Trait > | |
| std::ostream & | operator<< (std::ostream &os, BasicKeyword< Trait > const &kw) |
| template<class Trait > | |
| std::ostream & | operator<< (std::ostream &os, BasicKeywordBase::ValueType const &kw) |
| std::ostream & | operator<< (std::ostream &os, KeywordVariant const &kw) |
| Ostream formatting of keywords. More... | |
| bool | NameEquals (KeywordVariant const &lhs, KeywordVariant const &rhs) noexcept |
| Compare keyword names of keyword of the same type. More... | |
| void | UpdateKeywords (KeywordVector &to, KeywordVector const &from) |
| Updates a with keywords from b. More... | |
| template std::ostream & | operator<<<EsoKeywordTraits > (std::ostream &os, BasicKeyword< EsoKeywordTraits > const &kw) |
| template std::ostream & | operator<<<ValueKeywordTraits > (std::ostream &os, BasicKeyword< ValueKeywordTraits > const &kw) |
| struct daq::fits::EsoKeywordTraits |
Definition at line 85 of file keyword.hpp.
| struct daq::fits::ValueKeywordTraits |
Definition at line 84 of file keyword.hpp.
| using daq::fits::EsoKeyword = typedef BasicKeyword<EsoKeywordTraits> |
ESO hiearchical keyword.
Definition at line 99 of file keyword.hpp.
| using daq::fits::KeywordVariant = typedef std::variant<ValueKeyword, EsoKeyword> |
The different variants of keywords that are supported.
Definition at line 131 of file keyword.hpp.
| using daq::fits::KeywordVector = typedef std::vector<KeywordVariant> |
Vector of keywords.
Definition at line 138 of file keyword.hpp.
| using daq::fits::UniqueFitsFile = typedef std::unique_ptr<fitsfile, void (*)(fitsfile*) noexcept> |
Defines unique ownership type to cfitsio fitsfile.
Definition at line 46 of file cfitsio.hpp.
| using daq::fits::ValueKeyword = typedef BasicKeyword<ValueKeywordTraits> |
Standard FITS value keyword.
Definition at line 92 of file keyword.hpp.
| UniqueFitsFile daq::fits::CreateEmpty | ( | char const * | filename | ) |
Creates empty FITS file using fits_create_file and returns a pointer with a deleter that will close the file.
Definition at line 79 of file cfitsio.cpp.
|
noexcept |
Default close function that is used by UniqueFitsFile as a deleter.
Definition at line 23 of file cfitsio.cpp.
| void daq::fits::InitPrimaryHduNoImage | ( | fitsfile * | ptr | ) |
Initializes an empty FITS file with a primary HDU.
Mandatory keywords are set and primary HDU added if necessary.
Mandatory keywords are initialized as:
| ptr | Valid FITS file. |
| CfitsioError | on error. |
Definition at line 35 of file cfitsio.cpp.
|
noexcept |
Compare keyword names of keyword of the same type.
Comparing names only is useful to e.g. look up keyword by name, to modify it.
| lhs | value to compare |
| rhs | value to compare |
Definition at line 73 of file keyword.cpp.
|
constexprnoexcept |
EsoKeyword is sorted after ValueKeyword.
Definition at line 115 of file keyword.hpp.
|
constexprnoexcept |
EsoKeyword is sorted after ValueKeyword.
Definition at line 106 of file keyword.hpp.
| std::ostream & daq::fits::operator<< | ( | std::ostream & | os, |
| BasicKeyword< Trait > const & | kw | ||
| ) |
Definition at line 101 of file keyword.cpp.
| std::ostream & daq::fits::operator<< | ( | std::ostream & | os, |
| BasicKeywordBase::ValueType const & | kw | ||
| ) |
Definition at line 84 of file keyword.cpp.
| std::ostream & daq::fits::operator<< | ( | std::ostream & | os, |
| KeywordVariant const & | kw | ||
| ) |
Ostream formatting of keywords.
Definition at line 111 of file keyword.cpp.
| template std::ostream& daq::fits::operator<<<EsoKeywordTraits > | ( | std::ostream & | os, |
| BasicKeyword< EsoKeywordTraits > const & | kw | ||
| ) |
| template std::ostream& daq::fits::operator<<<ValueKeywordTraits > | ( | std::ostream & | os, |
| BasicKeyword< ValueKeywordTraits > const & | kw | ||
| ) |
| std::vector< KeywordVariant > daq::fits::ParseJsonKeywords | ( | char const * | keywords | ) |
Parse and return FITS keywords.
Example string:
| keywords | JSON encoded string of keywords |
| std::invalid_argument | on schema validation error. |
| nlohmann::json::exception | on JSON parsing error. |
| std::vector< KeywordVariant > daq::fits::ParseJsonKeywords | ( | nlohmann::json const & | keywords | ) |
| void daq::fits::UpdateKeywords | ( | KeywordVector & | to, |
| KeywordVector const & | from | ||
| ) |
Updates a with keywords from b.
New keywords are inserted at the end. Existing keywords will be updated with new value if keyword type and name is the same.
| to | Keywords to update to. |
| from | Keywords to update from. |
Definition at line 120 of file keyword.cpp.