lsst.astshim gf5dcc679e7+7aca86229d
Loading...
Searching...
No Matches
ast::SpecFrame Class Reference

A specialised form of one-dimensional Frame which represents various coordinate systems used to describe positions within an electro-magnetic spectrum. More...

#include <SpecFrame.h>

Inheritance diagram for ast::SpecFrame:

Public Member Functions

 SpecFrame (std::string const &options="")
 Construct a SpecFrame.
virtual ~SpecFrame ()
 SpecFrame (SpecFrame const &)=default
 Copy constructor: make a deep copy.
 SpecFrame (SpecFrame &&)=default
SpecFrameoperator= (SpecFrame const &)=delete
SpecFrameoperator= (SpecFrame &&)=default
std::shared_ptr< SpecFramecopy () const
 Return a deep copy of this object.
bool getAlignSpecOffset () const
 Get AlignSpecOffset: align SpecFrames using the offset coordinate system?
std::string getAlignStdOfRest () const
 Get AlignStdOfRest: standard of rest in which to align SpecFrames.
std::string getRefDec () const
 Get RefDec: declination of the source (FK5 J2000, "dd:mm:ss.s").
std::string getRefRA () const
 Get RefRA: right ascension of the source (FK5 J2000, "hh:mm:ss.s").
std::vector< double > getRefPos (SkyFrame const &frm) const
 Get the reference position (specified by RefRA and RefDec) converted to the celestial coordinate system represented by a supplied SkyFrame.
std::vector< double > getRefPos () const
 Return the reference position (specified by RefRA and RefDec) as FK5 J2000 RA, Dec (radians).
double getRestFreq () const
 Get RestFreq: rest frequency (GHz).
std::string getSourceSys () const
 Get SourceSys: source velocity spectral system.
double getSourceVel () const
 Get SourceVel: source velocity (in the system specified by SourceSys).
std::string getSourceVRF () const
 Get SourceVRF: source velocity rest frame.
double getSpecOrigin () const
 Get SpecOrigin: the zero point for SpecFrame axis values.
std::string getStdOfRest () const
 Get StdOfRest: standard of rest.
void setAlignSpecOffset (bool align)
 Set AlignSpecOffset: align SpecFrames using the offset coordinate system?
void setAlignStdOfRest (std::string const &stdOfRest)
 Set AlignStdOfRest: standard of rest in which to align SpecFrames.
void setRefDec (std::string const &refDec)
 Set RefDec: declination of the source (FK5 J2000, "dd:mm:ss.s").
void setRefRA (std::string const &refRA)
 Set RefRA: right ascension of the source (FK5 J2000, "hh:mm:ss.s").
void setRefPos (SkyFrame const &frm, double lon, double lat)
 Set the reference position (RefRA and RefDec) using axis values (in radians) supplied within the celestial coordinate system represented by a supplied SkyFrame.
void setRefPos (double ra, double dec)
 Set the reference position (RefRA and RefDec) from FK5 J2000 RA and Dec (radians).
void setRestFreq (double freq)
 Set RestFreq: rest frequency in GHz.
void setRestFreq (std::string const &freq)
 Set RestFreq: rest frequency in user-specified units.
void setSourceSys (std::string const &system)
 Set SourceSys: source velocity spectral system.
void setSourceVel (double vel)
 Set SourceVel: source velocity (in the system specified by SourceSys).
void setSourceVRF (std::string const &vrf)
 Set SourceVRF: source velocity rest frame.
void setSpecOrigin (double origin)
 Set SpecOrigin: the zero point for SpecFrame axis values.
void setStdOfRest (std::string const &stdOfRest)
 Set StdOfRest: standard of rest.

Protected Member Functions

virtual std::shared_ptr< ObjectcopyPolymorphic () const override
 SpecFrame (AstSpecFrame *rawptr)
 Construct a SpecFrame from a raw AST pointer.

Friends

class Object

Detailed Description

A specialised form of one-dimensional Frame which represents various coordinate systems used to describe positions within an electro-magnetic spectrum.

The particular coordinate system to be used is specified by setting the SpecFrame_System "System" attribute (the default is wavelength) qualified, as necessary, by other attributes such as the rest frequency, the standard of rest, the epoch of observation, units, etc (see Attributes for details).

By setting a value for the SpecFrame_SpecOrigin "SpecOrigin" attribute, a SpecFrame can be made to represent offsets from a given spectral position, rather than absolute spectral values.

Attributes

In addition to those attributes common to all Frames, every SpecFrame also has the following attributes:

Several of the Frame attributes inherited by the SpecFrame class refer to a specific axis of the Frame (for instance Unit(axis), Label(axis), etc). Since a SpecFrame is strictly one-dimensional, it allows these attributes to be specified without an axis index. So for instance, "Unit" is allowed in place of "Unit(1)".

