profitDeprojectImageEllipse: Deproject an image along an ellipse's minor axis

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/profitUtility.R

Description

A utility function to deproject an image with a projected circular source such as a thin disk

Usage

1
profitDeprojectImageEllipse(image, xcen, ycen, axrat, ang, upsample=5L)

Arguments

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 profitMakeModel convention of up=0.

upsample

Integer; optional. The factor by which to upsample each image. Must be positive.

Details

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.

Value

List; deprojected versions of all of the images provided in the original list (image).

Author(s)

Dan Taranu

See Also

profitMakeModel

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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)

ProFit documentation built on Nov. 11, 2019, 5:07 p.m.