Learn R Programming

ProFit (version 1.3.3)

profitPoissonMonteCarlo: Monte Carlo sample an image assuming Poisson-distributed counts

Description

A convenience function to generate a random image given an expected number of counts.

Usage

profitPoissonMonteCarlo(x)

Arguments

x

Numeric; required. A number of counts. All should be >=0.

Value

Returns a random sample from Poisson distributions with means given by x, preserving input dimensions.

Details

For now, this is merely a convenience function to call R's built-in rpois() function. In the future, the implementation should be moved to libprofit.

Examples

Run this code
# 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)))$z
gain = 1e13
magimage(profitPoissonMonteCarlo(disk*gain))
# }

Run the code above in your browser using DataLab