Examples

  • frame = SpecFrame()
    Create a @ref SpecFrame to describe the default wavelength spectral
    coordinate system. The SpecFrame_RestFreq "RestFreq" attribute (rest frequency) is
    unspecified, so it will not be possible to align this @ref SpecFrame
    with another @ref SpecFrame on the basis of a velocity-based system. The
    standard of rest is also unspecified. This means that alignment
    will be possible with other @ref SpecFrame "SpecFrames", but no correction will be
    made for Doppler shift caused by change of rest frame during the
    alignment.
    
  • frame = SpecFrame("System=VELO, RestFreq=1.0E15, StdOfRest=LSRK")
    Create a @ref SpecFrame describing a apparent radial velocity ("VELO") axis
    with rest frequency 1.0E15 Hz (about 3000 Angstroms), measured
    in the kinematic Local Standard of Rest ("LSRK"). Since the
    source position has not been specified (using attributes @ref SpecFrame_RefRA "RefRA" and
    @ref SpecFrame_RefDec "RefDec"), it will only be possible to align this @ref SpecFrame with
    other @ref SpecFrame "SpecFrames" which are also measured in the LSRK standard of
    rest.
    

Notes

  • When conversion between two SpecFrames is requested (as when supplying SpecFrames to Frame.convert) account will be taken of the nature of the spectral coordinate systems they represent, together with any qualifying rest frequency, standard of rest, epoch values, etc. The AlignSystem and SpecFrame_AlignStdOfRest "AlignStdOfRest" attributes will also be taken into account. The results will therefore fully reflect the relationship between positions measured in the two systems. In addition, any difference in the Unit attributes of the two systems will also be taken into account.

Definition at line 107 of file SpecFrame.h.

Constructor & Destructor Documentation

◆ SpecFrame() [1/4]

ast::SpecFrame::SpecFrame ( std::string const & options = "")
inlineexplicit

Construct a SpecFrame.

Parameters
[in]optionsComma-separated list of attribute assignments.

Definition at line 116 of file SpecFrame.h.

◆ ~SpecFrame()

virtual ast::SpecFrame::~SpecFrame ( )
inlinevirtual

Definition at line 119 of file SpecFrame.h.

◆ SpecFrame() [2/4]

ast::SpecFrame::SpecFrame ( SpecFrame const & )
default

Copy constructor: make a deep copy.

◆ SpecFrame() [3/4]

ast::SpecFrame::SpecFrame ( SpecFrame && )
default

◆ SpecFrame() [4/4]

ast::SpecFrame::SpecFrame ( AstSpecFrame * rawptr)
inlineexplicitprotected

Construct a SpecFrame from a raw AST pointer.

Definition at line 279 of file SpecFrame.h.

Member Function Documentation

◆ copy()

std::shared_ptr< SpecFrame > ast::SpecFrame::copy ( ) const
inline

Return a deep copy of this object.

Definition at line 128 of file SpecFrame.h.

◆ copyPolymorphic()

virtual std::shared_ptr< Object > ast::SpecFrame::copyPolymorphic ( ) const
inlineoverrideprotectedvirtual

Definition at line 274 of file SpecFrame.h.

◆ getAlignSpecOffset()

bool ast::SpecFrame::getAlignSpecOffset ( ) const
inline

Get AlignSpecOffset: align SpecFrames using the offset coordinate system?

Definition at line 136 of file SpecFrame.h.

◆ getAlignStdOfRest()

std::string ast::SpecFrame::getAlignStdOfRest ( ) const
inline

Get AlignStdOfRest: standard of rest in which to align SpecFrames.

Definition at line 142 of file SpecFrame.h.

◆ getRefDec()

std::string ast::SpecFrame::getRefDec ( ) const
inline

Get RefDec: declination of the source (FK5 J2000, "dd:mm:ss.s").

Definition at line 145 of file SpecFrame.h.

◆ getRefPos() [1/2]

std::vector< double > ast::SpecFrame::getRefPos ( ) const
inline

Return the reference position (specified by RefRA and RefDec) as FK5 J2000 RA, Dec (radians).

Definition at line 171 of file SpecFrame.h.

◆ getRefPos() [2/2]

std::vector< double > ast::SpecFrame::getRefPos ( SkyFrame const & frm) const
inline

Get the reference position (specified by RefRA and RefDec) converted to the celestial coordinate system represented by a supplied SkyFrame.

Parameters
[in]frmSkyFrame which defines the required celestial coordinate system.
Returns
the reference longitude and latitude in the coordinate system represented by the supplied SkyFrame (radians).

Definition at line 159 of file SpecFrame.h.

◆ getRefRA()

std::string ast::SpecFrame::getRefRA ( ) const
inline

Get RefRA: right ascension of the source (FK5 J2000, "hh:mm:ss.s").

Definition at line 148 of file SpecFrame.h.

◆ getRestFreq()

double ast::SpecFrame::getRestFreq ( ) const
inline

Get RestFreq: rest frequency (GHz).

