PSFEstimationwithCPSO
|
This class represents the PSF. More...
#include <psf.hpp>
Public Member Functions | |
PSF (cl_context context, cl_command_queue _command_queue, int img_size, int phase_size, int _n_zernikes) | |
PSF Constructor. | |
~PSF () | |
The PSF destructor. | |
void | setCoefsPosition (cl_mem _cl_coefs, int offset) |
Mark the position where the coefficients will be copied from an external matrix. | |
void | setPupilPosition (cl_mem _cl_pupil, int offset) |
Mark the position where the pupil will be copied from an external matrix. | |
void | refreshPupil (bool block) |
Refresh the internal pupil information with the external pupil matrix. | |
void | pupilToFocusFft () |
Calculate the FFT of the pupil. | |
void | psfeFft () |
Calculate the FFT of the extracted (final) PSF. | |
WORD * | getCoefs () |
Refresh the internal coefficients with the external coefficient matrix. |
This class represents the PSF.
Every instance of this class represents a separate PSF and is responsible for calculating all the PSF information that cannot be calculated on same batch with the others PSFs.
PSF::PSF | ( | cl_context | context, |
cl_command_queue | _command_queue, | ||
int | img_size, | ||
int | phase_size, | ||
int | _n_zernikes | ||
) |
WORD * PSF::getCoefs | ( | ) |
Refresh the internal coefficients with the external coefficient matrix.
void PSF::refreshPupil | ( | bool | block | ) |
Refresh the internal pupil information with the external pupil matrix.
block | If this is a blocking copy. |
void PSF::setCoefsPosition | ( | cl_mem | _cl_coefs, |
int | offset | ||
) |
Mark the position where the coefficients will be copied from an external matrix.
Call the getCoefs() method to have the coefficients refreshed. These coefficients are not used internally for this class, thus it's only informational data.
_cl_coefs | a reference to the OpenCl instance containing the source data. |
offset | the array position from _cl_coefs where the first value to be copied is located. |
void PSF::setPupilPosition | ( | cl_mem | _cl_pupil, |
int | offset | ||
) |
Mark the position where the pupil will be copied from an external matrix.
Call the refreshPupil method to have the pupil refreshed. The pupil is used internally for this class, thus it's important to refresh the pupil before using it.
_cl_pupil | a reference for the openCl object containing the source data. |
offset | the array position from _cl_pupil where the first value to be copied is located. |