TwiceAsNice  2019-02-18
Public Member Functions | Static Public Member Functions | List of all members
Ltcs::IifStar Class Reference

A IifStar object is a single sky object with location, brightness ect. More...

#include <IifStar.h>

Inheritance diagram for Ltcs::IifStar:
Inheritance graph
Collaboration diagram for Ltcs::IifStar:
Collaboration graph

Public Member Functions

 IifStar ()
 default ctor. Basically not useful, but to build an empty star catalogue More...
 
 IifStar (const lbto::position2 &star)
 Create from a given structure. More...
 
 IifStar (const Nice::DMS &ra, const Nice::DMS &dec)
 Ctor given just a position on the sky. The proper motions, magnitudes etc are all kept at zero. More...
 
 IifStar (const std::string &str, const std::string &typ)
 Ctor with a specification of a single star. This should be line conforming to http://wiki.lbto.org/bin/view/Commissioning/LBTOStarCatalogs but not a comment line. More...
 
 operator Nice::SkyPoint () const
 Construct a simple ra/dec pointing from this. More...
 
double distance (const IifStar &oth) const
 Distance to another star in units of radians. More...
 
std::string toLbtoLoc () const
 Convert the Ra and Dec coordinates to a LBTO format. More...
 
std::string toPosition2Py () const
 Convert the position2 structure to a Python list. More...
 
std::string object () const
 A construed object name derived from the coordinates. More...
 
IifStar propMot (const Nice::Date &t) const
 Apply a proper motion. More...
 
IifStar propMot () const
 Apply a proper motion. More...
 
IifStar precess (const Nice::Date &t) const
 Apply proper motion and precession from catalogue origin to some other time. More...
 
IifStar precess () const
 Precess equatorial coordinate from the catalogues epoch to now. More...
 
Nice::DMS getPang (const Nice::Date &t=Nice::Date::now(), const Nice::GeoLocation &geosite=Nice::GeoLocation()) const
 compute the parallactic angle. More...
 
Nice::SkyPoint getHoriz (const Nice::Date &t=Nice::Date::now(), const Nice::GeoLocation &geosite=Nice::GeoLocation()) const
 compute the horizontal coordinates (altitude, azimuth) More...
 
Nice::DMS getPangDot (const Nice::Date &t=Nice::Date::now(), const Nice::GeoLocation &geosite=Nice::GeoLocation())
 compute the first time derivative of the parallactic angle. More...
 
Nice::DMS derotStartAng (const Nice::Date t, const double lowLim, const double hiLim, const float dirScale, const int durat=12 *3600, const Nice::GeoLocation &geosite=Nice::GeoLocation()) const
 compute a best start angle for derotation. The parallactic angle is computed from the start time into the future with 20 seconds of resolution, monitoring the maximum and minimum angles. The angle is computed which lets this derotation stay within the limits for the longest possible duration. More...
 
Nice::DMS derotStartAng (const Nice::Date t, const Nice::Point &travelrange, const Nice::Point &transDegree, const float cfgDirection, const int durat=12 *3600, const Nice::GeoLocation &geosite=Nice::GeoLocation()) const
 compute a proposal for a best start angle for derotation. The parallactic angle is computed from the start time into the future with 20 seconds of resolution, monitoring the maximum and minimum angles. The angle is computed which lets this derotation stay within the limits for the longest possible duration. More...
 
lbto::result GetRotatorPolynomials (Ice::Double start, Ice::Int count, Ice::Double interval, Ice::Int order, const std::string &side, const Nice::GeoLocation &geosite=Nice::GeoLocation()) const
 Use this command to get rotator polynomials. More...
 
bool apparentMagnitudeIsGreater (double _mag) const
 
void aladin () const
 Open a firefox window to show the current region of the sky in Aladin's DSS2 . Opens a firefox screen with a 6 arcmin field-of-view around this target. More...
 
 IifStar ()
 
 IifStar (const lbto::position2 &star)
 
 IifStar (const Nice::DMS &ra, const Nice::DMS &dec)
 
 IifStar (const std::string &str, const std::string &typ)
 
 operator Nice::SkyPoint () const
 
double distance (const IifStar &oth) const
 
std::string toLbtoLoc () const
 
std::string toPosition2Py () const
 
std::string object () const
 
IifStar propMot (const Nice::Date &t) const
 
IifStar propMot () const
 
