comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » How to create white noise in IDL?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
How to create white noise in IDL? [message #93053] Sat, 16 April 2016 02:51 Go to next message
Sonu Tabitha is currently offline  Sonu Tabitha
Messages: 29
Registered: April 2016
Junior Member
How to create white noise image in IDL? I have heard about RANDOMN and RANDOMU but do they create white noise?
How to create white noise in IDL? [message #93055 is a reply to message #93053] Sat, 16 April 2016 07:48 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
From wiki:
In digital image processing, the pixels of a white noise image are typically arranged in a rectangular grid, and are assumed to be independent random variables with uniform probability distribution over some interval

I guess that randomu (the "u" stands for uniform) is what you need. In case you're not sure, you can look at the statistics using something like:
p = plot(histogram(randomu(100000)))
Just for the fun of it.

Cheers, Helder
How to create white noise in IDL? [message #93056 is a reply to message #93055] Sat, 16 April 2016 12:09 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
Sorry, got the wrong syntax:
p = plot(histogram(randomu(s,100000)))

Cheers
How to create white noise in IDL? [message #93057 is a reply to message #93055] Sat, 16 April 2016 12:09 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
Sorry, got the wrong syntax:
p = plot(histogram(randomu(s,100000)))

Cheers
Re: How to create white noise in IDL? [message #93058 is a reply to message #93053] Sat, 16 April 2016 15:21 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Saturday, April 16, 2016 at 5:51:32 AM UTC-4, Meegle_Jade wrote:
> How to create white noise image in IDL? I have heard about RANDOMN and RANDOMU but do they create white noise?

Typically, white noise is the same as Gaussian deviate noise (RANDOMN). The "whiteness" refers to the power spectrum of the data.

RANDOMU provides uniform deviates. While this *also* will produce noise with a white spectrum, it is not typical. And RANDOMU deviates have a DC bias. The deviates are between 0 and 1 which means the average is 0.5, and this will show up as a non-white DC frequency component.

So for a 100x200 image use RANDOMN(SEED,100,200).

Craig
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Walter and Lieth climate digram
Next Topic: How to extract bands from EV_1KM_Emissive ?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:40:58 PDT 2025

Total time taken to generate the page: 0.00509 seconds