gastro  0.1.0
 All Classes Files Functions Variables Pages
simplepolymodel.h
1 #ifndef SIMPLEPOLYMODEL__H
2 #define SIMPLEPOLYMODEL__H
3 
4 #include "eigenstuff.h"
5 
6 class CcdImage;
7 
8 #include "distortionmodel.h"
9 #include "gtransfo.h"
10 #include "simplepolymapping.h"
11 #include "projectionhandler.h"
12 #include <map>
13 
14 class CcdImageList;
15 
16 /* We deal here with coordinate transforms which are fitted
17  and/or necessary to AstromFit. The classes SimplePolyModel
18 and SimplePolyMapping implement a model where there is one
19 separate transfrom per CcdImage. One could chose other setups.
20 
21 */
22 
24 /* This modeling of distortions can even accommodate images set mixing instruments */
26 {
27  /* using ref counts here allows us to not write a destructor nor a copy
28  constructor. I could *not* get it to work using std::auto_ptr. */
29  typedef std::map<const CcdImage*, CountedRef<SimpleGtransfoMapping> > mapType;
30  mapType _myMap;
31  const ProjectionHandler* _sky2TP;
32 
33 public :
34 
36  SimplePolyModel(const CcdImageList &L,
37  const ProjectionHandler* ProjH,
38  bool InitFromWCS,
39  unsigned NNotFit=0);
40 
41  // The following routines are the interface to AstromFit
43  const Mapping* GetMapping(const CcdImage &) const;
44 
46  unsigned AssignIndices(unsigned FirstIndex, std::string &WhatToFit);
47 
48  // dispaches the offsets after a fit step into the actual locations of parameters
49  void OffsetParams(const Eigen::VectorXd &Delta);
50 
54  const Gtransfo* Sky2TP(const Mapping* M, const CcdImage &C) const
55  { return _sky2TP->Sky2TP(M,C);}
56 
57 };
58 
59 
60 
61 #endif /* SIMPLEPOLYMODEL__H */
const Mapping * GetMapping(const CcdImage &) const
Mapping associated to a given CcdImage.
Definition: simplepolymodel.cc:49
virtual class needed in the abstraction of the distortion model
Definition: mapping.h:13
SimplePolyModel(const CcdImageList &L, const ProjectionHandler *ProjH, bool InitFromWCS, unsigned NNotFit=0)
Sky2TP is just a name, it can be anything.
Definition: simplepolymodel.cc:14
unsigned AssignIndices(unsigned FirstIndex, std::string &WhatToFit)
Positions the various parameter sets into the parameter vector, starting at FirstIndex.
Definition: simplepolymodel.cc:56
const Gtransfo * Sky2TP(const Mapping *M, const CcdImage &C) const
Definition: simplepolymodel.h:54
handler of an actual image from a single CCD
Definition: ccdimage.h:21
Interface class between AstromFit and an actual model for the Mapping (s) from pixels to some tangent...
Definition: distortionmodel.h:13
this is the model used to fit independent CCDs, meaning that there is no instrument model...
Definition: simplepolymodel.h:25
void OffsetParams(const Eigen::VectorXd &Delta)
Offset the parameters by the provided amounts.
Definition: simplepolymodel.cc:74
This is a virtual class that allows a lot of freedom in the choice of the projection from "Sky" (wher...
Definition: projectionhandler.h:13