TwiceAsNice
2019-02-18
|
A LicsStarcat object is a star catalogue with a set of stars. More...
#include <LicsStarcat.h>
Public Member Functions | |
LicsStarcat () | |
default ctor. This defines an empty star catalogue More... | |
LicsStarcat (const lbto::SeqPos2 &slist) | |
Define the catalogue through a list of stars. More... | |
LicsStarcat (const std::string &ifnam, const std::string &typ) | |
Define the catalogue by reading a LBTO ASCII catalogue. More... | |
LicsStarcat (const std::vector< std::string > &ifnam, const std::string &typ) | |
Define the catalogue by merging one or more LBTO ASCII catalogues. More... | |
void | fromNomad (double cntr[2], double conrad, double faint) |
Fill the list of stars with an online call of the NOMAD catalogue. If the computer or internet are down, or the search criteria yield effectively no star, the resulting catalog will be empty. More... | |
int | brightest () const |
find brightest star in the list More... | |
Lics::LicsStar | starNo (int idx) const |
Return the i-th star. More... | |
void | add (const Lics::LicsStarcat &s) |
Add all stars of another catalogue. Warning: There is no criterion activated/applied that eliminates duplicates. More... | |
lbto::SeqPos2 | roi (const double coord1, const double coord2, const double dist) const |
reduce the star set to a neighbourhood (region of interest) of some coordinate. More... | |
lbto::SeqPos2 | roi (const lbto::position2 &cntr, const double dist) const |
reduce the star set to a neighbourhood (region of interest) of some coordinate. More... | |
std::string | toLbtoFmt (const lbto::position2 &cntr, const Nice::Date &t, const double motang[2], int verb, bool batch, const bool ask4Kfp, const double dist=0.001) |
Return a sequence of lines equivalent to the small catalogues of LBTO. This is called (by overloading) from licsStarcat.cc . Inside this function the predicted star positions are forwarded to the SE GUI. More... | |
std::string | toLbtoFmt (const Nice::Date &t, const double motang[2], int verb, bool batch, const bool ask4Kfp) |
Return a sequence of lines equivalent to the small catalogues of LBTO. This is the entry point taken by licsStarcat.cc . More... | |
std::string | toLbtoString (const lbto::position2 &cntr, const Nice::Date &t, const double dist) |
Return a sequence of lines equivalent to the small catalogues of LBTO. This essentially applies proper motion and precession to a local copy of the stars (but leaves the stars in this catalog at their equinox/epoch). More... | |
std::string | toXephem () const |
Return a sequence of lines equivalent to the Xephem catalog format. More... | |
Nice::MapStringPoint | assignSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const Nice::SeqPoint &coo, const std::string &unit, std::vector< std::vector< short > > &selists, bool interact, std::vector< int > &assocIdx) |
convert a list of F coordinates to SE assignments. The input is a set of 2D point coordinates in the SE plane, coo. The task of this function is to associate with as many points as possible one SE to each of them without collisions of the arms. More... | |
LicsStarcat | toSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws) |
Convert catalogue positions to SE focal plane Cartesian coordinates. More... | |
LicsStarcat | propMot () const |
Apply all proper motions. More... | |
LicsStarcat | propMot (const Nice::Date &t) const |
Apply the proper motions. More... | |
LicsStarcat | precess () const |
Correct equatorial coordinates for precession. More... | |
LicsStarcat | precess (const Nice::Date &t) const |
Correct for precession. More... | |
void | aladin () const |
Show the region of the sky with Aladin of the university of Strasbourgh. This opens a brower window that shows the 3 1/2 arcmin surrounding of the target star. More... | |
void | skymake (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ao, std::string &ffile, Nice::Date &t, const float asperpix=0.4) |
Generate a ds9 popup GUI with a skymaker mockup view of the sky. More... | |
LicsStarcat () | |
LicsStarcat (const lbto::SeqPos2 &slist) | |
LicsStarcat (const std::string &ifnam, const std::string &typ) | |
LicsStarcat (const std::vector< std::string > &ifnam, const std::string &typ) | |
void | fromNomad (double cntr[2], double conrad, double faint) |
int | brightest () const |
Lics::LicsStar | starNo (int idx) const |
void | add (const Lics::LicsStarcat &s) |
lbto::SeqPos2 | roi (const double coord1, const double coord2, const double dist) const |
lbto::SeqPos2 | roi (const lbto::position2 &cntr, const double dist) const |
std::string | toLbtoFmt (const lbto::position2 &cntr, const Nice::Date &t, const double motang[2], int verb, bool batch, const bool ask4Kfp, const double dist=0.001) |
std::string | toLbtoFmt (const Nice::Date &t, const double motang[2], int verb, bool batch, const bool ask4Kfp) |
std::string | toLbtoString (const lbto::position2 &cntr, const Nice::Date &t, const double dist) |
std::string | toXephem () const |
Nice::MapStringPoint | assignSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const Nice::SeqPoint &coo, const std::string &unit, std::vector< std::vector< short > > &selists, bool interact, std::vector< int > &assocIdx) |
LicsStarcat | toSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws) |
LicsStarcat | propMot () const |
LicsStarcat | propMot (const Nice::Date &t) const |
LicsStarcat | precess () const |
LicsStarcat | precess (const Nice::Date &t) const |
void | aladin () const |
void | skymake (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ao, std::string &ffile, Nice::Date &t, const float asperpix=0.4) |
Static Public Member Functions | |
static void | seGUI (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const Nice::MapStringPoint &Fmap) |
Submit a list of positions to the SE GUI and/or move the SE arms. More... | |
static LicsStarcat | presetToSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws) |
Convert catalogue positions used with the preset to SE focal plane coordinates. More... | |
static Nice::Point | offsetSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, double deltaRa, double deltaDec) |
Convert differential catalogue positions used with the offset to SE focal plane coordinates. More... | |
static void | seGUI (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const Nice::MapStringPoint &Fmap) |
static LicsStarcat | presetToSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws) |
static Nice::Point | offsetSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, double deltaRa, double deltaDec) |
Protected Member Functions | |
Nice::SeqPoint | toSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const Nice::Date &t, double &pang, double &mang, const std::string &unit, double mum2as, const bool ask4Kfp, Lics::LicsAffTrans &wcs, std::vector< int > &assocIdx) |
Convert catalogue positions to SE focal plane Cartesian coordinates. More... | |
Nice::SeqPoint | toSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const double pang, const double mang, Nice::SeqPoint kfpcoords, const std::string &unit, double mum2as, Lics::LicsAffTrans &wcs, std::vector< int > &assocIdx) |
Convert catalogue positions to SE Cartesian coordinates. More... | |
Nice::MapStringPoint | permuteSE (const Nice::SeqPoint &coo, const Laos::LaosSeSet &seSet, Nice::Point **locCoo, int seN, const std::vector< std::vector< short > > &selists, const std::vector< int > &assocIdx) |
Permute the assignment of points to SE's to optimize placement. More... | |
Nice::SeqPoint | toSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const Nice::Date &t, double &pang, double &mang, const std::string &unit, double mum2as, const bool ask4Kfp, Lics::LicsAffTrans &wcs, std::vector< int > &assocIdx) |
Nice::SeqPoint | toSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const double pang, const double mang, Nice::SeqPoint kfpcoords, const std::string &unit, double mum2as, Lics::LicsAffTrans &wcs, std::vector< int > &assocIdx) |
Nice::MapStringPoint | permuteSE (const Nice::SeqPoint &coo, const Laos::LaosSeSet &seSet, Nice::Point **locCoo, int seN, const std::vector< std::vector< short > > &selists, const std::vector< int > &assocIdx) |
Static Protected Member Functions | |
static std::vector< std::vector< short > > | choose (const std::vector< std::vector< short > > &selists, std::vector< int > &keeplst) |
Assemble all allowed combinations of assignments. The task is to figure out by readign the 2D table selists and a list of first (leading) indices of that list of admissable points, how this set of points can be assigned to the SE's without having a SE being used more than once. More... | |
static std::vector< std::vector< short > > | choose (const std::vector< std::vector< short > > &selists, std::vector< short > presel, std::vector< int > &keeplst) |
Assemble all allowed combinations of assignments. More... | |
static void | plotMap (const Nice::MapStringPoint &m, const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const Laos::LaosSeSet &seSet) |
plot the assignment of SE over the focal plane for a visual feedback with Gnuplot. More... | |
static bool | collides (const Laos::LaosSeSet &seSet, Nice::Point **locCoo, std::vector< short > Cc) |
check whether some arms collide. The arms that are assigned to local coordinates and indexed by parameter Cc are augmented by the disabled arms at their configured positions. Then in a double loop over all the pairs of arm contours watch whether the contours intersect. More... | |
static std::vector< std::vector< short > > | choose (const std::vector< std::vector< short > > &selists, std::vector< int > &keeplst) |
static std::vector< std::vector< short > > | choose (const std::vector< std::vector< short > > &selists, std::vector< short > presel, std::vector< int > &keeplst) |
static void | plotMap (const Nice::MapStringPoint &m, const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const Laos::LaosSeSet &seSet) |
static bool | collides (const Laos::LaosSeSet &seSet, Nice::Point **locCoo, std::vector< short > Cc) |
Private Member Functions | |
void | init (const std::string &ifnam, const std::string &typ) |
Define the catalogue by reading a LBTO ASCII or NOMAD catalogue. More... | |
Nice::SeqPoint | kfpListToSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const double pang, const double mang, Nice::SeqPoint kfpcoords, const std::string &unit, double mum2as, std::vector< int > &assocIdx) |
Convert KFP positions to SE Cartesian coordinates. More... | |
LicsStarcat | mergePts (const Nice::SeqPoint &pts, const std::vector< int > &asocIdx, const Laos::LaosSeAOType &ghws) const |
Create a star catalog with a list of 2D point coordinates merged into. More... | |
void | init (const std::string &ifnam, const std::string &typ) |
Nice::SeqPoint | kfpListToSE (const Lics::LicsIIFSide &sdx, const Laos::LaosSeAOType &ghws, const double pang, const double mang, Nice::SeqPoint kfpcoords, const std::string &unit, double mum2as, std::vector< int > &assocIdx) |
LicsStarcat | mergePts (const Nice::SeqPoint &pts, const std::vector< int > &asocIdx, const Laos::LaosSeAOType &ghws) const |
Static Private Member Functions | |
static std::string | tmpdir (const std::string &fnam) |
create TMPDIR if it does not yet exist More... | |
static std::string | tmpdir (const std::string &fnam) |
Lics::LicsStarcat::LicsStarcat | ( | ) |
default ctor. This defines an empty star catalogue
Lics::LicsStarcat::LicsStarcat | ( | const lbto::SeqPos2 & | slist | ) |
Define the catalogue through a list of stars.
slist | The stars in the IIF style that define the (original) set of stars. |
Define the catalogue by reading a LBTO ASCII catalogue.
ifnam | The File stream of the ASCII file. |
typ | Type of the ASCII file. Recognized are the 13-field "lbto" and the 17-field "nomad" |
Lics::LicsStarcat::LicsStarcat | ( | const std::vector< std::string > & | ifnam, |
const std::string & | typ | ||
) |
Define the catalogue by merging one or more LBTO ASCII catalogues.
ifnam | The File names of the ASCII files. |
typ | Type of the ASCII file. Recognized are "lbto" and "nomad." |
Lics::LicsStarcat::LicsStarcat | ( | ) |
Lics::LicsStarcat::LicsStarcat | ( | const lbto::SeqPos2 & | slist | ) |
Lics::LicsStarcat::LicsStarcat | ( | const std::vector< std::string > & | ifnam, |
const std::string & | typ | ||
) |
void Lics::LicsStarcat::add | ( | const Lics::LicsStarcat & | s | ) |
Add all stars of another catalogue. Warning: There is no criterion activated/applied that eliminates duplicates.
s | The stars to be incorporated. |
void Lics::LicsStarcat::add | ( | const Lics::LicsStarcat & | s | ) |
void Lics::LicsStarcat::aladin | ( | ) | const |
Show the region of the sky with Aladin of the university of Strasbourgh. This opens a brower window that shows the 3 1/2 arcmin surrounding of the target star.
void Lics::LicsStarcat::aladin | ( | ) | const |
Nice::MapStringPoint Lics::LicsStarcat::assignSE | ( | const Lics::LicsIIFSide & | sdx, |
const Laos::LaosSeAOType & | ghws, | ||
const Nice::SeqPoint & | coo, | ||
const std::string & | unit, | ||
std::vector< std::vector< short > > & | selists, | ||
bool | interact, | ||
std::vector< int > & | assocIdx | ||
) |
Nice::MapStringPoint Lics::LicsStarcat::assignSE | ( | const Lics::LicsIIFSide & | sdx, |
const Laos::LaosSeAOType & | ghws, | ||
const Nice::SeqPoint & | coo, | ||
const std::string & | unit, | ||
std::vector< std::vector< short > > & | selists, | ||
bool | interact, | ||
std::vector< int > & | assocIdx | ||
) |
convert a list of F coordinates to SE assignments. The input is a set of 2D point coordinates in the SE plane, coo. The task of this function is to associate with as many points as possible one SE to each of them without collisions of the arms.
[in] | sdx | The side indicator, SX or DX. |
[in] | ghws | The flag for either HWS or GWS. |
[in] | coo | The list of F plane coordinates to be distributed. coo[p] are the F plane coordinates of star number p that was admitted to the annulus. |
[in] | unit | mm or um, indicating the units implied by the coo coordinates. |
[out] | selists | On output the possible 0-based SE indices for each of the points. This list will have eliminated SE's that are not preferred by the even-odd rule on the GWS. |
[in,out] | assocIdx | A vector of 0-based indices into a list. On entry it tells which of the coo has which index (so coo.size() == assocIdx.size()), and on return it has eliminated the entries such that the return map has the equivalent information. |
[in] | interact | If true triggers an interactive display of the assigned positions with gnuplot(1) |
[in,out] | assocIdx | Keeps track which of the stars of the full star catalog went to which SE. On input assocIdx[p] is the index of the p'th star in coo in the full star catalog (where full means before the selection by the 1 and 3 arcmin rings). |
int Lics::LicsStarcat::brightest | ( | ) | const |
int Lics::LicsStarcat::brightest | ( | ) | const |
find brightest star in the list
|
staticprotected |
Assemble all allowed combinations of assignments. The task is to figure out by readign the 2D table selists and a list of first (leading) indices of that list of admissable points, how this set of points can be assigned to the SE's without having a SE being used more than once.
selists | Contains the list of SE indices s accessible by point p in selelists[p][..]=s. |
keeplst | Contains a sublist of the first indices of p to be kept. |
|
staticprotected |
|
staticprotected |
Assemble all allowed combinations of assignments.
This combinatorial scan of the set of local point coordinates gathers all combinations of assigning the point set to a set of star enlargers. This admints only assignments where the associated star enlarger s can reach point p according to the local coordinate (travel range), and where no star enlarger must reach to two different points.
[in] | selists[p][.] | shows for each point p to which star enlargers it can be assigned because it is reachable. |
[in,out] | presel | The already selected star enlargers. This is a list of indices (of partial length less than cooN) of SE's already assigned by the earlier points. Minus-ones are used for skipped SE's. |
|
staticprotected |
|
staticprotected |
check whether some arms collide. The arms that are assigned to local coordinates and indexed by parameter Cc are augmented by the disabled arms at their configured positions. Then in a double loop over all the pairs of arm contours watch whether the contours intersect.
seSet | All 8 or 12 SE arms with their travel ranges. The disabled arms here are inserted at their configure positions such that the always appear as potential collision objects, even though they are never part of the Cc index set. |
coo | The set of poitns in the (global) focal plane coordinates. |
locCoo | The set of points of in the arms' local cordinate systems. |
Cc | The index set of the arms to be placed for this solution. |
|
staticprotected |
void Lics::LicsStarcat::fromNomad | ( | double | cntr[2], |
double | conrad, | ||
double | faint | ||
) |
Fill the list of stars with an online call of the NOMAD catalogue. If the computer or internet are down, or the search criteria yield effectively no star, the resulting catalog will be empty.
cntr | cntr[0,1] are RA and DEC in degrees. |
conrad | Cone search radius (degrees) |
faint | Magnitude limit |
void Lics::LicsStarcat::fromNomad | ( | double | cntr[2], |
double | conrad, | ||
double | faint | ||
) |
Define the catalogue by reading a LBTO ASCII or NOMAD catalogue.
ifnam | The File stream of the ASCII file. |
typ | Type of the ASCII file. Recognized are the 13-field "lbto" and the 17-field "nomad" |
|
private |
Convert KFP positions to SE Cartesian coordinates.
sdx | Indicates the side (SX or DX) of the SE. | |
ghws | Selects either the GWS or the HWS. The difference is that GWS stars are filtered by the 1 to 3 arcmin ring of radii off the center. HWS stars are filtered by the 0 .. 1 arcmin distance off the center. | |
pang | The effectively frozen parallactic angle, in radians. | |
mang | The effectively frozen motor angle, in radians. Effectively frozen means the motor angle is measured at the the same time as the parallactic angle while derotating. | |
kfpcoords | The list of focal plane coordinates from the IIF. These are not used by reference but with a full copy; the elimination of the stars according to the 1 arcmin and 3 arcmin criteria within this function does not effect the list of KFP coordinates of the caller. | |
unit | Either um or mm to indicate microns or millimeters. | |
mum2as | scale in the SE (GWS) or patrol camera (HWS) plane in units of microns per arcseconds. | |
[in,out] | assocIdx | On entry a list of indices telling the index of each kfpcoords[] in some other list. On exit a list of indices telling which of the points carries this index. The list is modified in this function to reflect which kfpcoords[] did not fit into the region selected by the annular mirror. For example: there were 3 elements in kfpcoords[0..2], and assocIdx[0..3] = [3,7,4] on entry, and on return there are only points for kfpcoords[0] and kfpcoords[1], then on rerutnr assoxIdx[0..1] = [3,7], where the middle one corresponding to kfpcoords[1] was erased. If that mapping was impossible (for example the kfpcoords and assocIdx lengths did not match), the assocIdx is empty on return to indicate that error. |
sdx | Indicates the side (SX or DX) of the SE. | |
ghws | Selects either the GWS or the HWS. The difference is that GWS stars are filtered by the 1 to 3 arcmin ring of radii off the center. HWS stars are filtered by the 0 .. 1 arcmin distance off the center. | |
pang | The effectively frozen parallactic angle, in radians. | |
mang | The effectively frozen motor angle, in radians. Effectively frozen means the motor angle is measured at the the same time as the parallactic angle while derotating. | |
kfpcoords | The list of focal plane coordinates from the IIF. These are not used by reference but with a full copy; the elimination of the stars according to the 1 arcmin and 3 arcmin criteria within this function does not effect the list of KFP coordinates of the caller. | |
unit | Either um or mm to indicate microns or millimeters. | |
mum2as | scale in the SE (GWS) or patrol camera (HWS) plane in units of microns per arcseconds. | |
[in,out] | assocIdx | On entry a list of indices telling the index of each kfpcoords[] in some other list. On exit a list of indices telling which of the points carries this index. The list is modified in this function to reflect which kfpcoords[] did not fit into the region selected by the annular mirror. For example: there were 3 elements in kfpcoords[0..2], and assocIdx[0..3] = [3,7,4] on entry, and on return there are only points for kfpcoords[0] and kfpcoords[1], then on rerutnr assoxIdx[0..1] = [3,7], where the middle one corresponding to kfpcoords[1] was erased. If that mapping was impossible (for example the kfpcoords and assocIdx lengths did not match), the assocIdx is empty on return to indicate that error. |
|
private |
|
private |
Create a star catalog with a list of 2D point coordinates merged into.
[in] | pts | |
[in] | assocIdx | |
[in] | ghws |
|
private |
|
static |
Convert differential catalogue positions used with the offset to SE focal plane coordinates.
sdx | Indicates the side (SX or DX) of the SE. |
ghws | Either LINC_GWS or LINC_HWS. GWS selections will be limited to the 1 to 3 arcmin ring of radii off the center. HWS stars in the list will be limited to the 0 .. 1 arcmin distance off the center. |
deltaRa | relative motion in right ascension. Radians, including the cos(delta) factor |
deltaDec | relative motion in declination. Radians. |
|
static |
|
protected |
Permute the assignment of points to SE's to optimize placement.
coo | The list of points in the Fplane (global coordinates) to be assigned to star enlargers. | |
[in] | seSet | The transformation matrices and travel ranges for all 8 or 12 star enlargers |
locCoo | The local coordinates of all points in all star enlargers (steps). Negative y coordinates of locCoo[p][s] indicate that point number p cannot be reached by star enlarger s, 0<=s<seN, 0<=p<coo.size(). | |
[in] | seN | Number of star enlargers. The upper limit of the fast (second) coordinate of locCoo. |
[in] | selists | tells for each index in coo whether it can be reached with SE indexed in seN. E.g. selists[3] = [3,5] says the 4th (0-based) coordinate coo[3] can be reached by SE 4 and 6 (1-based). |
[in,out] | assocIdx | Contains on input the information that coo[i] refers to star number assocIdx[i]. Contains on output a (possibly smaller) vector that the map point [i] refers to star number assocIdx[i]. |
|
protected |
|
staticprotected |
|
staticprotected |
plot the assignment of SE over the focal plane for a visual feedback with Gnuplot.
m | The map that assigns focal plane coordinates (microns) to SE's |
sdx | The flag that says SX or DX. |
gws | The flag that says GWS or HWS. |
coo | The global focal plane coordinates of all stars/points. |
seSet | The transformation matrices and travel ranges for all star enlargers |
Lics::LicsStarcat Lics::LicsStarcat::precess | ( | ) | const |
Correct equatorial coordinates for precession.
LicsStarcat Lics::LicsStarcat::precess | ( | ) | const |
Lics::LicsStarcat Lics::LicsStarcat::precess | ( | const Nice::Date & | t | ) | const |
Correct for precession.
t | The time when the motion ought to be finished. |
LicsStarcat Lics::LicsStarcat::precess | ( | const Nice::Date & | t | ) | const |
|
static |
|
static |
Convert catalogue positions used with the preset to SE focal plane coordinates.
This is basically a wrapper function for the python interface with minimalistic parameters, which accumulates the other interfaces by asking the derotator for the parallactic and motor angles at the time of the call. The difference to the toSE() function is that this here asks the IIF proxy (via the derotator) to use the star catalog that was stored during the recent preset within the proxy. (This may fail for the reasons explained in the licsStarcat info pages.)
sdx | Indicates the side (SX or DX) of the SE. |
ghws | Either LINC_GWS or LINC_HWS. GWS selections will be limited to the 1 to 3 arcmin ring of radii off the center. HWS stars in the list will be limited to the 0 .. 1 arcmin distance off the center. |
Lics::LicsStarcat Lics::LicsStarcat::propMot | ( | ) | const |
Apply all proper motions.
LicsStarcat Lics::LicsStarcat::propMot | ( | ) | const |
Lics::LicsStarcat Lics::LicsStarcat::propMot | ( | const Nice::Date & | t | ) | const |
Apply the proper motions.
t | The time to which the motion ought to be promoted. |
LicsStarcat Lics::LicsStarcat::propMot | ( | const Nice::Date & | t | ) | const |
lbto::SeqPos2 Lics::LicsStarcat::roi | ( | const double | coord1, |
const double | coord2, | ||
const double | dist | ||
) | const |
lbto::SeqPos2 Lics::LicsStarcat::roi | ( | const double | coord1, |
const double | coord2, | ||
const double | dist | ||
) | const |
reduce the star set to a neighbourhood (region of interest) of some coordinate.
coord1 | RA of the center of interest (radian) |
coord2 | DEC of the center of interest (radian) |
dist | Maximum distance to the (ra,dec) (radian). Effectively a radius working as a filter criterion on this set. |
lbto::SeqPos2 Lics::LicsStarcat::roi | ( | const lbto::position2 & | cntr, |
const double | dist | ||
) | const |
reduce the star set to a neighbourhood (region of interest) of some coordinate.
cntr | The star that defines the position of center of the search radius |
dist | Maximum distance to the (ra,dec) (radian) |
lbto::SeqPos2 Lics::LicsStarcat::roi | ( | const lbto::position2 & | cntr, |
const double | dist | ||
) | const |
|
static |
|
static |
Submit a list of positions to the SE GUI and/or move the SE arms.
This runs the python script licsSEPreset.py in a sub-process. And this sub-process in princple tries to move the SE arms to that position. Note: because Com-3 showed that the collision detection of the software is not safe, the action of actually moving the arms in licsSEPreset.py has been disabled for now.
[in] | sdx | Indicates the side (SX or DX) of the SE. |
[in] | ghws | Either LINC_GWS or LINC_HWS. for LINC_NOAO and LINC_PCAM this does nothing. |
[in] | Fmap | The proposed positions. Microns in the global focal plane 'F' system. |
void Lics::LicsStarcat::skymake | ( | const Lics::LicsIIFSide & | sdx, |
const Laos::LaosSeAOType & | ao, | ||
std::string & | ffile, | ||
Nice::Date & | t, | ||
const float | asperpix = 0.4 |
||
) |
Generate a ds9 popup GUI with a skymaker mockup view of the sky.
[in] | sdx | Indicating SX or DX. This has enormous impact on the GWS motor angle queries. |
[in] | ao | Indicating GWS or HWS. Note that the angles used here to rotate the images for the HWS case are incorrect. So this function is only used for test purposes from within licsStarcat. |
[in] | ffile | Permanent name of the mockup FITS file. If this is empty, no FITS file will be preserved, and the temporary file be removed when the operator closes the window. |
[in] | asperpix | Arcseconds per pixel in the mockup image. The GWS have size of roughly 300x300 thousand microns. We are interested in SE resolutions/prediction of roughly 0.5 mm, so an image size of the order of 600x600 px is appropriate. As 600 um =1", this gives roughly 0.8" for a asperpix. |
[in] | t | The time of reference to estimate parallactic angles etc. |
void Lics::LicsStarcat::skymake | ( | const Lics::LicsIIFSide & | sdx, |
const Laos::LaosSeAOType & | ao, | ||
std::string & | ffile, | ||
Nice::Date & | t, | ||
const float | asperpix = 0.4 |
||
) |
Lics::LicsStar Lics::LicsStarcat::starNo | ( | int | idx | ) | const |
Lics::LicsStar Lics::LicsStarcat::starNo | ( | int | idx | ) | const |
Return the i-th star.
|
staticprivate |
create TMPDIR if it does not yet exist
fname | The file to be created relativ to the TMPDIR as a temporary file. |
|
staticprivate |
std::string Lics::LicsStarcat::toLbtoFmt | ( | const lbto::position2 & | cntr, |
const Nice::Date & | t, | ||
const double | motang[2], | ||
int | verb, | ||
bool | batch, | ||
const bool | ask4Kfp, | ||
const double | dist = 0.001 |
||
) |
Return a sequence of lines equivalent to the small catalogues of LBTO. This is called (by overloading) from licsStarcat.cc . Inside this function the predicted star positions are forwarded to the SE GUI.
cntr | The star that defines the position of center of the search radius This takes the role of the main target star on the infrared camera. | |
t | The time to which the coordinate transformations apply. | |
motang | The angles of the motor (K-mirror for HWS, bearing for the GWS), in radians. | |
verb | Verbosity parameter for the SE x-y coordinates output. If verb & LBCS_LBCSSTARCAT_REPRINT is nonzero, the SE is replicated with distances etc. If verb & LBCS_LBCSSTARCAT_SE is nonzero, SE coordinates are printed. If verb & LBCS_LBCSSTARCAT_SX is nonzero, SE SX coordinates are printed. If verb & LBCS_LBCSSTARCAT_DX is nonzero, SE DX coordinates are printed. If verb & LBCS_LBCSSTARCAT_HWS is nonzero, SE HWS coordinates are printed. If verb & LBCS_LBCSSTARCAT_GWS is nonzero, SE GWS coordinates are printed. | |
batch | If true avoid popping up any interactive methods, GUIS and so on. | |
dist | Maximum distance to the (ra,dec) (radian) The default value of 0.001 rad equals 3.5 arcmin and is an upper quasi-limit assuming that the Linc-Nirvana patrol cameras have a FOV (diameter) of 6 arcmin, which is a radius of 3 arcmin. So just in case the brightest star is in the corner, 3.5 arcmin is an adapted standard. | |
[in] | ask4Kfp | If true, get KFP coordinates. Ask the dertotator service also for the KFP coordinates of this star catalogue from the IIF. |
cntr | The star that defines the position of center of the search radius This takes the role of the main target star on the infrared camera. | |
t | The time to which the coordinate transformations apply. | |
motang | The angles of the motor (K-mirror for HWS, bearing for the GWS), in radians. | |
verb | Verbosity parameter for the SE x-y coordinates output. If verb & LBCS_LBCSSTARCAT_REPRINT is nonzero, the SE is replicated with distances etc. If verb & LBCS_LBCSSTARCAT_SE is nonzero, SE coordinates are printed. If verb & LBCS_LBCSSTARCAT_SX is nonzero, SE SX coordinates are printed. If verb & LBCS_LBCSSTARCAT_DX is nonzero, SE DX coordinates are printed. If verb & LBCS_LBCSSTARCAT_HWS is nonzero, SE HWS coordinates are printed. If verb & LBCS_LBCSSTARCAT_GWS is nonzero, SE GWS coordinates are printed. | |
batch | If true avoid popping up any interactive methods, GUIS and so on. | |
dist | Maximum distance to the (ra,dec) (radian) The default value of 0.001 rad equals 3.5 arcmin and is an upper quasi-limit assuming that the Linc-Nirvana patrol cameras have a FOV (diameter) of 6 arcmin, which is a radius of 3 arcmin. So just in case the brightest star is in the corner, 3.5 arcmin is an adapted standard. | |
[in] | ask4Kfp | If true, get KFP coordinates. Ask the dertotator service also for the KFP coordinates of this star catalogue from the IIF. |
std::string Lics::LicsStarcat::toLbtoFmt | ( | const lbto::position2 & | cntr, |
const Nice::Date & | t, | ||
const double | motang[2], | ||
int | verb, | ||
bool | batch, | ||
const bool | ask4Kfp, | ||
const double | dist = 0.001 |
||
) |
std::string Lics::LicsStarcat::toLbtoFmt | ( | const Nice::Date & | t, |
const double | motang[2], | ||
int | verb, | ||
bool | batch, | ||
const bool | ask4Kfp | ||
) |
std::string Lics::LicsStarcat::toLbtoFmt | ( | const Nice::Date & | t, |
const double | motang[2], | ||
int | verb, | ||
bool | batch, | ||
const bool | ask4Kfp | ||
) |
Return a sequence of lines equivalent to the small catalogues of LBTO. This is the entry point taken by licsStarcat.cc .
[in] | t | The time at which the motor angles are valid. |
motang | The two motor angles. The k-mirror angle in motang[0], the GWS bearing in motang[1] | |
verb | Verbosity parameter for the SE x-y coordinates output. | |
batch | If true avoid popping up any interactive means, GUIS and so on. | |
[in] | ask4Kfp | If true, get KFP coordinates. Ask the dertotator service also for the KFP coordinates of this star catalogue from the IIF. |
std::string Lics::LicsStarcat::toLbtoString | ( | const lbto::position2 & | cntr, |
const Nice::Date & | t, | ||
const double | dist | ||
) |
Return a sequence of lines equivalent to the small catalogues of LBTO. This essentially applies proper motion and precession to a local copy of the stars (but leaves the stars in this catalog at their equinox/epoch).
cntr | The star that defines the position of center of the search radius |
t | The time to which the coordinate transformations apply. |
dist | The maximum distance for keeping stars, relative to cntr, in radians . |
std::string Lics::LicsStarcat::toLbtoString | ( | const lbto::position2 & | cntr, |
const Nice::Date & | t, | ||
const double | dist | ||
) |
Lics::LicsStarcat Lics::LicsStarcat::toSE | ( | const Lics::LicsIIFSide & | sdx, |
const Laos::LaosSeAOType & | ghws | ||
) |
Convert catalogue positions to SE focal plane Cartesian coordinates.
This is basically a wrapper function for the python interface with minimalistic parameters, which accumulates the other interfaces by asking the derotator for the parallactic and motor angles at the time of the call.
sdx | Indicates the side (SX or DX) of the SE. |
ghws | Either LINC_GWS or LINC_HWS. GWS selections will be limited to the 1 to 3 arcmin ring of radii off the center. HWS stars in the list will be limited to the 0 .. 1 arcmin distance off the center. |
LicsStarcat Lics::LicsStarcat::toSE | ( | const Lics::LicsIIFSide & | sdx, |
const Laos::LaosSeAOType & | ghws | ||
) |
|
protected |
|
protected |
Convert catalogue positions to SE focal plane Cartesian coordinates.
The routine applies proper motions to move from catalogue dates to the time t. The derotator service is asked for the correlated parallactic angle and motor angle (at a time when the derotator was active or started).
sdx | Indicates the side (SX or DX) of the SE. | |
ghws | Either LINC_GWS or LINC_HWS. GWS selections will be limited to the 1 to 3 arcmin ring of radii off the center. HWS stars in the list will be limited to the 0 .. 1 arcmin distance off the center. | |
t | The time to which proper motions and parallactic angle should refer to. | |
[in,out] | pang | The parallactic angles at the start of the derotation, in radians. |
[in,out] | mang | The motor angles at the start of the derotation, in radians. |
unit | Either um or mm to indicate microns or millimeters. | |
mum2as | The scale in units of microns per arcsecond. | |
[in] | ask4Kfp | If true, get KFP coordinates. Ask the dertotator service also for the KFP coordinates of this star catalogue from the IIF. |
[out] | wcs | The affine transformation that converts DEC/RA to SE positions. Here DEC is the [0] and RA the [1] part of the input vector in radians. This does not include precession, and should be applied to precessed star coordinates, or otherwise be multiplied by LicsStar::diffPrecess(). The output of the transformation is the x and y coordinate in the units of the unit parameter. |
[in,out] | assocIdx | The i'th component of this vectors says which 0-based list in the star catalog the i'th point refers to. May be empty on output if the matching algorithm failed for the reasons indicated in the source code. |
|
protected |
Convert catalogue positions to SE Cartesian coordinates.
Subselect either the 1 arcmin or the 1-to-3 arcmin set of stars. Then call for each of the remaining stars in the list either the routine that maps it's equatorial coordinates to the WS plane, or (if available) map the KFP coordinates to the WS plane.
The routine assumes that the current catalogue is already precessed to the equator of date.
sdx | Indicates the side (SX or DX) of the SE. | |
ghws | Selects either the GWS or the HWS. The difference is that GWS stars are filted by the 1 to 3 arcmin ring of radii off the center. HWS stars are filtered by the 0 .. 1 arcmin distance off the center. | |
pang | The effectively frozen parallactic angle, in radians. | |
mang | The effectively frozen motor angles, in radians. Effectively frozen means the motor angle is measured at the the same time as the parallactic angle while derotating. | |
kfpcoords | The list of focal plane coordinates from the IIF. If empty, this list is ignored. Otherwise it overwrites the internal mapping onto a tangential plane on the sky. | |
unit | Either um or mm to indicate microns or millimeters. | |
mum2as | scale in the focal plane in units of micros per arcseconds. | |
[out] | wcs | The affine transformation that converts DEC/RA to SE positions. Here DEC is the [0] and RA the [1] part of the input vector in radians. This is in J2000, and the wcs returned contains no differential rotation to the current date. The output of the transformation is the x and y coordinate in the plane in the millimeter or microns indicated by the unit parameter. |
[in,out] | assocIdx | On entry a list of kfpcoords.size() or size() elements that maps kernel focal plane coordinates or this stars list to some "original" star catalogue. On return the same list reduced to the points that are returned, which means, if some points are absent because the kfpcoord[] or at(.) was nto matched, the associated element in assocIdx[] is removed. If the size of assocIdx was incorrect on entry, it will be zero on return to indicate a mismatch. |
|
protected |
std::string Lics::LicsStarcat::toXephem | ( | ) | const |
std::string Lics::LicsStarcat::toXephem | ( | ) | const |
Return a sequence of lines equivalent to the Xephem catalog format.