nraonrao
 
 NRAO Home > CASA > CasaDocument
image.addnoise - Function

1.1.1 Add noise to the image
Description

This function adds noise to the image. You may zero the image first before the noise is added if you wish.

The noise can be drawn from one of many distributions.

For each distribution, you must supply the type via the type argument (minimum match is active) and parameters via the pars argument. Briefly:

Arguments





Inputs

type

Type of distribution, normal

allowed:

string

Default:

normal

pars

Parameters of distribution

allowed:

doubleArray

Default:

0.0 1.0

region

Region of interest. Default is whole image.

allowed:

any

Default:

record

zero

Zero image first?

allowed:

bool

Default:

false

Returns
bool

Example

"""  
#  
print "\t----\t addnoise Ex 1 \t----"  
ia.maketestimage()          # im1 = maketestimage()  
ia.addnoise(type=’normal’, pars=[0.5, 1], zero=T)  
ia.statistics()  
ia.close()  
#  
"""

A test image is created, zeroed, and noise of mean 0.5 and variance 1 from a normal distribution added.

Please send any comments or questions about CASA or AIPS++ to aips2-requests@nrao.edu

Copyright © 2007 Associated Universities Inc., Washington, D.C.

This code is available under the terms of the GNU General Public Lincense


Home | Contact Us | Directories | Site Map | Help | Privacy Policy | Search

Updated daily during alpha development.