mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
fourierBasis.hpp
Go to the documentation of this file.
1 /** \file fourierBasis.hpp
2  * \author Jared R. Males (jaredmales@gmail.com)
3  * \brief Generating a fourier basis.
4  * \ingroup mxAO_files
5  *
6  */
7 
8 #ifndef __fourierBasis_hpp__
9 #define __fourierBasis_hpp__
10 
11 #include "../sigproc/fourierModes.hpp"
12 #include "../improc/eigenCube.hpp"
13 #include "../ioutils/fits/fitsFile.hpp"
14 
15 #include "aoPaths.hpp"
16 
17 namespace mx
18 {
19 namespace AO
20 {
21 
22 ///Make the modified Fourier basis
23 /**
24  * \param [in] basisName the name of the basis (not including the mx::AO path)
25  * \param [in] dim the linear size of the maps, that is they will be dimxdim in size.
26  * \param [in] N is the number of degrees of freedom. Number of modes will be (N+1)(N+1) - 1.
27  *
28  * \tparam realT the real numeric type for calculations
29  */
30 template<typename realT>
31 void makeModfBasis( const std::string & basisName,
32  int dim,
33  int N,
34  realT ang
35  )
36 {
38 
39  mx::sigproc::makeFourierBasis_Rect( modes, dim, N, MX_FOURIER_MODIFIED, ang);
40 
42 
43  std::string fName = mx::AO::path::basis::modes(basisName, true);
44 
45  ff.write(fName, modes);
46 }
47 
48 } //namespace AO
49 } //namespace mx
50 
51 
52 #endif //__fourierBasis_hpp__
Standardized paths for the mx::AO system.
Class to manage interactions with a FITS file.
Definition: fitsFile.hpp:54
int write(const dataT *im, int d1, int d2, int d3, fitsHeader *head)
Write the contents of a raw array to the FITS file.
Definition: fitsFile.hpp:1301
void makeModfBasis(const std::string &basisName, int dim, int N, realT ang)
Make the modified Fourier basis.
The mxlib c++ namespace.
Definition: mxError.hpp:107