27template <
typename realT>
29 realT pupilDiamPixels,
30 realT pupilDiamMeters,
34 using namespace mx::improc;
35 using namespace mx::wfp;
36 using namespace mx::sigproc;
41 pup.resize( pupilDiamPixels, pupilDiamPixels );
46 phead.
append(
"SCALE", pupilDiamMeters / pupilDiamPixels,
"Scale in m/pix" );
47 phead.
append(
"PUPILD", pupilDiamMeters,
"Physical diameter of pupil image [m]" );
48 phead.
append(
"CENTOBS", centralObs,
"Central obscuration ratio" );
49 phead.
append(
"OVERSCAN", overscan,
"Fractional pixel overscan" );
55 ff.
write( fName, pup, phead );
61template <
typename realT>
64 realT pupilDiamMeters,
70 using namespace mx::improc;
71 using namespace mx::wfp;
72 using namespace mx::sigproc;
75 Eigen::Array<realT, -1, -1> pup;
77 pup.resize( pupilDiamPixels, pupilDiamPixels );
79 realT cen = 0.5 * ( pupilDiamPixels - 1.0 );
88 pup.data(), pupilDiamPixels, pupilDiamPixels + overScan, centralObs, tukeyAlpha, cen, cen );
92 phead.
append(
"SCALE", pupilDiamMeters / pupilDiamPixels,
"Scale in m/pix" );
93 phead.
append(
"PUPILD", pupilDiamMeters,
"Physical diameter of pupil image [m]" );
94 phead.
append(
"CENTOBS", centralObs,
"Central obscuration ratio" );
95 phead.
append(
"TUKALPHA", tukeyAlpha,
"Tukey window alpha parameter" );
96 phead.
append(
"OVERSCAN", overScan,
"Apodization overscan" );
102 ff.
write( fName, pup, phead );
Standardized paths for the mx::AO system.
std::string pupilFile(const std::string &pupilName, bool create=false)
The path for the pupil FITS file.
Class to manage interactions with a FITS file.
error_t write(const dataT *im, int d1, int d2, int d3, fitsHeader< verboseT > *head)
Write the contents of a raw array to the FITS file.
Tools for using the eigen library for image processing.
Declares and defines a class to work with a FITS file.
Eigen::Array< scalarT, -1, -1 > eigenImage
Definition of the eigenImage type, which is an alias for Eigen::Array.
int circularPupil(arrayT &m, typename arrayT::Scalar eps=0, typename arrayT::Scalar rad=0, typename arrayT::Scalar overscan=0)
Fill in an Eigen-like array with a circular pupil mask.
void tukey2d(realT *filt, int rows, int cols, realT D, realT alpha, realT xc, realT yc)
Create a 2-D Tukey window.
void tukey2dAnnulus(realT *filt, int rows, int cols, realT D, realT eps, realT alpha, realT xc, realT yc)
Create a 2-D Tukey window on an annulus.
Utilities for modeling image formation.
void circularPupil(const std::string &pupilName, realT pupilDiamPixels, realT pupilDiamMeters, realT centralObs=0, realT overscan=0)
Generate a circular pupil and saves it to disk.
void circularApodizedPupil(const std::string &pupilName, int pupilDiamPixels, realT pupilDiamMeters, realT tukeyAlpha, realT centralObs=0, realT overScan=0)
Generates a circular apodized pupil and saves it to disk.
Procedures to calculate window functions for signal processing.