Dear Regan,
- There is two issues with the annular sampling:
- There is a bug, which requires setting the
x
andy
coordinates in the source routine as well. - You need to use the double precision notation (like
5.0D0
) when you set the minimum and maximum radius of the sampling.
-
There is no need to manually normalize the probabilities, it is done automatically.
-
Currently only one histogram can be specified. If you want to sample from more than one, you need to duplicate the the function using a different name.
-
You probably want to look at the spectrum sampling routine posted here: Questions about source_newgen.f - #8 by mayank.rse This may be more suitable for sampling angles.
Cheers,
David