IifStar precess (const Nice::Date &t) const
 
IifStar precess () const
 
Nice::DMS getPang (const Nice::Date &t=Nice::Date::now(), const Nice::GeoLocation &geosite=Nice::GeoLocation()) const
 
Nice::SkyPoint getHoriz (const Nice::Date &t=Nice::Date::now(), const Nice::GeoLocation &geosite=Nice::GeoLocation()) const
 
Nice::DMS getPangDot (const Nice::Date &t=Nice::Date::now(), const Nice::GeoLocation &geosite=Nice::GeoLocation())
 
Nice::DMS derotStartAng (const Nice::Date t, const double lowLim, const double hiLim, const float dirScale, const int durat=12 *3600, const Nice::GeoLocation &geosite=Nice::GeoLocation()) const
 
Nice::DMS derotStartAng (const Nice::Date t, const Nice::Point &travelrange, const Nice::Point &transDegree, const float cfgDirection, const int durat=12 *3600, const Nice::GeoLocation &geosite=Nice::GeoLocation()) const
 
lbto::result GetRotatorPolynomials (Ice::Double start, Ice::Int count, Ice::Double interval, Ice::Int order, const std::string &side, const Nice::GeoLocation &geosite=Nice::GeoLocation()) const
 
bool apparentMagnitudeIsGreater (double _mag) const
 
void aladin () const
 

Static Public Member Functions

static Nice::DMS getGST (const Nice::Date &t=Nice::Date::now())
 compute the apparent Greenwich sidereal time. More...
 
static Nice::DMS getLST (const Nice::Date &t=Nice::Date::now(), const Nice::GeoLocation &geosite=Nice::GeoLocation())
 compute the local sidereal time. More...
 
static Nice::DMS getGST (const Nice::Date &t=Nice::Date::now())
 
static Nice::DMS getLST (const Nice::Date &t=Nice::Date::now(), const Nice::GeoLocation &geosite=Nice::GeoLocation())
 

Additional Inherited Members

- Public Attributes inherited from lbto::position2
::std::string type
 
::Ice::Double coord1
 
::Ice::Double coord2
 
::std::string system
 
::Ice::Double epoch
 
::std::string equinox
 
::Ice::Double pmcoord1
 
::Ice::Double pmcoord2
 
::Ice::Double apparentMagnitude
 
::std::string filter
 
::Ice::Double color
 
::std::string colorType
 
::Ice::Float wavelength
 
::std::string file
 
::Ice::Double time
 
::Ice::Double RARate
 
::Ice::Double DECRate
 

Detailed Description

A IifStar object is a single sky object with location, brightness ect.


Since
2017-01-18
Author
R. J. Mathar

Constructor & Destructor Documentation

◆ IifStar() [1/8]

Ltcs::IifStar::IifStar ( )

default ctor. Basically not useful, but to build an empty star catalogue


Since
2017-01-18

◆ IifStar() [2/8]

Ltcs::IifStar::IifStar ( const lbto::position2 star)

Create from a given structure.


Parameters
starThe contents to be read in.
Since
2017-03-17

◆ IifStar() [3/8]

Ltcs::IifStar::IifStar ( const Nice::DMS ra,
const Nice::DMS dec 
)

Ctor given just a position on the sky. The proper motions, magnitudes etc are all kept at zero.


Parameters
raRight ascension
decDeclination
Since
2017-01-21

◆ IifStar() [4/8]

Ltcs::IifStar::IifStar ( const std::string &  str,
const std::string &  typ 
)

Ctor with a specification of a single star. This should be line conforming to http://wiki.lbto.org/bin/view/Commissioning/LBTOStarCatalogs but not a comment line.


Parameters
strThe string. This is typically a line of a star catalogue.
typThe indication of how this string is formatted. Should be "lbto" or "nomad". No other formats are implemented.
Since
2017-01-20

◆ IifStar() [5/8]

Ltcs::IifStar::IifStar ( )

◆ IifStar() [6/8]

Ltcs::IifStar::IifStar ( const lbto::position2 star)

◆ IifStar() [7/8]

Ltcs::IifStar::IifStar ( const Nice::DMS ra,
const Nice::DMS dec 
)

◆ IifStar() [8/8]

Ltcs::IifStar::IifStar ( const std::string &  str,
const std::string &  typ 
)

Member Function Documentation

◆ aladin() [1/2]

