bi-kappa 3.0.0
Monte Carlo particle samplers for plasma velocity and position distributions
Loading...
Searching...
No Matches
general_generators Namespace Reference

Classes

class  GeneralVelocityGenerator
class  GeneralPositionGenerator
class  FieldAlignedVelocityGenerator

Functions

 main ()

Variables

int MIN_PROBE_POINTS = 64

Detailed Description

NumPy versions of the general velocity and position generators.

GeneralVelocityGenerator, FieldAlignedVelocityGenerator and
GeneralPositionGenerator are small NumPy ports of the C++ classes
general_velocity_generator, field_aligned_velocity_generator and
general_position_generator in cpp/, meant for prototyping a density in
Python.  They take the same parameters and use the same rejection envelope (the
largest density found at a set of probe points, times 1.05).  They are not a
validated equivalent of the C++ classes: the C++ regression suite does not
cover them, they check fewer invalid inputs, and they do not reproduce the C++
random streams.

Each generator is called with a numpy.random.Generator and returns one draw:
``v = gen(rng)``.  Running this file writes three example sample files to the
current directory.

Function Documentation

◆ main()

main ( )
Write example samples from the three generators to text files.

Definition at line 253 of file general_generators.py.

References main().

Referenced by main().

Variable Documentation

◆ MIN_PROBE_POINTS

int general_generators.MIN_PROBE_POINTS = 64

Definition at line 24 of file general_generators.py.