LSSTApplications
19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
22 #ifndef ASTSHIM_FITSCHAN_H
23 #define ASTSHIM_FITSCHAN_H
697 bool overwrite =
false) {
699 astSetFitsCF(
getRawPtr(),
name.c_str(),
reinterpret_cast<double(&)[2]
>(value), comment.c_str(),
757 bool overwrite =
false) {
787 bool overwrite =
false) {
788 astSetFitsF(
getRawPtr(),
name.c_str(), value, comment.c_str(), overwrite);
817 bool overwrite =
false) {
818 astSetFitsI(
getRawPtr(),
name.c_str(), value, comment.c_str(), overwrite);
847 bool overwrite =
false) {
848 astSetFitsL(
getRawPtr(),
name.c_str(), value, comment.c_str(), overwrite);
885 bool overwrite =
false) {
916 astSetFitsU(
getRawPtr(),
name.c_str(), comment.c_str(), overwrite);
1039 auto *rawKeyMap =
reinterpret_cast<AstObject *
>(astGetTables(
getRawPtr()));
1044 return Object::fromAstObject<KeyMap>(rawKeyMap,
true);
1051 explicit FitsChan(AstFitsChan *rawFitsChan) :
Channel(reinterpret_cast<AstChannel *>(rawFitsChan)) {
1054 os <<
"this is a " <<
getClassName() <<
", which is not a FitsChan";
std::shared_ptr< KeyMap > getTables() const
FitsChan & operator=(FitsChan &&)=default
std::string getFitsAxisOrder() const
Get FitsAxisOrder: the order for the WCS axes in any new FITS-WCS headers created using Channel::writ...
FitsChan & operator=(FitsChan const &)=delete
FoundValue< std::string > getFitsCN(std::string const &name="", std::string defval="") const
Get the value of a CONTINUE card.
FitsChan(AstFitsChan *rawFitsChan)
Construct a FitsChan from a raw AstFitsChan.
@ NOVALUE
keyword is present, but has no value
void setDefB1950(bool defB1950)
Set DefB1950: use FK4 B1950 as default equatorial coordinates?
bool getB(std::string const &attrib) const
Get the value of an attribute as a bool.
T value
The found value; ignore if found is false.
void setD(std::string const &attrib, double value)
Set the value of an attribute as a double.
void purgeWcs()
Delete all cards in a FitsChan that relate to any of the recognised WCS encodings.
void setIwc(bool iwcs)
Set Iwc: add a Frame describing Intermediate World Coords?
void setSipReplace(bool replace)
Set SipReplace: ignore inverse SIP coefficients (replacing them with fit coefficients or an iterative...
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
void setB(std::string const &attrib, bool value)
Set the value of an attribute as a bool.
void emptyFits()
Delete all cards and associated information from a FitsChan.
A value and associated validity flag.
void setCarLin(bool cdMatrix)
Set CarLin: ignore spherical rotations on CAR projections?
void setPolyTan(int polytan)
Set PolyTan: use PVi_m keywords to define distorted TAN projection?
std::string getCardComm() const
Get CardComm: the comment of the current card.
void setFitsU(std::string const &name, std::string const &comment="", bool overwrite=false)
Create a new card with an undefined value, possibly overwriting the current card.
FoundValue< std::string > findFits(std::string const &name, bool inc)
Search for a card in a FitsChan by keyword.
double getFitsTol() const
Get FitsTol: Tolerance used for writing a FrameSet using a foreign encoding.
A specialized form of Channel which reads and writes FITS header cards.
CardType getCardType() const
Get CardType: data type of the current FITS card.
std::string getCardName() const
Get CardName: the keyword name of the current card.
FoundValue(bool found, T const &value)
Construct a FoundValue.
void setFitsCF(std::string const &name, std::complex< double > value, std::string const &comment="", bool overwrite=false)
Create a new card of type std::complex<double>, possibly overwriting the current card.
void clear(std::string const &attrib)
Clear the values of a specified set of attributes for an Object.
std::vector< std::string > getAllCardNames()
Get the name of all cards, in order, starting from the first card.
int getNCard() const
Get NCard: the number of cards.
bool getCDMatrix() const
Get CDMatrix: use CDi_j keywords to represent pixel scaling, rotation, etc?
void retainFits()
Keep the current card when an Object is read that uses the card.
FitsChan(Stream &stream, std::string const &options="")
Construct a channel that uses a provided Stream.
void setCard(int ind)
Set Card: the index of the current card, where 1 is the first card.
FitsChan(FitsChan &&)=default
Channel provides input/output of AST objects.
@ NOTYPE
card does not exist (card number invalid)
A stream for ast::Channel.
FoundValue< std::complex< double > > getFitsCF(std::string const &name="", std::complex< double > defval={0, 0}) const
Get the value of a complex double card.
KeyMap warnings() const
Return a KeyMap holding the text of any warnings issued as a result of the previous invocation of rea...
std::string getClassName() const
Get Class: the name of the class (e.g.
void setFitsI(std::string const &name, int value, std::string const &comment="", bool overwrite=false)
Create a new card of type int, possibly overwriting the current card.
void writeFits()
Write out all cards currently in the channel and clear the channel.
void setTabOK(int tabOK)
Set TabOK: should the FITS "-TAB" algorithm be recognised?
bool getCarLin() const
Get CarLin: ignore spherical rotations on CAR projections?
int getNKey() const
Get Nkey: the number of unique keywords.
FoundValue< int > getFitsI(std::string const &name="", int defval=0) const
Get the value of a int card.
int getI(std::string const &attrib) const
Get the value of an attribute as an int.
void setFitsDigits(int digits)
Set FitsDigits: digits of precision for floating-point FITS values.
FitsKeyState testFits(std::string const &name="") const
Determine if a card is present, and if so, whether it has a value.
bool getClean() const
Get Clean: remove cards used whilst reading even if an error occurs?
void setFitsF(std::string const &name, double value, std::string const &comment="", bool overwrite=false)
Create a new card of type double, possibly overwriting the current card.
CardType
Enums describing the FITS card type.
bool getSipReplace() const
Get SipReplace: ignore inverse SIP coefficients (replacing them with fit coefficients or an iterative...
FoundValue< std::string > getFitsS(std::string const &name="", std::string defval="") const
Get the value of a string card.
bool found
Was the value found?
@ COMPLEXF
complex floating point
bool getDefB1950() const
Get DefB1950: use FK4 B1950 as default equatorial coordinates?
FoundValue()
Default constructor: found false, value is default-constructed.
void putFits(std::string const &card, bool overwrite)
Store a FITS header card in a FitsChan.
void setFitsS(std::string const &name, std::string value, std::string const &comment="", bool overwrite=false)
Create a new card of type string, possibly overwriting the current card.
void setFitsAxisOrder(std::string const &order)
Set FitsAxisOrder: the order for the WCS axes in any new FITS-WCS headers created using Channel::writ...
@ COMPLEXI
complex integer
void delFits()
Delete the current FITS card.
void setFitsCM(std::string const &comment, bool overwrite=false)
Create a new comment card, possibly overwriting the current card.
void setClean(bool clean)
Set Clean: remove cards used whilst reading even if an error occurs?
void setWarnings(std::string const &warnings)
Set Warnings attribute, which controls the issuing of warnings about selected conditions when an Obje...
AST wrapper classes and functions.
std::string getEncoding() const
Get Encoding: the encoding system to use when AST Objects are stored as FITS header cards in a FitsCh...
double getD(std::string const &attrib) const
Get the value of an attribute as a double.
std::string getWarnings() const
Get Warnings attribute, which controls the issuing of warnings about selected conditions when an Obje...
void setC(std::string const &attrib, std::string const &value)
Set the value of an attribute as a string.
FoundValue< double > getFitsF(std::string const &name="", double defval=0) const
Get the value of a double card.
void putCards(std::string const &cards)
Replace all FITS header cards.
void readFits()
Read cards from the source and store them in the FitsChan.
void setEncoding(std::string const &encoding)
Set Encoding: the encoding system to use when AST Objects are stored as FITS header cards in a FitsCh...
void setI(std::string const &attrib, int value)
Set the value of an attribute as an int.
std::string const getC(std::string const &attrib) const
Get the value of an attribute as a string.
std::string getAllWarnings() const
Get AllWarnings: a space separated list of all the conditions names recognized by the Warnings attrib...
void showFits() const
Write all the cards in the channel to standard output.
int getCard() const
Get Card: the index of the current card, where 1 is the first card.
void setCDMatrix(bool cdMatrix)
Get CDMatrix: Use CDi_j keywords to represent pixel scaling, rotation, etc?
AstObject const * getRawPtr() const
Get the raw AST pointer.
void setFitsL(std::string const &name, bool value, std::string const &comment="", bool overwrite=false)
Create a new card of type bool, possibly overwriting the current card.
int getTabOK() const
Get TabOK: should the FITS "-TAB" algorithm be recognised?
FitsChan(FitsChan const &)=delete
FitsKeyState
Enums describing the presence or absence of a FITS keyword.
void setSipOK(bool sipOK)
Set SipOK: use Spitzer Space Telescope keywords to define distortion?
bool getSipOK() const
Get SipOK: use Spitzer Space Telescope keywords to define distortion?
int getFitsDigits() const
Get FitsDigits: digits of precision for floating-point FITS values.
int getPolyTan() const
Get PolyTan: use PVi_m keywords to define distorted TAN projection?
void setFitsCN(std::string const &name, std::string value, std::string const &comment="", bool overwrite=false)
Create a new "CONTINUE" card, possibly overwriting the current card.
@ PRESENT
keyword is present and has a value
FoundValue< bool > getFitsL(std::string const &name="", bool defval=false) const
Get the value of a bool card.
void clearCard()
Rewind the card index to the beginning.
void setFitsTol(double tol)
Set FitsTol: Tolerance used for writing a FrameSet using a foreign encoding.
@ COMMENT
card is a comment-style card with no "=" (COMMENT, HISTORY, ...)
@ ABSENT
keyword is not present
bool getIwc() const
Get Iwc: add a Frame describing Intermediate World Coords?