cratermaker.utils.montecarlo_utils.get_random_impact_angle#
- cratermaker.utils.montecarlo_utils.get_random_impact_angle(size=1, rng=None, rng_seed=None, rng_state=None, **kwargs)[source]#
Sample impact angles from a distribution centered on 45deg.
For the theory, see Shoemaker (1962) “Interpretation of lunar craters.”
- Parameters:
size (int or tuple of ints, optional) – The number of samples to generate. If the shape is (m, n, k), then m * n * k samples are drawn. If size is None (the default), a single value is returned if diameters is a scalar, otherwise an array of samples is returned with the same size as diameters.
rng (numpy.random.Generator | None) – A numpy random number generator. If None, a new generator is created using the rng_seed if it is provided.
rng_seed (Any type allowed by the rng_seed argument of numpy.random.Generator, optional) – The rng_seed for the RNG. If None, a new RNG is created.
rng_state (dict, optional) – The state of the random number generator. If None, a new state is created.
**kwargs (Any) – Additional keyword arguments that are either ignored or passed to internal functions as needed.
- Returns:
ndarray of np.float64 – An array of impact angles (in degrees).