Using seed = INDEF in addstar function
MichaelCampbell wrote on Dec 11, 2008
Hi,
I am trying to create lists with 100 random co-ordinates and magnitudes within the addstar function. I wish to create 100 different lists each containing 100 stars. I have set the seed function INDEF, but it doesn't appear to work. Each list is the same. I have tried putting delays in of 1 second, and 20 seconds, but it doesn't make any difference. I have also tried setting the seed = 0, as suggested in the phelp page for addstar, but it doesn't produce uniformly random numbers. The magnitude values appear to cluster around certain values. Have you any suggestions why seed= INDEF does not work? or can you provide me with a seed value that produces equally weighted magnitude probabilities?
Thanks
Mike
I am trying to create lists with 100 random co-ordinates and magnitudes within the addstar function. I wish to create 100 different lists each containing 100 stars. I have set the seed function INDEF, but it doesn't appear to work. Each list is the same. I have tried putting delays in of 1 second, and 20 seconds, but it doesn't make any difference. I have also tried setting the seed = 0, as suggested in the phelp page for addstar, but it doesn't produce uniformly random numbers. The magnitude values appear to cluster around certain values. Have you any suggestions why seed= INDEF does not work? or can you provide me with a seed value that produces equally weighted magnitude probabilities?
Thanks
Mike
Mike Fitzpatrick wrote on Dec 11, 2008
The DAOPHOT code has it's own random number generator and doesn't implement the trick about using the clocktime to offset the seed, so you'll need to use a different seed each time to get a different list.
A better approach may be to use the STARLIST task in the ARTDATA package to generate the files and then pass these in as the 'photfile' param. STARLIST does use the clocktime when seed=INDEF and should give you 100 unique lists and more control over the distribution.
Cheers,
-Mike
A better approach may be to use the STARLIST task in the ARTDATA package to generate the files and then pass these in as the 'photfile' param. STARLIST does use the clocktime when seed=INDEF and should give you 100 unique lists and more control over the distribution.
Cheers,
-Mike
Last post on Dec 11, 2008