Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/profoundUtility.R
A utility function to resample input PSFs to different pixel scales on a consistent flux conserving manner.
1 2 | profoundResample(image, pixscale_old = 1, pixscale_new = 1, type = "bicubic",
fluxscale = "image", recentre = FALSE)
|
image |
Numeric matrix; required, the image we want to resample. |
pixscale_old |
Numeric scalar; the current (old) pixel scale of the supplied image. |
pixscale_new |
Numeric scalar; the target (new) pixel scale of the desired output. |
type |
Character scalar; either "bilinear" for bilinear interpolation or "bicubic" for bicubic interpolation (default, requires |
fluxscale |
Character scalar; how the output image should be scaled. Either 'image' (the sum of output image will exactly qual the sum of the input image), 'pixscale' (the sum of the output pixels is scaled by the ratio of pixel scales squared, which means the output image will approximately equal the sum of the input image), or 'norm' (the output immge will sum to equal exactly 1). |
recentre |
Logical; should the final image have its peak flux value in the centre of the image? This is useful for resampling PSFs, where we do not want small centring errors. When the input image is highly off centre, or not a simple image of a PSF, then this option might cause image artefacts. |
Mostly used for resampling PSFs to different pixel scales.
Numeric matrix; the desired resampled image. This will have roughly dim(image)[1]*pixscale_old/pixscale_new by dim(image)[2]*pixscale_old/pixscale_new pixels. The interpolation
Aaron Robotham
1 2 3 4 5 | image=readFITS(system.file("extdata", 'VIKING/mystery_VIKING_Z.fits', package="ProFound"))$imDat
star = image[149 + -25:25, 74 + -25:25]
magimage(star)
magimage(profoundResample(star,1,2))
magimage(profoundResample(star,1,1/2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.