gastro  0.1.0
 All Classes Files Functions Variables Pages
associations.h
1 // -*- C++ -*-
2 //
3 #ifndef ASSOCIATIONS__H
4 #define ASSOCIATIONS__H
5 
6 #include <string>
7 #include <iostream>
8 
9 #include "stringlist.h"
10 #include "refstar.h"
11 #include "ccdimage.h"
12 #include "measuredstar.h" // for CatalogLoader
13 #include "point.h"
14 
15 
17 class Associations {
18  public:
19 
20  StringList imageNames;// the names of individual ccd images
21  CcdImageList ccdImageList; // the catalog handlers
22  RefStarList refStarList;// the (e.g.) USNO stars
23  RefStarList photRefStarList; // the (e.g) Landolt stars
24  FittedStarList fittedStarList; // the std::list of stars that are going to be fitted
25 
26  // fit cuts and stuff:
27  Point commonTangentPoint;
28 
29  const CatalogLoader * load_it;
30 
31  void AssignMags();
32 
33 public:
34 
36 
37  Associations(const CatalogLoader & LoadIt = *CatalogLoader::DefaultCatalogLoader);
38 
41  { commonTangentPoint = CommonTangentPoint;};
42 
44  Point CommonTangentPoint() const { return commonTangentPoint;}
45 
47  bool AddImage(const std::string &ReducedImageName);
48 
50  bool AddImage(const ReducedImage &Ri);
51 
53  void AssociateCatalogs(const double MatchCutInArcSec = 0,
54  const bool UseFittedList = false,
55  const bool EnlargeFittedList = true);
56 
58  void RefitWCSs(const unsigned Order);
59 
60 
62  void CollectRefStars(const bool ProjectOnTP=true);
63 
64 
65 
66 
67 
71  void CollectMCStars(int realization = -1);
72  // void CheckMCStars(); // DELETE THIS METHOD
73 
76  void CollectPhotometricRefStars(std::string const& catalogname);
77  void AssociatePhotometricRefStars(double MatchCutInArcSec);
78  unsigned int GetNbAssociatedPhotometricRefStars() const { return nb_photref_associations; }
79 
81  void DeprojectFittedStars();
82 
84  /* If Color is "g-i", then the color is assigned from columns "g" and "i" of the colored catalog. */
85  void SetFittedStarColors(std::string DicStarListName,
86  std::string Color,
87  const double &MatchCutArcSec);
88 
89  // void SetRefPhotFactor(int chip, double photfact);
90 
92  void SelectFittedStars();
93 
94  void RefineFittedStars();
95 
96  void check_refcounts();
97 
98  void PrintStats() const;
99 
100  const CcdImageList& TheCcdImageList() const {return ccdImageList;}
101 
102  void SetFittedStarList(const FittedStarList &L);
103 
104  void AssignIndexes();
105 
106  unsigned int NShoots() const { return nshoots_; }
107 
109  unsigned NBands() const {return 1;}
110 
111 
112 private:
113  void AssociateRefStars(const double &MatchCutInArcSec, const Gtransfo *T);
114  unsigned int nshoots_;
115  unsigned int nb_photref_associations;
116 };
117 
118 #endif /* ASSOCIATIONS__H */
void CollectPhotometricRefStars(std::string const &catalogname)
This method associates the catalogs with an external catalog of photometric ref stars.
Definition: associations.cc:406
void CollectMCStars(int realization=-1)
This is Monte-Carlo stuff – to remove this from associations the Association class should provide us ...
void CollectRefStars(const bool ProjectOnTP=true)
Collect stars form an external reference catalog (USNO-A by default) that match the FittedStarList...
Definition: associations.cc:219
Associations(const CatalogLoader &LoadIt=*CatalogLoader::DefaultCatalogLoader)
Constructor. The user provides the routine that will turn the input catalog into a MeasuredStarList...
Definition: associations.cc:22
A list of FittedStar s. Such a list is typically constructed by Associations.
Definition: fittedstar.h:158
void SetCommonTangentPoint(const Point &CommonTangentPoint)
Sets a tangent point (reasonably centered for the input image set).
Definition: associations.h:40
The class that implements the relations between MeasuredStar and FittedStar.
Definition: associations.h:17
void AssociateCatalogs(const double MatchCutInArcSec=0, const bool UseFittedList=false, const bool EnlargeFittedList=true)
incrementaly builds a merged catalog of all image catalogs
Definition: associations.cc:95
Point CommonTangentPoint() const
can be used to project sidereal coordinates related to the image set on a plane.
Definition: associations.h:44
bool AddImage(const std::string &ReducedImageName)
actually imports the catalog and turns it into a MeasuredStarList using the provided "loader"...
Definition: associations.cc:30
void SelectFittedStars()
apply cuts (mainly number of measurements) on potential FittedStars
Definition: associations.cc:538
void DeprojectFittedStars()
Sends back the fitted stars coordinates on the sky FittedStarsList::inTangentPlaneCoordinates keeps t...
Definition: associations.cc:681
void SetFittedStarColors(std::string DicStarListName, std::string Color, const double &MatchCutArcSec)
Set the color field of FittedStar 's from a colored catalog.
Definition: associations.cc:693
unsigned NBands() const
Number of different bands in the input image list. Not implemented so far.
Definition: associations.h:109
void RefitWCSs(const unsigned Order)
refit (independentlyy) all WCSs using the current fittedStarList
Definition: associations.cc:607