void Ltcs::IifStar::aladin ( ) const

Open a firefox window to show the current region of the sky in Aladin's DSS2 . Opens a firefox screen with a 6 arcmin field-of-view around this target.


Since
2017-06-26

◆ aladin() [2/2]

void Ltcs::IifStar::aladin ( ) const

◆ apparentMagnitudeIsGreater() [1/2]

bool Ltcs::IifStar::apparentMagnitudeIsGreater ( double  _mag) const
inline

◆ apparentMagnitudeIsGreater() [2/2]

bool Ltcs::IifStar::apparentMagnitudeIsGreater ( double  _mag) const
inline

◆ derotStartAng() [1/4]

Nice::DMS Ltcs::IifStar::derotStartAng ( const Nice::Date  t,
const double  lowLim,
const double  hiLim,
const float  dirScale,
const int  durat = 12 *3600,
const Nice::GeoLocation geosite = Nice::GeoLocation() 
) const

◆ derotStartAng() [2/4]

Nice::DMS Ltcs::IifStar::derotStartAng ( const Nice::Date  t,
const double  lowLim,
const double  hiLim,
const float  dirScale,
const int  durat = 12*3600,
const Nice::GeoLocation geosite = Nice::GeoLocation() 
) const

compute a best start angle for derotation. The parallactic angle is computed from the start time into the future with 20 seconds of resolution, monitoring the maximum and minimum angles. The angle is computed which lets this derotation stay within the limits for the longest possible duration.


Parameters
tThe civil time in UTC time scales at which derotation should start. Note that this can be a very rough estimate (of the order of 1 or 2 minutes) because the actual start of the derotation will determine the derotator angles. This here is just to get an estimate about the rough extrapolation of the trajectory into the future.
lowLimThe lower limit switch of the motor (in degrees). This is usually obtained by converting the TRAVELRANGE[0] by the TRANS.DEGREE of the configuration.
hiLimThe high limit switch (in degrees) This is usually obtained by converting the TRAVELRANGE[1] by the TRANS.DEGREE of the configuration.
dirScaleThe sign of this value must be positive if positive steps lead to positive angles, otherwise negative. So the sign should be the sign of the factor in TRANS.DEGREE in the configuration file, that means negative for the GWS DX as of 2017-05-03, otherwise positive. The absolute value should be the absolute value of CFG.DIRECTION, which is 0.5 for the two K-mirrors and 1 for the 3 other cases.
duratThe maximum time of extrapolating the trajectory (in seconds)
geositeImplies the geographic longitude of the observatory. The default is the LBTO in Arizona, the default ctor for the GeoLocation.
Returns
The motor angle (in degrees) that maximises the time until the trajectory steps outside the limit switches. This is in units of the nominal motor angles as used elsewhere, taking sign and value of dirScale into account. The value could be used straight away to send the derototar motor to that angle to start derotation at time t.
Since
2017-05-03

◆ derotStartAng() [3/4]

Nice::DMS Ltcs::IifStar::derotStartAng ( const Nice::Date  t,
const Nice::Point travelrange,
const Nice::Point transDegree,
const float  cfgDirection,
const int  durat = 12 *3600,
const Nice::GeoLocation geosite = Nice::GeoLocation() 
) const

◆ derotStartAng() [4/4]

Nice::DMS Ltcs::IifStar::derotStartAng ( const Nice::Date  t,
const Nice::Point travelrange,
const Nice::Point transDegree,
const float  cfgDirection,
const int  durat = 12*3600,
const Nice::GeoLocation geosite = Nice::GeoLocation() 
) const

compute a proposal for a best start angle for derotation. The parallactic angle is computed from the start time into the future with 20 seconds of resolution, monitoring the maximum and minimum angles. The angle is computed which lets this derotation stay within the limits for the longest possible duration.


Parameters
tThe civil time in UTC time scales at which derotation should start.
travelrangeThe motor limit switches in units of steps. This is usually obtained by reading the TRAVELRANGE in the configuration.
transDegreeThe conversion matrix for conversion of steps to degress. This is usually obtained by reading TRANS.DEGREE of the configuration.
cfgDirectionThe value of CFG.DIRECTION of the configuration. The absolute value is 0.5 for K-mirrors and 1.0 for the others.
geositeImplies the geographic longitude of the observatory. The default is the LBTO in Arizona, the default ctor for the GeoLocation.
Returns
The motor angle (in degrees) that maximises the time until the trajectory steps outside the limit switches. This is in units of the nominal motor angles as used elsewhere. This could be used straight away to send the derototar motor to that angle to start derotation at time t.
Since
2017-05-03

