Here is how to get started working with the mx::AO library.
Define the MX_AO_DATADIR environment variable in .bashrc or .bash_alias like so:
export MX_AO_DATADIR=/path/to/mxao/data/
The following program will create a pupil and a modified Fourier basis set, including the orthogonalization of the basis on the pupil.
int main()
{
typedef double realT;
std::string
basis =
"modf_150_48";
std::string pupil = "circular_29percent_150";
mx::AO::circularPupil<realT>(pupil, 150, 6.5, 0.29);
mx::AO::makeModfBasis<realT>( basis, 150, 48 );
mx::AO::applyPupil2Basis<realT>( basis, pupil);
mx::AO::orthogonalizeBasis<realT>(basis, pupil, MXAO_ORTHO_METHOD_SGS);
return 0;
}
Utilities for working with a modal basis.
Generating a fourier basis.
Utilities for specifying pupils.
Next, the following code creates a DM and characterize it so that it can be used with the basis just created.
int main()
{
typedef double realT;
std::string
basis =
"modf_150_48";
std::string pupil = "circular_29percent_150";
std::string dm = "circular2k_magaox";
mx::AO::influenceFunctionsGaussian<realT>(dm, 150.0*50.0/48.0, 50.0, 51.3, 0.15, 150.0);
mx::AO::ifPInv<realT>(dm, -1);
mx::AO::m2cMatrix<realT>(dm, basis, pupil);
mx::AO::m2cMatrix<realT>(dm, basis, pupil, true);
mx::AO::modesOnDM<realT>(dm, basis, pupil, false);
mx::AO::modesOnDM<realT>(dm, basis, pupil, true);
return 0;
}
Utilities for generating and analyzing deformable mirror influence functions.