This is a data-container class meant to assist in the setup phase of imfit, makeimage, etc. It holds information about a single user-specified oversampling region: the location and of the region within the image, its size, the desired pixel oversampling scale, and the oversampled PSF image to be used with that region. In effect, it packages up the information provided by the following command-line options:

--overpsf, --overpsf_region, --overpsf_scale

In practice, a vector of one or more PsfOversamplingInfo objects is set up in main() based on the user inputs and is then passed to the SetupModelObject function, where the individual PsfOversamplingInfo objects are passed to the ModelObject instance via its AddOversampledPsfInfo method.


Files: core/psf_oversampling_info.h, core/psf_oversampling_info.cpp

class PsfOversamplingInfo

Public Functions


Default constructor for PsfOversamplingInfo class.

PsfOversamplingInfo(double *inputPixels, int nCols, int nRows, int scale, string inputRegionString, int xOffset = 0, int yOffset = 0, bool isUnique = true, bool normalize = true)

Constructor (with inputs) for PsfOversamplingInfo class.


Destructor for PsfOversamplingInfo class.

void AddPsfPixels(double *inputPixels, int nCols, int nRows, bool isUnique)

Add data describing a PSF image.

void AddRegionString(string inputRegionString)

Add a region string (e.g., “[500:600,1080:1422]”) defining a subsection of an image that will be oversampled

void AddOversamplingScale(int scale)

Specify the pixel oversampling scale for an oversampling region (must be an integer >= 1)

void AddImageOffset(int X0, int Y0)

Specify the offset of an overampling region (the location of its lower-left corner within the full image)

void SetNormalizationFlag(bool normalize)

Whether PSF image should be normalized or not.

int GetNColumns()

Returns x-size of PSF image.

int GetNRows()

Returns y-size of PSF image.

bool PixelsArrayIsUnique()

Returns true if PSF image is unique to this oversampling region; returns false if PSF image is shared with other oversampling regions

double *GetPsfPixels()

Returns a pointer to the PSF image pixel array.

bool GetNormalizationFlag()

Returns true if PSF is meant to be normalized.