◆ distance() [1/2]

double Ltcs::IifStar::distance ( const IifStar oth) const

◆ distance() [2/2]

double Ltcs::IifStar::distance ( const IifStar oth) const

Distance to another star in units of radians.


Parameters
othThe other star to which the distance (along a great arc) is measured.
Returns
The distance on the sky in degrees.
Since
2017-01-18

◆ getGST() [1/2]

Nice::DMS Ltcs::IifStar::getGST ( const Nice::Date t = Nice::Date::now())
static

compute the apparent Greenwich sidereal time.


Parameters
[in]tThe civil time in UTC time scales. The default is "now", the time of the function call.
Returns
Greenwich apparent (true) sidereal time. The return value is basically an angle with the usual equivalence that 360 deg = 24 hrs. For human read purposes this is to be rendered with value.reduce().toHMSString() to get hours, minutes and seconds.

◆ getGST() [2/2]

static Nice::DMS Ltcs::IifStar::getGST ( const Nice::Date t = Nice::Date::now())
static

◆ getHoriz() [1/2]

Nice::SkyPoint Ltcs::IifStar::getHoriz ( const Nice::Date t = Nice::Date::now(),
const Nice::GeoLocation geosite = Nice::GeoLocation() 
) const

◆ getHoriz() [2/2]

Nice::SkyPoint Ltcs::IifStar::getHoriz ( const Nice::Date t = Nice::Date::now(),
const Nice::GeoLocation geosite = Nice::GeoLocation() 
) const

compute the horizontal coordinates (altitude, azimuth)


Parameters
tThe civil time in UTC time scales. The default is "now", the time of the function call.
geositeImplies the geographic longitude of the observatory. The default is the LBTO in Arizona, the default ctor for the GeoLocation.
Returns
The two coordinates in the horizontal system.
Since
2017-05-29

◆ getLST() [1/2]

Nice::DMS Ltcs::IifStar::getLST ( const Nice::Date t = Nice::Date::now(),
const Nice::GeoLocation geosite = Nice::GeoLocation() 
)
static

compute the local sidereal time.


Parameters
tThe civil time in UTC time scales. The default is "now", the time of the function call.
geositeImplies the geographic longitude of the observatory. The default is the LBTO in Arizona, the default ctor for the GeoLocation.
Returns
Apparent (a.k.a true) sidereal time. Effectively the Greenwich sidereal time plus the (East) longitude of the observer. The return value is basically an angle. For human read purposes this is to be rendered with value.reduce().toHMSString() to get hours, minutes and seconds. Subtract the right ascension to get hour angle.

◆ getLST() [2/2]

static Nice::DMS Ltcs::IifStar::getLST ( const Nice::Date t = Nice::Date::now(),
const Nice::GeoLocation geosite = Nice::GeoLocation() 
)
static

◆ getPang() [1/2]

Nice::DMS Ltcs::IifStar::getPang ( const Nice::Date t = Nice::Date::now(),
const Nice::GeoLocation geosite = Nice::GeoLocation() 
) const

◆ getPang() [2/2]

Nice::DMS Ltcs::IifStar::getPang ( const Nice::Date t = Nice::Date::now(),
const Nice::GeoLocation geosite = Nice::GeoLocation() 
) const

compute the parallactic angle.


Parameters
tThe civil time in UTC time scales. The default is "now", the time of the function call.
geositeImplies the geographic longitude of the observatory. The default is the LBTO in Arizona, the default ctor for the GeoLocation.
Returns
Parallactic angle of this star at the given time.
Since
2017-04-06

◆ getPangDot() [1/2]

Nice::DMS Ltcs::IifStar::getPangDot ( const Nice::Date t = Nice::Date::now(),
const Nice::GeoLocation geosite = Nice::GeoLocation() 
)

◆ getPangDot() [2/2]

Nice::DMS Ltcs::IifStar::getPangDot ( const Nice::Date t = Nice::Date::now(),
const Nice::GeoLocation geosite = Nice::GeoLocation() 
)

compute the first time derivative of the parallactic angle.


