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" 117 :
Frame(reinterpret_cast<AstFrame *>(astSpecFrame(
"%s", 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);
244 astSetRefPos(
getRawPtr(), NULL, ra, dec);
274 return copyImpl<SpecFrame, AstSpecFrame>();
278 explicit SpecFrame(AstSpecFrame *rawptr) :
Frame(reinterpret_cast<AstFrame *>(rawptr)) {
280 std::ostringstream os;
281 os <<
"this is a " <<
getClassName() <<
", which is not a SpecFrame";
282 throw std::invalid_argument(os.str());
void setSourceVel(double vel)
Definition: SpecFrame.h:261
std::vector< double > getRefPos() const
Definition: SpecFrame.h:170
AstObject const * getRawPtr() const
Definition: Object.h:289
double getSourceVel() const
Definition: SpecFrame.h:189
void setSpecOrigin(double origin)
Set SpecOrigin: the zero point for SpecFrame axis values.
Definition: SpecFrame.h:267
void setB(std::string const &attrib, bool value)
Definition: Object.h:451
std::string getSourceSys() const
Get SourceSys: source velocity spectral system.
Definition: SpecFrame.h:183
std::string getRefDec() const
Get RefDec: declination of the source (FK5 J2000, "dd:mm:ss.s").
Definition: SpecFrame.h:144
AST wrapper classes and functions.
Definition: attributes_channel.dox:1
void setSourceSys(std::string const &system)
Set SourceSys: source velocity spectral system.
Definition: SpecFrame.h:255
std::string getClassName() const
Definition: Object.h:136
void setRefDec(std::string const &refDec)
Set RefDec: declination of the source (FK5 J2000, "dd:mm:ss.s").
Definition: SpecFrame.h:213
Definition: SpecFrame.h:107
void assertOK(AstObject *rawPtr1=nullptr, AstObject *rawPtr2=nullptr)
Definition: base.cc:49
void setRestFreq(std::string const &freq)
Set RestFreq: rest frequency in user-specified units.
Definition: SpecFrame.h:252
SpecFrame(std::string const &options="")
Definition: SpecFrame.h:116
SpecFrame(AstSpecFrame *rawptr)
Construct a SpecFrame from a raw AST pointer.
Definition: SpecFrame.h:278
void setSourceVRF(std::string const &vrf)
Set SourceVRF: source velocity rest frame.
Definition: SpecFrame.h:264
std::string getStdOfRest() const
Get StdOfRest: standard of rest.
Definition: SpecFrame.h:198
void setAlignSpecOffset(bool align)
Definition: SpecFrame.h:204
std::vector< double > getRefPos(SkyFrame const &frm) const
Definition: SpecFrame.h:158
Definition: SkyFrame.h:66
void setRefPos(SkyFrame const &frm, double lon, double lat)
Definition: SpecFrame.h:230
bool getB(std::string const &attrib) const
Definition: Object.h:350
double getSpecOrigin() const
Get SpecOrigin: the zero point for SpecFrame axis values.
Definition: SpecFrame.h:195
void setC(std::string const &attrib, std::string const &value)
Definition: Object.h:463
void setRefPos(double ra, double dec)
Definition: SpecFrame.h:242
std::shared_ptr< SpecFrame > copy() const
Return a deep copy of this object.
Definition: SpecFrame.h:127
double getRestFreq() const
Get RestFreq: rest frequency (GHz).
Definition: SpecFrame.h:180
std::string getRefRA() const
Get RefRA: right ascension of the source (FK5 J2000, "hh:mm:ss.s").
Definition: SpecFrame.h:147
bool getAlignSpecOffset() const
Definition: SpecFrame.h:135
void setAlignStdOfRest(std::string const &stdOfRest)
Definition: SpecFrame.h:210
void setRefRA(std::string const &refRA)
Set RefRA: right ascension of the source (FK5 J2000, "hh:mm:ss.s").
Definition: SpecFrame.h:216
void setD(std::string const &attrib, double value)
Definition: Object.h:475
std::string getAlignStdOfRest() const
Definition: SpecFrame.h:141
virtual std::shared_ptr< Object > copyPolymorphic() const override
Definition: SpecFrame.h:273
double getD(std::string const &attrib) const
Definition: Object.h:376
std::string const getC(std::string const &attrib) const
Definition: Object.h:363
void setStdOfRest(std::string const &stdOfRest)
Set StdOfRest: standard of rest.
Definition: SpecFrame.h:270
std::string getSourceVRF() const
Get SourceVRF: source velocity rest frame.
Definition: SpecFrame.h:192
void setRestFreq(double freq)
Set RestFreq: rest frequency in GHz.
Definition: SpecFrame.h:249