mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
KLIPreduction.cpp
Go to the documentation of this file.
1 /** \file KLIPreduction.cpp
2  * \author Jared R. Males
3  * \brief Instantiations of an implementation of the Karhunen-Loeve Image Processing (KLIP) algorithm.
4  * \ingroup hc_imaging_files
5  * \ingroup image_processing_files
6  *
7  */
8 
10 #include "improc/KLIPreduction.hpp"
11 
12 
13 namespace mx
14 {
15 namespace improc
16 {
17 namespace HCI
18 {
19  std::string meansubMethodStr( int method )
20  {
21  if(method == imageMean) return "imageMean";
22  else if(method == imageMedian) return "imageMedian";
23  else if(method == imageMode) return "imageMode";
24  else if(method == meanImage) return "meanImage";
25  else if(method == medianImage) return "medianImage";
26  else return "UNKNOWN";
27  }
28 
29  int meansubMethodFmStr( const std::string & method )
30  {
31  if(method == "imageMean") return imageMean;
32  else if(method == "imageMedian") return imageMedian;
33  else if(method == "imageMode") return imageMode;
34  else if(method == "meanImage") return meanImage;
35  else if(method == "medianImage") return medianImage;
36  else return -1;
37  }
38 
39  std::string excludeMethodStr(int method)
40  {
41  if(method == excludeNone) return "excludeNone";
42  else if(method == excludePixel) return "excludePixel";
43  else if(method == excludeAngle) return "excludeAngle";
44  else if(method == excludeImno) return "excludeImno";
45  else return "UNKNOWN";
46  }
47 
48  int excludeMethodFmStr(const std::string & method)
49  {
50  if(method == "excludeNone") return excludeNone;
51  else if(method == "excludePixel") return excludePixel;
52  else if(method == "excludeAngle") return excludeAngle;
53  else if(method == "excludeImno") return excludeImno;
54  else return -1;
55  }
56 
57  std::string includeMethodStr( int method )
58  {
59  if(method == includeAll) return "includeAll";
60  else if(method == includeCorr) return "includeCorr";
61  else if(method == includeTime) return "includeTime";
62  else if(method == includeAngle) return "includeAngle";
63  else if(method == includeImno) return "includeImno";
64  else return "UNKNOWN";
65  }
66 
67  int includeMethodFmStr( const std::string & method )
68  {
69  if(method == "includeAll") return includeAll;
70  else if(method == "includeCorr") return includeCorr;
71  else if(method == "includeTime") return includeTime;
72  else if(method == "includeAngle") return includeAngle;
73  else if(method == "includeImno") return includeImno;
74  else return -1;
75  }
76 }
77 
78 template<typename realT> class ADIDerotator;
79 
80 template struct KLIPreduction<float, ADIDerotator<float>, float>;
81 template struct KLIPreduction<float, ADIDerotator<float>, double>;
82 template struct KLIPreduction<double, ADIDerotator<double>, double>;
83 
84 } //namespace improc
85 } //namespace mx
Defines a generic ADI derotator class.
Declarations and definitions for an implementation of the Karhunen-Loeve Image Processing (KLIP) algo...
@ includeImno
include images which are closest in imno to the target
@ includeTime
include images which are closest in time to the target
@ includeAngle
include images which are closest in angle to the target
@ includeAll
include all images
@ includeCorr
include images which are most correlated with the target
@ imageMode
The mode of each image (within the search region) is subtracted from itself.
@ imageMean
The mean of each image (within the search region) is subtracted from itself.
@ imageMedian
The median of each image (within the search region) is subtracted from itself.
@ meanImage
The mean image of the data is subtracted from each image.
@ medianImage
The median image of the data is subtracted from each image.
@ excludePixel
Exclude by pixels of rotation.
@ excludeAngle
Exclude by angle of roration.
@ excludeImno
Exclude by number of images.
@ excludeNone
Exclude no images.
The mxlib c++ namespace.
Definition: mxError.hpp:107