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
FitsChan.h
Go to the documentation of this file.
1 /*
2  * LSST Data Management System
3  * Copyright 2017 AURA/LSST.
4  *
5  * This product includes software developed by the
6  * LSST Project (http://www.lsst.org/).
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the LSST License Statement and
19  * the GNU General Public License along with this program. If not,
20  * see <https://www.lsstcorp.org/LegalNotices/>.
21  */
22 #ifndef ASTSHIM_FITSCHAN_H
23 #define ASTSHIM_FITSCHAN_H
24 
25 #include <complex>
26 #include <string>
27 #include <vector>
28 
29 #include "astshim/base.h"
30 #include "astshim/Object.h"
31 #include "astshim/Stream.h"
32 #include "astshim/Channel.h"
33 #include "astshim/KeyMap.h"
34 
35 namespace ast {
36 
40 enum class FitsKeyState {
41  ABSENT = 0,
42  NOVALUE,
43  PRESENT
44 };
45 
49 enum class CardType {
50  NOTYPE = AST__NOTYPE,
51  COMMENT = AST__COMMENT,
52  INT = AST__INT,
53  FLOAT = AST__FLOAT,
54  STRING = AST__STRING,
55  COMPLEXF = AST__COMPLEXF,
56  COMPLEXI = AST__COMPLEXI,
57  LOGICAL = AST__LOGICAL,
58  CONTINUE = AST__CONTINUE,
59  UNDEF = AST__UNDEF,
60 };
61 
68 template <typename T>
69 class FoundValue {
70 public:
77  FoundValue(bool found, T const &value) : found(found), value(value) {}
78 
80  FoundValue() : found(false), value() {}
81  bool found;
82  T value;
83 };
84 
202 class FitsChan : public Channel {
203 public:
214  explicit FitsChan(Stream &stream, std::string const &options = "");
215 
216  virtual ~FitsChan();
217 
218  FitsChan(FitsChan const &) = delete;
219  FitsChan(FitsChan &&) = default;
220  FitsChan &operator=(FitsChan const &) = delete;
221  FitsChan &operator=(FitsChan &&) = default;
222 
230  void delFits() {
231  astDelFits(getRawPtr());
232  assertOK();
233  }
234 
244  void emptyFits() {
245  astEmptyFits(getRawPtr());
246  assertOK();
247  }
248 
347 
366  std::complex<double> defval = {0, 0}) const;
367 
387  FoundValue<std::string> getFitsCN(std::string const &name = "", std::string defval = "") const;
388 
406  FoundValue<double> getFitsF(std::string const &name = "", double defval = 0) const;
407 
425  FoundValue<int> getFitsI(std::string const &name = "", int defval = 0) const;
426 
444  FoundValue<bool> getFitsL(std::string const &name = "", bool defval = false) const;
445 
467  FoundValue<std::string> getFitsS(std::string const &name = "", std::string defval = "") const;
468 
476 
481  std::string getAllWarnings() const { return getC("AllWarnings"); }
482 
486  int getCard() const { return getI("Card"); }
487 
491  std::string getCardComm() const { return getC("CardComm"); }
492 
496  std::string getCardName() const { return getC("CardName"); }
497 
501  CardType getCardType() const { return static_cast<CardType>(getI("CardType")); }
502 
506  bool getCarLin() const { return getB("CarLin"); }
507 
512  bool getCDMatrix() const { return getB("CDMatrix"); }
513 
517  bool getClean() const { return getB("Clean"); }
518 
522  bool getDefB1950() const { return getB("DefB1950"); }
523 
528  std::string getEncoding() const { return getC("Encoding"); }
529 
534  std::string getFitsAxisOrder() const { return getC("FitsAxisOrder"); }
535 
540  int getFitsDigits() const { return getI("FitsDigits"); }
541 
545  double getFitsTol() const { return getD("FitsTol"); }
546 
550  bool getIwc() const { return getB("Iwc"); }
551 
555  int getNCard() const { return getI("NCard"); }
556 
560  int getNKey() const { return getI("NKey"); }
561 
565  bool getSipOK() const { return getB("SipOK"); }
566 
571  bool getSipReplace() const { return getB("SipReplace"); }
572 
576  int getTabOK() const { return getI("TabOK"); }
577 
582  int getPolyTan() const { return getI("PolyTan"); }
583 
588  std::string getWarnings() const { return getC("Warnings"); }
589 
595  void purgeWcs() {
596  astPurgeWCS(getRawPtr());
597  assertOK();
598  }
599 
616  void putCards(std::string const &cards) {
617  astPutCards(getRawPtr(), cards.c_str());
618  assertOK();
619  }
620 
644  void putFits(std::string const &card, bool overwrite) {
645  astPutFits(getRawPtr(), card.c_str(), overwrite);
646  assertOK();
647  }
648 
661  void readFits() {
662  astReadFits(getRawPtr());
663  assertOK();
664  }
665 
674  void retainFits() {
675  astRetainFits(getRawPtr());
676  assertOK();
677  }
678 
696  void setFitsCF(std::string const &name, std::complex<double> value, std::string const &comment = "",
697  bool overwrite = false) {
698  // this use of reinterpret_cast is explicitly permitted, for C compatibility
699  astSetFitsCF(getRawPtr(), name.c_str(), reinterpret_cast<double(&)[2]>(value), comment.c_str(),
700  overwrite);
701  assertOK();
702  }
703 
725  void setFitsCM(std::string const &comment, bool overwrite = false) {
726  astSetFitsCM(getRawPtr(), comment.c_str(), overwrite);
727  assertOK();
728  }
729 
756  void setFitsCN(std::string const &name, std::string value, std::string const &comment = "",
757  bool overwrite = false) {
758  astSetFitsCN(getRawPtr(), name.c_str(), value.c_str(), comment.c_str(), overwrite);
759  assertOK();
760  }
761 
786  void setFitsF(std::string const &name, double value, std::string const &comment = "",
787  bool overwrite = false) {
788  astSetFitsF(getRawPtr(), name.c_str(), value, comment.c_str(), overwrite);
789  assertOK();
790  }
791 
816  void setFitsI(std::string const &name, int value, std::string const &comment = "",
817  bool overwrite = false) {
818  astSetFitsI(getRawPtr(), name.c_str(), value, comment.c_str(), overwrite);
819  assertOK();
820  }
821 
846  void setFitsL(std::string const &name, bool value, std::string const &comment = "",
847  bool overwrite = false) {
848  astSetFitsL(getRawPtr(), name.c_str(), value, comment.c_str(), overwrite);
849  assertOK();
850  }
851 
884  void setFitsS(std::string const &name, std::string value, std::string const &comment = "",
885  bool overwrite = false) {
886  astSetFitsS(getRawPtr(), name.c_str(), value.c_str(), comment.c_str(), overwrite);
887  assertOK();
888  }
889 
915  void setFitsU(std::string const &name, std::string const &comment = "", bool overwrite = false) {
916  astSetFitsU(getRawPtr(), name.c_str(), comment.c_str(), overwrite);
917  assertOK();
918  }
919 
923  void setCarLin(bool cdMatrix) { setB("CarLin", cdMatrix); }
924 
929  void setCDMatrix(bool cdMatrix) { setB("CDMatrix", cdMatrix); }
930 
934  void setClean(bool clean) { setB("Clean", clean); }
935 
939  void setDefB1950(bool defB1950) { setB("DefB1950", defB1950); }
940 
945  void setEncoding(std::string const &encoding) { setC("Encoding", encoding); }
946 
951  void setFitsAxisOrder(std::string const &order) { setC("FitsAxisOrder", order); }
952 
957  void setFitsDigits(int digits) { setI("FitsDigits", digits); }
958 
962  void setFitsTol(double tol) { return setD("FitsTol", tol); }
963 
967  void setIwc(bool iwcs) { setB("Iwc", iwcs); }
968 
972  void setSipOK(bool sipOK) { setB("SipOK", sipOK); }
973 
978  void setSipReplace(bool replace) { setB("SipReplace", replace); }
979 
983  void setTabOK(int tabOK) { setI("TabOK", tabOK); }
984 
989  void setPolyTan(int polytan) { setI("PolyTan", polytan); }
990 
995  void setWarnings(std::string const &warnings) { setC("Warnings", warnings); }
996 
1000  void showFits() const {
1001  astShowFits(getRawPtr());
1002  assertOK();
1003  }
1004 
1020  FitsKeyState testFits(std::string const &name = "") const;
1021 
1025  void writeFits() {
1026  astWriteFits(getRawPtr());
1027  assertOK();
1028  }
1029 
1031  void clearCard() { clear("Card"); }
1032 
1036  void setCard(int ind) { setI("Card", ind); }
1037 
1039  auto *rawKeyMap = reinterpret_cast<AstObject *>(astGetTables(getRawPtr()));
1040  assertOK(rawKeyMap);
1041  if (!rawKeyMap) {
1042  throw std::runtime_error("getTables failed (returned a null keymap)");
1043  }
1044  return Object::fromAstObject<KeyMap>(rawKeyMap, true);
1045  }
1046 
1047 
1051  explicit FitsChan(AstFitsChan *rawFitsChan) : Channel(reinterpret_cast<AstChannel *>(rawFitsChan)) {
1052  if (!astIsAFitsChan(getRawPtr())) {
1054  os << "this is a " << getClassName() << ", which is not a FitsChan";
1055  throw std::invalid_argument(os.str());
1056  }
1057  assertOK();
1058  }
1059 };
1060 
1061 } // namespace ast
1062 
1063 #endif
ast::FitsChan::getTables
std::shared_ptr< KeyMap > getTables() const
Definition: FitsChan.h:1038
ast::FitsChan::operator=
FitsChan & operator=(FitsChan &&)=default
ast::FitsChan::getFitsAxisOrder
std::string getFitsAxisOrder() const
Get FitsAxisOrder: the order for the WCS axes in any new FITS-WCS headers created using Channel::writ...
Definition: FitsChan.h:534
ast::FitsChan::operator=
FitsChan & operator=(FitsChan const &)=delete
ast::FitsChan::getFitsCN
FoundValue< std::string > getFitsCN(std::string const &name="", std::string defval="") const
Get the value of a CONTINUE card.
Definition: FitsChan.cc:69
ast::FitsChan::FitsChan
FitsChan(AstFitsChan *rawFitsChan)
Construct a FitsChan from a raw AstFitsChan.
Definition: FitsChan.h:1051
ast::CardType::INT
@ INT
integer
ast::FitsKeyState::NOVALUE
@ NOVALUE
keyword is present, but has no value
ast::FitsChan::setDefB1950
void setDefB1950(bool defB1950)
Set DefB1950: use FK4 B1950 as default equatorial coordinates?
Definition: FitsChan.h:939
ast::Object::getB
bool getB(std::string const &attrib) const
Get the value of an attribute as a bool.
Definition: Object.h:348
std::string
STL class.
std::shared_ptr
STL class.
ast::FoundValue::value
T value
The found value; ignore if found is false.
Definition: FitsChan.h:82
ast::Object::setD
void setD(std::string const &attrib, double value)
Set the value of an attribute as a double.
Definition: Object.h:476
ast::FitsChan::purgeWcs
void purgeWcs()
Delete all cards in a FitsChan that relate to any of the recognised WCS encodings.
Definition: FitsChan.h:595
ast::CardType::FLOAT
@ FLOAT
float
ast::FitsChan::setIwc
void setIwc(bool iwcs)
Set Iwc: add a Frame describing Intermediate World Coords?
Definition: FitsChan.h:967
ast::FitsChan::setSipReplace
void setSipReplace(bool replace)
Set SipReplace: ignore inverse SIP coefficients (replacing them with fit coefficients or an iterative...
Definition: FitsChan.h:978
ast::assertOK
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Throw std::runtime_error if AST's state is bad.
Definition: base.cc:49
ast::Object::setB
void setB(std::string const &attrib, bool value)
Set the value of an attribute as a bool.
Definition: Object.h:452
ast::FitsChan::emptyFits
void emptyFits()
Delete all cards and associated information from a FitsChan.
Definition: FitsChan.h:244
ast::FoundValue
A value and associated validity flag.
Definition: FitsChan.h:69
std::vector< std::string >
ast::FitsChan::setCarLin
void setCarLin(bool cdMatrix)
Set CarLin: ignore spherical rotations on CAR projections?
Definition: FitsChan.h:923
ast::FitsChan::setPolyTan
void setPolyTan(int polytan)
Set PolyTan: use PVi_m keywords to define distorted TAN projection?
Definition: FitsChan.h:989
ast::FitsChan::getCardComm
std::string getCardComm() const
Get CardComm: the comment of the current card.
Definition: FitsChan.h:491
ast::FitsChan::setFitsU
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.
Definition: FitsChan.h:915
ast::CardType::UNDEF
@ UNDEF
card has no value
ast::FitsChan::findFits
FoundValue< std::string > findFits(std::string const &name, bool inc)
Search for a card in a FitsChan by keyword.
Definition: FitsChan.cc:124
ast::FitsChan::getFitsTol
double getFitsTol() const
Get FitsTol: Tolerance used for writing a FrameSet using a foreign encoding.
Definition: FitsChan.h:545
ast::FitsChan
A specialized form of Channel which reads and writes FITS header cards.
Definition: FitsChan.h:202
ast::FitsChan::getCardType
CardType getCardType() const
Get CardType: data type of the current FITS card.
Definition: FitsChan.h:501
ast::FitsChan::getCardName
std::string getCardName() const
Get CardName: the keyword name of the current card.
Definition: FitsChan.h:496
ast::FoundValue::FoundValue
FoundValue(bool found, T const &value)
Construct a FoundValue.
Definition: FitsChan.h:77
ast::FitsChan::setFitsCF
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.
Definition: FitsChan.h:696
ast::Object::clear
void clear(std::string const &attrib)
Clear the values of a specified set of attributes for an Object.
Definition: Object.h:119
ast::FitsChan::getAllCardNames
std::vector< std::string > getAllCardNames()
Get the name of all cards, in order, starting from the first card.
Definition: FitsChan.cc:106
ast::FitsChan::getNCard
int getNCard() const
Get NCard: the number of cards.
Definition: FitsChan.h:555
lsst::afw::geom.transform.transformContinued.name
string name
Definition: transformContinued.py:32
ast::FitsChan::getCDMatrix
bool getCDMatrix() const
Get CDMatrix: use CDi_j keywords to represent pixel scaling, rotation, etc?
Definition: FitsChan.h:512
ast::FitsChan::retainFits
void retainFits()
Keep the current card when an Object is read that uses the card.
Definition: FitsChan.h:674
ast::FitsChan::FitsChan
FitsChan(Stream &stream, std::string const &options="")
Construct a channel that uses a provided Stream.
Definition: FitsChan.cc:44
ast::FitsChan::setCard
void setCard(int ind)
Set Card: the index of the current card, where 1 is the first card.
Definition: FitsChan.h:1036
ast::FitsChan::FitsChan
FitsChan(FitsChan &&)=default
ast::Channel
Channel provides input/output of AST objects.
Definition: Channel.h:60
ast::CardType::NOTYPE
@ NOTYPE
card does not exist (card number invalid)
ast::Stream
A stream for ast::Channel.
Definition: Stream.h:41
ast::FitsChan::getFitsCF
FoundValue< std::complex< double > > getFitsCF(std::string const &name="", std::complex< double > defval={0, 0}) const
Get the value of a complex double card.
Definition: FitsChan.cc:59
ast::Channel::warnings
KeyMap warnings() const
Return a KeyMap holding the text of any warnings issued as a result of the previous invocation of rea...
Definition: Channel.cc:67
ast::Object::getClassName
std::string getClassName() const
Get Class: the name of the class (e.g.
Definition: Object.h:139
ast::FitsChan::setFitsI
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.
Definition: FitsChan.h:816
ast::FitsChan::writeFits
void writeFits()
Write out all cards currently in the channel and clear the channel.
Definition: FitsChan.h:1025
ast::FitsChan::setTabOK
void setTabOK(int tabOK)
Set TabOK: should the FITS "-TAB" algorithm be recognised?
Definition: FitsChan.h:983
ast::FitsChan::getCarLin
bool getCarLin() const
Get CarLin: ignore spherical rotations on CAR projections?
Definition: FitsChan.h:506
ast::FitsChan::getNKey
int getNKey() const
Get Nkey: the number of unique keywords.
Definition: FitsChan.h:560
ast::FitsChan::getFitsI
FoundValue< int > getFitsI(std::string const &name="", int defval=0) const
Get the value of a int card.
Definition: FitsChan.cc:84
ast::Object::getI
int getI(std::string const &attrib) const
Get the value of an attribute as an int.
Definition: Object.h:400
ast::FitsChan::setFitsDigits
void setFitsDigits(int digits)
Set FitsDigits: digits of precision for floating-point FITS values.
Definition: FitsChan.h:957
ast::FitsChan::testFits
FitsKeyState testFits(std::string const &name="") const
Determine if a card is present, and if so, whether it has a value.
Definition: FitsChan.cc:132
Channel.h
ast::FitsChan::getClean
bool getClean() const
Get Clean: remove cards used whilst reading even if an error occurs?
Definition: FitsChan.h:517
std::string::c_str
T c_str(T... args)
ast::FitsChan::setFitsF
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.
Definition: FitsChan.h:786
ast::CardType
CardType
Enums describing the FITS card type.
Definition: FitsChan.h:49
ast::CardType::LOGICAL
@ LOGICAL
boolean
ast::FitsChan::getSipReplace
bool getSipReplace() const
Get SipReplace: ignore inverse SIP coefficients (replacing them with fit coefficients or an iterative...
Definition: FitsChan.h:571
std::runtime_error
STL class.
ast::FitsChan::getFitsS
FoundValue< std::string > getFitsS(std::string const &name="", std::string defval="") const
Get the value of a string card.
Definition: FitsChan.cc:98
ast::FoundValue::found
bool found
Was the value found?
Definition: FitsChan.h:81
std::invalid_argument
STL class.
ast::CardType::COMPLEXF
@ COMPLEXF
complex floating point
ast::FitsChan::getDefB1950
bool getDefB1950() const
Get DefB1950: use FK4 B1950 as default equatorial coordinates?
Definition: FitsChan.h:522
ast::FoundValue::FoundValue
FoundValue()
Default constructor: found false, value is default-constructed.
Definition: FitsChan.h:80
ast::FitsChan::putFits
void putFits(std::string const &card, bool overwrite)
Store a FITS header card in a FitsChan.
Definition: FitsChan.h:644
ast::FitsChan::setFitsS
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.
Definition: FitsChan.h:884
ast::FitsChan::setFitsAxisOrder
void setFitsAxisOrder(std::string const &order)
Set FitsAxisOrder: the order for the WCS axes in any new FITS-WCS headers created using Channel::writ...
Definition: FitsChan.h:951
ast::CardType::COMPLEXI
@ COMPLEXI
complex integer
base.h
ast::FitsChan::delFits
void delFits()
Delete the current FITS card.
Definition: FitsChan.h:230
ast::FitsChan::setFitsCM
void setFitsCM(std::string const &comment, bool overwrite=false)
Create a new comment card, possibly overwriting the current card.
Definition: FitsChan.h:725
std::ostringstream
STL class.
ast::FitsChan::setClean
void setClean(bool clean)
Set Clean: remove cards used whilst reading even if an error occurs?
Definition: FitsChan.h:934
ast::FitsChan::setWarnings
void setWarnings(std::string const &warnings)
Set Warnings attribute, which controls the issuing of warnings about selected conditions when an Obje...
Definition: FitsChan.h:995
ast
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
os
std::ostream * os
Definition: Schema.cc:746
ast::FitsChan::getEncoding
std::string getEncoding() const
Get Encoding: the encoding system to use when AST Objects are stored as FITS header cards in a FitsCh...
Definition: FitsChan.h:528
ast::Object::getD
double getD(std::string const &attrib) const
Get the value of an attribute as a double.
Definition: Object.h:374
ast::FitsChan::getWarnings
std::string getWarnings() const
Get Warnings attribute, which controls the issuing of warnings about selected conditions when an Obje...
Definition: FitsChan.h:588
ast::Object::setC
void setC(std::string const &attrib, std::string const &value)
Set the value of an attribute as a string.
Definition: Object.h:464
ast::FitsChan::getFitsF
FoundValue< double > getFitsF(std::string const &name="", double defval=0) const
Get the value of a double card.
Definition: FitsChan.cc:77
ast::FitsChan::putCards
void putCards(std::string const &cards)
Replace all FITS header cards.
Definition: FitsChan.h:616
ast::FitsChan::readFits
void readFits()
Read cards from the source and store them in the FitsChan.
Definition: FitsChan.h:661
ast::CardType::CONTINUE
@ CONTINUE
CONTINUE card.
ast::FitsChan::setEncoding
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...
Definition: FitsChan.h:945
ast::FitsChan::~FitsChan
virtual ~FitsChan()
Definition: FitsChan.cc:51
ast::Object::setI
void setI(std::string const &attrib, int value)
Set the value of an attribute as an int.
Definition: Object.h:500
ast::Object::getC
std::string const getC(std::string const &attrib) const
Get the value of an attribute as a string.
Definition: Object.h:361
KeyMap.h
ast::FitsChan::getAllWarnings
std::string getAllWarnings() const
Get AllWarnings: a space separated list of all the conditions names recognized by the Warnings attrib...
Definition: FitsChan.h:481
ast::FitsChan::showFits
void showFits() const
Write all the cards in the channel to standard output.
Definition: FitsChan.h:1000
ast::FitsChan::getCard
int getCard() const
Get Card: the index of the current card, where 1 is the first card.
Definition: FitsChan.h:486
ast::FitsChan::setCDMatrix
void setCDMatrix(bool cdMatrix)
Get CDMatrix: Use CDi_j keywords to represent pixel scaling, rotation, etc?
Definition: FitsChan.h:929
std::complex< double >
ast::Object::getRawPtr
AstObject const * getRawPtr() const
Get the raw AST pointer.
Definition: Object.h:292
ast::FitsChan::setFitsL
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.
Definition: FitsChan.h:846
ast::FitsChan::getTabOK
int getTabOK() const
Get TabOK: should the FITS "-TAB" algorithm be recognised?
Definition: FitsChan.h:576
ast::FitsChan::FitsChan
FitsChan(FitsChan const &)=delete
ast::FitsKeyState
FitsKeyState
Enums describing the presence or absence of a FITS keyword.
Definition: FitsChan.h:40
ast::FitsChan::setSipOK
void setSipOK(bool sipOK)
Set SipOK: use Spitzer Space Telescope keywords to define distortion?
Definition: FitsChan.h:972
Object.h
ast::FitsChan::getSipOK
bool getSipOK() const
Get SipOK: use Spitzer Space Telescope keywords to define distortion?
Definition: FitsChan.h:565
ast::FitsChan::getFitsDigits
int getFitsDigits() const
Get FitsDigits: digits of precision for floating-point FITS values.
Definition: FitsChan.h:540
ast::FitsChan::getPolyTan
int getPolyTan() const
Get PolyTan: use PVi_m keywords to define distorted TAN projection?
Definition: FitsChan.h:582
ast::FitsChan::setFitsCN
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.
Definition: FitsChan.h:756
ast::FitsKeyState::PRESENT
@ PRESENT
keyword is present and has a value
ast::FitsChan::getFitsL
FoundValue< bool > getFitsL(std::string const &name="", bool defval=false) const
Get the value of a bool card.
Definition: FitsChan.cc:91
ast::FitsChan::clearCard
void clearCard()
Rewind the card index to the beginning.
Definition: FitsChan.h:1031
ast::FitsChan::setFitsTol
void setFitsTol(double tol)
Set FitsTol: Tolerance used for writing a FrameSet using a foreign encoding.
Definition: FitsChan.h:962
ast::CardType::COMMENT
@ COMMENT
card is a comment-style card with no "=" (COMMENT, HISTORY, ...)
ast::FitsKeyState::ABSENT
@ ABSENT
keyword is not present
ast::CardType::STRING
@ STRING
string
ast::FitsChan::getIwc
bool getIwc() const
Get Iwc: add a Frame describing Intermediate World Coords?
Definition: FitsChan.h:550
Stream.h