Parameters
tThe civil time in UTC time scales. The default is "now", the time of the function call.
geositeImplies the geographic longitude of the observatory. The default is the LBTO in Arizona, the default ctor for the GeoLocation.
Returns
derivative of parallactic angle of this star at the given time per second.
Since
2017-04-06

◆ GetRotatorPolynomials() [1/2]

lbto::result Ltcs::IifStar::GetRotatorPolynomials ( Ice::Double  start,
Ice::Int  count,
Ice::Double  interval,
Ice::Int  order,
const std::string &  side,
const Nice::GeoLocation geosite = Nice::GeoLocation() 
) const

◆ GetRotatorPolynomials() [2/2]

lbto::result Ltcs::IifStar::GetRotatorPolynomials ( Ice::Double  start,
Ice::Int  count,
Ice::Double  interval,
Ice::Int  order,
const std::string &  side,
const Nice::GeoLocation geosite = Nice::GeoLocation() 
) const

Use this command to get rotator polynomials.

Parameters
startthe start time in MJD (UT days)
countthe number of points in the trajectory
intervalthe time between points (seconds)
orderthe desired polynomial order (0,1,2)
sidethe side this command applies to.
Returns
Result object
Since
2017-02-01 Try to calculate vals from the current parallactic angle
2017-02-14 Flip sign of polynomial coefficients (as IIF does)
Todo:
get a realistic local sidereal time via sofa

◆ object() [1/2]

std::string Ltcs::IifStar::object ( ) const

A construed object name derived from the coordinates.


Returns
The local radec[] numbers are shown as JHHMMSS+-DDMMSS
Since
2017-03-30

◆ object() [2/2]

std::string Ltcs::IifStar::object ( ) const

◆ operator Nice::SkyPoint() [1/2]

Ltcs::IifStar::operator Nice::SkyPoint ( ) const

Construct a simple ra/dec pointing from this.


Returns
Cast into the two angles of a ra/dec pair.
Since
2017-01-18

◆ operator Nice::SkyPoint() [2/2]

Ltcs::IifStar::operator Nice::SkyPoint ( ) const

◆ precess() [1/4]

Ltcs::IifStar Ltcs::IifStar::precess ( const Nice::Date t) const

Apply proper motion and precession from catalogue origin to some other time.


Parameters
tThe time when the coordinates should be valid.
Returns
a star moved from its epoch to the coordinates at time t.
Warning
This should not be called in conjunction with propMot(). The two functions are to be used exclusively, not in succession.
Since
2017-06-20

◆ precess() [2/4]

IifStar Ltcs::IifStar::precess ( const Nice::Date t) const

◆ precess() [3/4]

IifStar Ltcs::IifStar::precess ( ) const

◆ precess() [4/4]

Ltcs::IifStar Ltcs::IifStar::precess ( ) const

Precess equatorial coordinate from the catalogues epoch to now.


Returns
a star moved from its epoch to now according to proper motion and Earth precession.
Since
2017-03-01

◆ propMot() [1/4]

IifStar Ltcs::IifStar::propMot ( const Nice::Date t) const

◆ propMot() [2/4]

Ltcs::IifStar Ltcs::IifStar::propMot ( const Nice::Date t) const

Apply a proper motion.


Parameters
tThe time when the motion ought to be finished.
Returns
a star moved from its epoch to the epoch of t according to its proper motion vector.
Since
2017-02-28

◆ propMot() [3/4]

Ltcs::IifStar Ltcs::IifStar::propMot ( ) const

Apply a proper motion.


Returns
a star moved from its epoch to now according to its proper motion vector.
Since
2017-02-28

◆ propMot() [4/4]

IifStar Ltcs::IifStar::propMot ( ) const

◆ toLbtoLoc() [1/2]

std::string Ltcs::IifStar::toLbtoLoc ( ) const

◆ toLbtoLoc() [2/2]

std::string Ltcs::IifStar::toLbtoLoc ( ) const

Convert the Ra and Dec coordinates to a LBTO format.


Returns
A string of the form HH MM SS.ssss sDD HH MM SS.sss .

◆ toPosition2Py() [1/2]

std::string Ltcs::IifStar::toPosition2Py ( ) const

◆ toPosition2Py() [2/2]

std::string Ltcs::IifStar::toPosition2Py ( ) const

Convert the position2 structure to a Python list.


Returns
A string of the form ['type',coord1,coord2,....,DECRate]

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