Randoms

Functions for constructing randoms.

fiesta.randoms.random_uniform(size: int, xmin: float, xmax: float) ndarray

Generates uniform randoms along one axis.

Parameters:
  • size (int) – Number of randoms.

  • xmin (float) – Minimum X for the box.

  • xmax (float) – Maximum X for the box.

Returns:

x – Random x-values.

Return type:

array

fiesta.randoms.random_box(size: int, xmin: float, xmax: float, ymin: float, ymax: float) Tuple[ndarray, ndarray]

Generates random particles inside a box.

Parameters:
  • size (int) – Number of randoms.

  • xmin (float) – Minimum X for the box.

  • xmax (float) – Maximum X for the box.

  • ymin (float) – Minimum Y for the box.

  • ymax (float) – Maximum Y for the box.

Returns:

  • x (array) – Random x-values.

  • y (array) – Random y-values.

fiesta.randoms.random_cube(size: int, xmin: float, xmax: float, ymin: float, ymax: float, zmin: float, zmax: float) Tuple[ndarray, ndarray, ndarray]

Generates random particles inside a box.

Parameters:
  • size (int) – Number of randoms.

  • xmin (float) – Minimum X for the box.

  • xmax (float) – Maximum X for the box.

  • ymin (float) – Minimum Y for the box.

  • ymax (float) – Maximum Y for the box.

  • zmin (float) – Minimum Z for the box.

  • zmax (float) – Maximum Z for the box.

Returns:

  • x (array) – Random x-values.

  • y (array) – Random y-values.

  • z (array) – Random z-values.