![]() |
SuperNOVAS C++ API v1.6
High-precision C/C++ astrometry library
|
Defines the astrometric parameters of a sidereal source, such as a star, a Galactic cloud, a distant galaxy, or a quasar. More...
#include <supernovas.h>
Public Member Functions | |
| CatalogEntry (cat_entry e, const Equinox &system=Equinox::icrs()) | |
| Instantiates a new catalog entry with a NOVAS C cat_entry data structure and the equatorial coordinate system in which it is defined. | |
| CatalogEntry (const std::string &name, const Ecliptic &coords) | |
| Instantiates a new catalog entry with a given name and ecliptic catalog coordinates. | |
| CatalogEntry (const std::string &name, const Equatorial &coords) | |
| Instantiates a new catalog entry with a given name and catalog coordinates. | |
| CatalogEntry (const std::string &name, const Galactic &coords) | |
| Instantiates a new catalog entry with a given name and galactic catalog coordinates. | |
| const cat_entry * | _cat_entry () const |
| Returns a pointer to the underlying NOVAS C cat_entry data structure, for use with the standard C API. | |
| Angle | dec () const |
| Returns the catalog declination coordinate as a angle. | |
| Coordinate | distance () const |
| Returns the catalog (light-time) distance of the source. | |
| CatalogEntry & | distance (const Coordinate &dist) |
| Sets the distance of this source, defined at the same epoch as the catalog coordinates, returning itself to enable builder pattern. | |
| CatalogEntry & | distance (double meters) |
| Sets the distance of this source, defined at the same epoch as the catalog coordinates, returning itself to enable builder pattern. | |
| Equatorial | equatorial () const |
| Returns the equatorial catalog coordinates of this source. | |
| std::string | name () const |
| Returns the catalog name that was defined. | |
| Angle | parallax () const |
| Returns the parallax of the source. | |
| CatalogEntry & | parallax (const Angle &angle) |
| Sets the parallax this source, defined at the same epoch as the catalog coordinates, returning itself to enable builder pattern. | |
| CatalogEntry & | parallax (double radians) |
| Sets the parallax of this source, defined at the same epoch as the catalog coordinates, returning itself to enable builder pattern. | |
| CatalogEntry & | proper_motion (double ra, double dec) |
| Sets the proper motion of this source, defined at the same epoch as the catalog coordinates, returning itself to enable builder pattern. | |
| TimeAngle | ra () const |
| Returns the catalog right ascention (R.A.) coordinate as a time-angle. | |
| ScalarVelocity | radial_velocity () const |
| Returns the barycentric radial velocity of the source, that is the radial velocity with respect to the Solar System Barycenter (SSB). | |
| CatalogEntry & | radial_velocity (const ScalarVelocity &v) |
| Sets the radial velocity of this source relative to the Solar System Barycenter (SSB), defined at the same epoch as the catalog coordinates, and returning itself to enable builder pattern. | |
| CatalogEntry & | radial_velocity (double v_ms) |
| Sets the radial velocity of this source relative to the Solar System Barycenter (SSB), defined at the same epoch as the catalog coordinates, and returning itself to enable builder pattern. | |
| double | redshift () const |
| Returns the barycentric redshift of the source, that is the redshift measure with respect to the Solar System Barycenter (SSB). | |
| CatalogEntry & | redshift (double z) |
| Sets the redshift of this source relative to the Solar System Barycenter (SSB), defined at the same epoch as the catalog coordinates, and returning itself to enable builder pattern. | |
| const Equinox & | system () const |
| Returns the equatorial coordinate system in which this catalog entry is defined. | |
| CatalogSource | to_source () const |
| Returns a new catalog source based created from this catalog entry. | |
| std::string | to_string (int decimals=3) const |
| Returns a human-readable string representation of this catalog entry, showing only the most basic data. | |
| ScalarVelocity | v_lsr () const |
| Returns the scalar source velocity with respect to the Local Standard of Rest (LSR). | |
| CatalogEntry & | v_lsr (const ScalarVelocity &v) |
| Sets the motion of this source relative to the Local Standard of Rest (LSR), defined at the same epoch as the catalog coordinates, and returning itself to enable builder pattern. | |
| CatalogEntry & | v_lsr (double v_ms) |
| Sets the motion of this source relative to the Local Standard of Rest (LSR), defined at the same epoch as the catalog coordinates, and returning itself to enable builder pattern. | |
| Public Member Functions inherited from supernovas::Validating | |
| bool | is_valid () const |
| Returns the previously set 'valid' stae of the implementing instance. | |
| operator bool () const | |
| Objects that implement Validating can be used in conditionals directly, without explicitly calling is_valid(). | |
Additional Inherited Members | |
| Protected Member Functions inherited from supernovas::Validating | |
| Validating () | |
| dummy constructor; | |
| Protected Attributes inherited from supernovas::Validating | |
| bool | _valid = false |
| the state variable. | |
Defines the astrometric parameters of a sidereal source, such as a star, a Galactic cloud, a distant galaxy, or a quasar.
NOTES:
| supernovas::CatalogEntry::CatalogEntry | ( | const std::string & | name, |
| const Equatorial & | coords ) |
Instantiates a new catalog entry with a given name and catalog coordinates.
After instantiation, one may populate additional data using the builder functions of this class, such as:
For example:
| name | source name. It is treated case insensitively, unless the user calls novas_case_sensitive(true) prior to instantiation. The user may chose any name that is appropriate for their application. |
| coords | Catalog coordinates (equatorial) |
References supernovas::Validating::_valid, supernovas::Equatorial::dec(), supernovas::Angle::deg(), supernovas::TimeAngle::hours(), supernovas::Validating::is_valid(), name(), novas_init_cat_entry(), supernovas::Equatorial::ra(), and system().
Referenced by CatalogEntry(), CatalogEntry(), distance(), distance(), parallax(), parallax(), proper_motion(), radial_velocity(), radial_velocity(), redshift(), v_lsr(), and v_lsr().
| supernovas::CatalogEntry::CatalogEntry | ( | const std::string & | name, |
| const Ecliptic & | coords ) |
Instantiates a new catalog entry with a given name and ecliptic catalog coordinates.
After instantiation, one may populate additional data using the builder functions of this class, such as:
See CatalogEntry(strd::string&, Equatorial&) for more information on using builder patterns.
| name | Source name. It is treated case insensitively, unless the user calls novas_case_sensitive(true) prior to instantiation. The user may chose any name that is appropriate for their application. |
| coords | Catalog coordinates (ecliptic) |
References CatalogEntry(), and name().
| supernovas::CatalogEntry::CatalogEntry | ( | const std::string & | name, |
| const Galactic & | coords ) |
Instantiates a new catalog entry with a given name and galactic catalog coordinates.
After instantiation, one may populate additional data using the builder functions of this class, such as:
See CatalogEntry(strd::string&, Equatorial&) for more information on using builder patterns.
NOTES:
| name | Source name. It is treated case insensitively, unless the user calls novas_case_sensitive(true) prior to instantiation. The user may chose any name that is appropriate for their application. |
| coords | Catalog coordinates (galactic) |
References CatalogEntry(), and name().
|
explicit |
Instantiates a new catalog entry with a NOVAS C cat_entry data structure and the equatorial coordinate system in which it is defined.
See CatalogEntry(strd::string&, Equatorial&) for more information on using builder patterns.
| e | NOVAS C cat_entry data structure (it is not referenced) |
| system | the equatorial coordinate system in which the cat_entry data was defined. |
References system().
| const cat_entry * supernovas::CatalogEntry::_cat_entry | ( | ) | const |
Returns a pointer to the underlying NOVAS C cat_entry data structure, for use with the standard C API.
Referenced by supernovas::CatalogSource::CatalogSource().
| Angle supernovas::CatalogEntry::dec | ( | ) | const |
Returns the catalog declination coordinate as a angle.
References supernovas::Unit::deg, and supernovas::Validating::is_valid().
Referenced by equatorial(), and proper_motion().
| Coordinate supernovas::CatalogEntry::distance | ( | ) | const |
Returns the catalog (light-time) distance of the source.
References supernovas::Validating::is_valid(), and supernovas::Unit::kpc.
Referenced by distance(), and to_string().
| CatalogEntry & supernovas::CatalogEntry::distance | ( | const Coordinate & | dist | ) |
Sets the distance of this source, defined at the same epoch as the catalog coordinates, returning itself to enable builder pattern.
| dist | source (light-time) distance |
References CatalogEntry(), distance(), and supernovas::Coordinate::m().
| CatalogEntry & supernovas::CatalogEntry::distance | ( | double | meters | ) |
Sets the distance of this source, defined at the same epoch as the catalog coordinates, returning itself to enable builder pattern.
| meters | [m] source (light-time) distance |
References CatalogEntry(), supernovas::Validating::_valid, novas_set_distance(), and supernovas::Unit::pc.
| Equatorial supernovas::CatalogEntry::equatorial | ( | ) | const |
Returns the equatorial catalog coordinates of this source.
References dec(), supernovas::Validating::is_valid(), ra(), and system().
Referenced by to_string().
| std::string supernovas::CatalogEntry::name | ( | ) | const |
Returns the catalog name that was defined.
Referenced by CatalogEntry(), CatalogEntry(), CatalogEntry(), and to_string().
| Angle supernovas::CatalogEntry::parallax | ( | ) | const |
Returns the parallax of the source.
References supernovas::Validating::is_valid(), and supernovas::Unit::mas.
Referenced by parallax().
| CatalogEntry & supernovas::CatalogEntry::parallax | ( | const Angle & | angle | ) |
Sets the parallax this source, defined at the same epoch as the catalog coordinates, returning itself to enable builder pattern.
| angle | Parallax angle |
References CatalogEntry(), parallax(), and supernovas::Angle::rad().
| CatalogEntry & supernovas::CatalogEntry::parallax | ( | double | radians | ) |
Sets the parallax of this source, defined at the same epoch as the catalog coordinates, returning itself to enable builder pattern.
| radians | [rad] Parallax angle |
References CatalogEntry(), supernovas::Validating::_valid, supernovas::Unit::mas, and novas_set_parallax().
| CatalogEntry & supernovas::CatalogEntry::proper_motion | ( | double | ra, |
| double | dec ) |
Sets the proper motion of this source, defined at the same epoch as the catalog coordinates, returning itself to enable builder pattern.
| ra | [rad/s] Proper motion in the R.A. direction |
| dec | [rad/s] Proper motion in the declination direction |
References CatalogEntry(), supernovas::Validating::_valid, dec(), supernovas::Unit::mas, novas_set_proper_motion(), ra(), and supernovas::Unit::yr.
| TimeAngle supernovas::CatalogEntry::ra | ( | ) | const |
Returns the catalog right ascention (R.A.) coordinate as a time-angle.
References supernovas::Unit::hour_angle, and supernovas::Validating::is_valid().
Referenced by equatorial(), and proper_motion().
| ScalarVelocity supernovas::CatalogEntry::radial_velocity | ( | ) | const |
Returns the barycentric radial velocity of the source, that is the radial velocity with respect to the Solar System Barycenter (SSB).
References supernovas::Validating::is_valid(), supernovas::Unit::km, and supernovas::Unit::sec.
Referenced by radial_velocity(), and to_string().
| CatalogEntry & supernovas::CatalogEntry::radial_velocity | ( | const ScalarVelocity & | v | ) |
Sets the radial velocity of this source relative to the Solar System Barycenter (SSB), defined at the same epoch as the catalog coordinates, and returning itself to enable builder pattern.
| v | radial velocity with respect to the Solar System Barycenter (SSB) |
References CatalogEntry(), supernovas::ScalarVelocity::m_per_s(), and radial_velocity().
| CatalogEntry & supernovas::CatalogEntry::radial_velocity | ( | double | v_ms | ) |
Sets the radial velocity of this source relative to the Solar System Barycenter (SSB), defined at the same epoch as the catalog coordinates, and returning itself to enable builder pattern.
| v_ms | [m/s] radial velocity with respect to the Solar System Barycenter (SSB) |
References CatalogEntry(), supernovas::Validating::_valid, supernovas::Constant::c, supernovas::Unit::km, novas_set_ssb_vel(), and supernovas::Unit::sec.
| double supernovas::CatalogEntry::redshift | ( | ) | const |
Returns the barycentric redshift of the source, that is the redshift measure with respect to the Solar System Barycenter (SSB).
References supernovas::Unit::km, novas_v2z(), and supernovas::Unit::sec.
| CatalogEntry & supernovas::CatalogEntry::redshift | ( | double | z | ) |
Sets the redshift of this source relative to the Solar System Barycenter (SSB), defined at the same epoch as the catalog coordinates, and returning itself to enable builder pattern.
| z | barycentric redshift measure. |
References CatalogEntry(), supernovas::Validating::_valid, and novas_set_redshift().
| const Equinox & supernovas::CatalogEntry::system | ( | ) | const |
Returns the equatorial coordinate system in which this catalog entry is defined.
Referenced by CatalogEntry(), CatalogEntry(), supernovas::CatalogSource::CatalogSource(), and equatorial().
| std::string supernovas::CatalogEntry::to_string | ( | int | decimals = 3 | ) | const |
Returns a human-readable string representation of this catalog entry, showing only the most basic data.
| decimals | [0:16] number of decimal places to print for coordinates. |
References distance(), equatorial(), name(), NOVAS_SEP_UNITS_AND_SPACES, radial_velocity(), supernovas::Coordinate::to_string(), supernovas::Equatorial::to_string(), and supernovas::ScalarVelocity::to_string().
| ScalarVelocity supernovas::CatalogEntry::v_lsr | ( | ) | const |
Returns the scalar source velocity with respect to the Local Standard of Rest (LSR).
References supernovas::Validating::is_valid(), supernovas::Unit::km, novas_ssb_to_lsr_vel(), and supernovas::Unit::sec.
Referenced by v_lsr().
| CatalogEntry & supernovas::CatalogEntry::v_lsr | ( | const ScalarVelocity & | v | ) |
Sets the motion of this source relative to the Local Standard of Rest (LSR), defined at the same epoch as the catalog coordinates, and returning itself to enable builder pattern.
| v | LSR velocity |
References CatalogEntry(), supernovas::ScalarVelocity::m_per_s(), and v_lsr().
| CatalogEntry & supernovas::CatalogEntry::v_lsr | ( | double | v_ms | ) |
Sets the motion of this source relative to the Local Standard of Rest (LSR), defined at the same epoch as the catalog coordinates, and returning itself to enable builder pattern.
| v_ms | [m/s] LSR velocity |
References CatalogEntry(), supernovas::Validating::_valid, supernovas::Constant::c, supernovas::Unit::km, novas_set_lsr_vel(), and supernovas::Unit::sec.