32void makeModfBasis(
const std::string &basisName,
int dim,
int N, realT ang,
int nZern = 0 )
36 sigproc::makeFourierBasis_Rect( modes, dim, N, MX_FOURIER_MODIFIED, ang );
39 bool fmodes_allocated;
45 zModes.resize( dim, dim, nZern );
46 sigproc::zernikeBasis<improc::eigenCube<realT>,
double>( zModes );
49 fmodes_allocated =
true;
50 fmodes->resize( dim, dim, modes.planes() + nZern );
52 for(
int p = 0; p < nZern; ++p )
54 fmodes->image( p ) = zModes.
image( p );
57 for(
int p = 0; p < modes.planes(); ++p )
59 fmodes->image( p + nZern ) = modes.image( p );
62 modes.resize( 0, 0, 0 );
63 zModes.resize( 0, 0, 0 );
68 fmodes_allocated =
false;
73 std::string fName = mx::AO::path::basis::modes( basisName,
true );
75 ff.
write( fName, *fmodes );
77 if( fmodes_allocated )
int write(const dataT *im, int d1, int d2, int d3, fitsHeader *head)
Write the contents of a raw array to the FITS file.
void makeModfBasis(const std::string &basisName, int dim, int N, realT ang, int nZern=0)
Make the modified Fourier basis.