RANDOMU not very random [message #39869] |
Wed, 16 June 2004 15:28 |
ian
Messages: 26 Registered: February 1992
|
Junior Member |
|
|
Hello,
A colleague and I are working on simulating cosmic glitches in
interferograms. The way we are trying to accomplish this is assigning
each point in an interferogram a random number using IDL's RANDOMU.
Once the random number falls below a specified threshold, we insert a
cosmic ray.
We originally used an undefined seed to get the random numbers, but we
quickly discovered that if we ran the routine over and over again, the
random numbers shifted by 1 position each time. We corrected this by
defining our seed using the SYSTIME function. Now, however, we find
that if you run the program a number of times, you see the same
positions popping up (not in an identifiable pattern, but they show up
more often than you would expect).
For example, Cosmic rays in ifgm1 appeared at pts 107 and 534. After
running the program ~20 more times, these same points popped up. This
seems to happen fairly frequently over long times of many runs.
Is there anything that we can do to introduce more randomness into the
procedure? Are there any fixes for the IDL random number generators?
Thanks,
Ian
|
|
|