Definition at line 181 of file SpecFrame.h.

◆ getSourceSys()

std::string ast::SpecFrame::getSourceSys ( ) const
inline

Get SourceSys: source velocity spectral system.

Definition at line 184 of file SpecFrame.h.

◆ getSourceVel()

double ast::SpecFrame::getSourceVel ( ) const
inline

Get SourceVel: source velocity (in the system specified by SourceSys).

Definition at line 190 of file SpecFrame.h.

◆ getSourceVRF()

std::string ast::SpecFrame::getSourceVRF ( ) const
inline

Get SourceVRF: source velocity rest frame.

Definition at line 193 of file SpecFrame.h.

◆ getSpecOrigin()

double ast::SpecFrame::getSpecOrigin ( ) const
inline

Get SpecOrigin: the zero point for SpecFrame axis values.

Definition at line 196 of file SpecFrame.h.

◆ getStdOfRest()

std::string ast::SpecFrame::getStdOfRest ( ) const
inline

Get StdOfRest: standard of rest.

Definition at line 199 of file SpecFrame.h.

◆ operator=() [1/2]

SpecFrame & ast::SpecFrame::operator= ( SpecFrame && )
default

◆ operator=() [2/2]

SpecFrame & ast::SpecFrame::operator= ( SpecFrame const & )
delete

◆ setAlignSpecOffset()

void ast::SpecFrame::setAlignSpecOffset ( bool align)
inline

Set AlignSpecOffset: align SpecFrames using the offset coordinate system?

Definition at line 205 of file SpecFrame.h.

◆ setAlignStdOfRest()

void ast::SpecFrame::setAlignStdOfRest ( std::string const & stdOfRest)
inline

Set AlignStdOfRest: standard of rest in which to align SpecFrames.

Definition at line 211 of file SpecFrame.h.

◆ setRefDec()

void ast::SpecFrame::setRefDec ( std::string const & refDec)
inline

Set RefDec: declination of the source (FK5 J2000, "dd:mm:ss.s").

Definition at line 214 of file SpecFrame.h.

◆ setRefPos() [1/2]

void ast::SpecFrame::setRefPos ( double ra,
double dec )
inline

Set the reference position (RefRA and RefDec) from FK5 J2000 RA and Dec (radians).

Parameters
[in]raFK5 J2000 RA (radians).
[in]decFK5 J2000 Dec (radians).

Definition at line 243 of file SpecFrame.h.

◆ setRefPos() [2/2]

void ast::SpecFrame::setRefPos ( SkyFrame const & frm,
double lon,
double lat )
inline

Set the reference position (RefRA and RefDec) using axis values (in radians) supplied within the celestial coordinate system represented by a supplied SkyFrame.

Parameters
[in]frmSkyFrame which defines the celestial coordinate system in which the longitude and latitude values are supplied.
[in]lonThe longitude of the reference point, in the coordinate system represented by the supplied SkyFrame (radians).
[in]latThe latitude of the reference point, in the coordinate system represented by the supplied SkyFrame (radians).

Definition at line 231 of file SpecFrame.h.

◆ setRefRA()

void ast::SpecFrame::setRefRA ( std::string const & refRA)
inline

Set RefRA: right ascension of the source (FK5 J2000, "hh:mm:ss.s").

Definition at line 217 of file SpecFrame.h.

◆ setRestFreq() [1/2]

void ast::SpecFrame::setRestFreq ( double freq)
inline

Set RestFreq: rest frequency in GHz.

Definition at line 250 of file SpecFrame.h.

◆ setRestFreq() [2/2]

void ast::SpecFrame::setRestFreq ( std::string const & freq)
inline

Set RestFreq: rest frequency in user-specified units.

Definition at line 253 of file SpecFrame.h.

◆ setSourceSys()

void ast::SpecFrame::setSourceSys ( std::string const & system)
inline

Set SourceSys: source velocity spectral system.

Definition at line 256 of file SpecFrame.h.

◆ setSourceVel()

void ast::SpecFrame::setSourceVel ( double vel)
inline

Set SourceVel: source velocity (in the system specified by SourceSys).

Definition at line 262 of file SpecFrame.h.

◆ setSourceVRF()

void ast::SpecFrame::setSourceVRF ( std::string const & vrf)
inline

Set SourceVRF: source velocity rest frame.

Definition at line 265 of file SpecFrame.h.

◆ setSpecOrigin()

void ast::SpecFrame::setSpecOrigin ( double origin)
inline

Set SpecOrigin: the zero point for SpecFrame axis values.

Definition at line 268 of file SpecFrame.h.

◆ setStdOfRest()

void ast::SpecFrame::setStdOfRest ( std::string const & stdOfRest)
inline

Set StdOfRest: standard of rest.

Definition at line 271 of file SpecFrame.h.

◆ Object

friend class Object
friend

Definition at line 108 of file SpecFrame.h.


The documentation for this class was generated from the following file: