Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/profitUtility.R
A low level routine to interpolate a 2D image matrix at an arbitrary x/y pixel location. This function is unlikely to be used by the user, but it used internally to ensure that point sources defined by empirical point spread functions (PSFs) are accurately generated on an image.
1 | profitInterp2d(x, y, image)
|
x |
The x position at which to make the interpolation with respect to the x centre of image. |
y |
The x position at which to make the interpolation with respect to the x centre of image. |
image |
The image matrix to be used for the interpolation. |
In practice this is a low level routine unlikely to be used by the user. profitMakePointSource
should be used to generate point sources and PSFs.
For this function (and really, it is for user ease when interpolating a PSF) [0,0] is always the R image centre of the input image. This means it would be at the usual [1.5,2] position of a 3x4 image matrix.
Matrix; a three column matrix where column 1 is the requested x interpolation locations, column 2 is the requested y interpolation locations and column 3 is the interpolated values.
Aaron Robotham
profitConvolvePSF
, profitMakePointSource
1 2 3 4 5 6 7 8 | PSFeven=profitMakePointSource(image = matrix(0,24,24))
magimage(PSFeven)
xrange=floor(-dim(PSFeven)[1]/2):ceiling(dim(PSFeven)[1]/2)
yrange=floor(-dim(PSFeven)[2]/2):ceiling(dim(PSFeven)[2]/2)
regrid=expand.grid(xrange,yrange)
PSFodd=matrix(profitInterp2d(x=regrid[,1], y=regrid[,2], image=PSFeven)[,3],
length(xrange),length(yrange))
magimage(PSFodd)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.