22 #ifndef ASTSHIM_SPECFRAME_H
23 #define ASTSHIM_SPECFRAME_H
28 #include "astshim/base.h"
29 #include "astshim/detail/utils.h"
30 #include "astshim/Frame.h"
116 Frame(reinterpret_cast<AstFrame *>(astSpecFrame(options.c_str())))
127 std::shared_ptr<SpecFrame>
copy()
const {
159 std::vector<double> ret(2);
162 detail::astBadToNan(ret);
171 std::vector<double> ret(2);
173 astGetRefPos(
getRawPtr(), NULL, &ret[0], &ret[1]);
175 detail::astBadToNan(ret);
245 astSetRefPos(
getRawPtr(), NULL, ra, dec);
275 return _copyImpl<SpecFrame, AstSpecFrame>();
280 Frame(reinterpret_cast<AstFrame *>(rawptr))
283 std::ostringstream os;
284 os <<
"this is a " <<
getClass() <<
", which is not a SpecFrame";
285 throw std::invalid_argument(os.str());
virtual std::shared_ptr< Object > _copyPolymorphic() const override
Definition: SpecFrame.h:274
void setRestFreq(double freq)
Set RestFreq: rest frequency in GHz.
Definition: SpecFrame.h:250
void setRefDec(std::string const &refDec)
Set RefDec: declination of the source (FK5 J2000, "dd:mm:ss.s").
Definition: SpecFrame.h:214
std::string getAlignStdOfRest() const
Definition: SpecFrame.h:141
void setSourceVel(double vel)
Definition: SpecFrame.h:262
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Definition: base.cc:53
std::string getClass() const
Definition: Object.h:117
void setRefPos(double ra, double dec)
Definition: SpecFrame.h:243
std::string const getC(std::string const &attrib) const
Definition: Object.h:347
std::string getStdOfRest() const
Get StdOfRest: standard of rest.
Definition: SpecFrame.h:198
void setStdOfRest(std::string const &stdOfRest)
Set StdOfRest: standard of rest.
Definition: SpecFrame.h:271
void setB(std::string const &attrib, bool value)
Definition: Object.h:435
void setSourceVRF(std::string const &vrf)
Set SourceVRF: source velocity rest frame.
Definition: SpecFrame.h:265
std::string getRefRA() const
Get RefRA: right ascension of the source (FK5 J2000, "hh:mm:ss.s").
Definition: SpecFrame.h:147
SpecFrame(AstSpecFrame *rawptr)
Construct a SpecFrame from a raw AST pointer.
Definition: SpecFrame.h:279
Definition: SkyFrame.h:66
double getSpecOrigin() const
Get SpecOrigin: the zero point for SpecFrame axis values.
Definition: SpecFrame.h:195
std::vector< double > getRefPos() const
Definition: SpecFrame.h:170
double getRestFreq() const
Get RestFreq: rest frequency (GHz).
Definition: SpecFrame.h:180
void setC(std::string const &attrib, std::string const &value)
Definition: Object.h:447
void setAlignStdOfRest(std::string const &stdOfRest)
Definition: SpecFrame.h:211
void setAlignSpecOffset(bool align)
Definition: SpecFrame.h:205
Definition: SpecFrame.h:107
SpecFrame(std::string const &options="")
Definition: SpecFrame.h:115
bool getAlignSpecOffset() const
Definition: SpecFrame.h:135
void setSpecOrigin(double origin)
Set SpecOrigin: the zero point for SpecFrame axis values.
Definition: SpecFrame.h:268
double getD(std::string const &attrib) const
Definition: Object.h:360
std::string getSourceVRF() const
Get SourceVRF: source velocity rest frame.
Definition: SpecFrame.h:192
void setRefPos(SkyFrame const &frm, double lon, double lat)
Definition: SpecFrame.h:231
void setD(std::string const &attrib, double value)
Definition: Object.h:459
std::string getRefDec() const
Get RefDec: declination of the source (FK5 J2000, "dd:mm:ss.s").
Definition: SpecFrame.h:144
std::shared_ptr< SpecFrame > copy() const
Return a deep copy of this object.
Definition: SpecFrame.h:127
void setRestFreq(std::string const &freq)
Set RestFreq: rest frequency in user-specified units.
Definition: SpecFrame.h:253
bool getB(std::string const &attrib) const
Definition: Object.h:334
std::string getSourceSys() const
Get SourceSys: source velocity spectral system.
Definition: SpecFrame.h:183
void setRefRA(std::string const &refRA)
Set RefRA: right ascension of the source (FK5 J2000, "hh:mm:ss.s").
Definition: SpecFrame.h:217
std::vector< double > getRefPos(SkyFrame const &frm) const
Definition: SpecFrame.h:158
double getSourceVel() const
Definition: SpecFrame.h:189
AstObject const * getRawPtr() const
Definition: Object.h:260
void setSourceSys(std::string const &system)
Set SourceSys: source velocity spectral system.
Definition: SpecFrame.h:256