PSFEstimationwithCPSO
PSF Class Reference

This class represents the PSF. More...

#include <psf.hpp>

List of all members.

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.

Detailed Description

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.


Constructor & Destructor Documentation

PSF::PSF ( cl_context  context,
cl_command_queue  _command_queue,
int  img_size,
int  phase_size,
int  _n_zernikes 
)

PSF Constructor.

Parameters:
contextthe OpenCL context instance to be used for this PSF.
_command_queuethe OpenCL command queue instance to submit the commands.
img_sizeThe image width.
phase_sizeThe phase width.
_n_zernikesThe number of Zernike terms that is being used for the calculations.

Member Function Documentation

WORD * PSF::getCoefs ( )

Refresh the internal coefficients with the external coefficient matrix.

Returns:
The coefficients related to this PSF.
void PSF::refreshPupil ( bool  block)

Refresh the internal pupil information with the external pupil matrix.

Parameters:
blockIf 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.

Parameters:
_cl_coefsa reference to the OpenCl instance containing the source data.
offsetthe 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.

Parameters:
_cl_pupila reference for the openCl object containing the source data.
offsetthe array position from _cl_pupil where the first value to be copied is located.

The documentation for this class was generated from the following files:
 All Classes Functions