View source: R/profitUtility.R
profitDeprojectImageEllipse | R Documentation |
A utility function to deproject an image with a projected circular source such as a thin disk
profitDeprojectImageEllipse(image, xcen, ycen, axrat, ang, upsample=5L)
image |
List or numeric; required. An image matrix or a list of image matrices, each of which will be deprojected. Every image must have the same dimensions as the first image, or have both dimensions be upsample times larger (e.g. for a finely sampled model). |
xcen |
Numeric; required. The x-coordinate in pixels of the ellipse centre in the images. |
ycen |
Numeric; required. The y-coordinate in pixels of the ellipse centre in the images. |
axrat |
Numeric; required. The axis ratio of the ellipse. |
ang |
Numeric; required. The position angle of the ellipse in degrees, following |
upsample |
Integer; optional. The factor by which to upsample each image. Must be positive. |
This function deprojects images, assuming that the object forms an ellipse in the image plane because it is a projection of a thin disk. Each provided image is oversampled and then resampled by stretching by 1/axrat along the ellipse minor axis. The value in each oversampled subpixel is assigned to whichever new pixel the centre of the subpixel happens to fall in, so discreteness artefacts will appear (especially for small values of upsample). It can be used on images, masks and/or binary segmentation maps, and is useful for visual inspection of disk galaxy features like spiral arms.
List; deprojected versions of all of the images provided in the original list (image).
Dan Taranu
profitMakeModel
## Not run:
disk = profitMakeModel(modellist=list(sersic=list(xcen=50,ycen=50,mag=15,re=5,nser=1,
axrat=0.5,ang=125,box=0)))
magimage(log10(disk$z), zlim=c(-15,-7.5),magmap=FALSE)
deproj = profitDeprojectImageEllipse(disk$z, xcen=50, ycen=50, axrat=0.5, ang=125,
upsample = 9L)
magimage(log10(deproj$img), zlim=c(-15,-7.5),magmap=FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.