ism3d.maths.stats

Functions

cdf2rv

**** only here for backward compaibility *

custom_pdf

note:

custom_ppf

* we also wrap the random generator into rv_continous class * *** but this inline function may have better performance without the error checking overhead in rv_continous class

custom_rvs

https://docs.scipy.org/doc/numpy-1.14.0/reference/generated/numpy.random.RandomState.html#numpy.random.RandomState use_nprng==True: use np built-in random generator rather than the hardcoded uniform+its formula more ppf rvs can be found here: https://github.com/scipy/scipy/blob/master/scipy/stats/_continuous_distns.py scipy try to use special.fun as much as possible due to performance gain

custom_sf

The relation between x and q (i.e.

pdf2rv

Generate a pseudo-random random variable set following a target distribution described by the PDF using the inverse transform / pesudo-random number sampling method

pdf2rv_nd

Generate a pseudo-random sample (approximately) following a target PDF specified by a n-dimension array The inverse transform sampling approach is used without expensive MC. see more details here: https://stackoverflow.com/questions/21100716/fast-arbitrary-distribution-random-sampling/21101584#21101584.

rng_seeded

return a seeded RNG plus is_mkl mkl_random is preferrred over numpy.random

Classes

expon2d_gen

rho Distribution of a axisymatteric 2D distribution with a Exponential radial profile

laplace_gen

rho Distribution of a axisymatteric 2D distribution with a Exponential radial profile

norm2d_gen

rho Distribution of a axisymatteric 2D distribution with a Gaussian radial profile

sechsq_gen

rho Distribution of a axisymatteric 2D distribution with a Exponential radial profile this is a direct implementation for testing, one should use sech2 instead

sersic2d_gen

rho Distribution of a axisymatteric 2D distribution with a Sersic radial profile template from: