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

View source: R/profitUtility.R

profitPoissonMonteCarloR Documentation

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.

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.

Value

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

Author(s)

Dan Taranu

Examples

## 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))

## End(Not run)

ICRAR/ProFit documentation built on Feb. 1, 2024, 9:34 a.m.