sample

class astro_traj.sample.Sample(gal)[source]

Methods

initialize_Mhe(dM0)
initialize_R() samples radial distance from galactic center according to specified potential function
initialize_Vkick()
sample_Apre(Amin, Amax[, method, size]) samples semi-major axis uniformly (method=’uniform’, default) or uniformly in log (method=’log’)
sample_Mhe(Mmin[, Mmax, method, size, PDF, …]) samples He-star mass uniformly between Mns and 8 Msun (BH limit): beniamini2 method selects from two
sample_R(PDF, Ndraws) samples radial distance from galactic center according to specified potential function
sample_Vkick([scale, Vmin, Vmax, method, …]) sample kick velocity from Maxwellian (Hobbs 2005, default) or uniformly (Wong 2010) or Beniamini (2016): https://arxiv.org/pdf/1510.03111.pdf#equation.4.7: beniamini2 method selects from two distributions ECS and CCSN. The splitis based off the 60/40 split observed in double nurtron stars in our galaxy laid out in Fig 2: https://arxiv.org/pdf/1510.03111.pdf#figure.2
sample_distance([samples, method, size]) Samples distance from posterior distrbution of your favorite PE run.
sample_epre([method, size]) samples initial eccentricity (for now, assume circularized)
sample_masses([samples, method, size]) Samples m1 and m2 from posterior distrbution of your favorite PE run.
initialize_Mhe(dM0)[source]
initialize_R()[source]

samples radial distance from galactic center according to specified potential function

initialize_Vkick()[source]
sample_Apre(Amin, Amax, method='uniform', size=None)[source]

samples semi-major axis uniformly (method=’uniform’, default) or uniformly in log (method=’log’)

sample_Mhe(Mmin, Mmax=8.0, method='uniform', size=None, PDF=None, ECSPDF=None, CCSPDF=None, irand=None)[source]

samples He-star mass uniformly between Mns and 8 Msun (BH limit): beniamini2 method selects from two distributions ECS and CCSN. The split is based off the 60/40 split observed in double nurtron stars in our galaxy laid out in Fig 2: https://arxiv.org/pdf/1510.03111.pdf#figure.2 method: powerlaw

sample_R(PDF, Ndraws)[source]

samples radial distance from galactic center according to specified potential function

sample_Vkick(scale=265, Vmin=0, Vmax=2500, method='maxwellian', size=None, Mhe=None, ECSPDF=None, CCSPDF=None, irand=None)[source]

sample kick velocity from Maxwellian (Hobbs 2005, default) or uniformly (Wong 2010) or Beniamini (2016): https://arxiv.org/pdf/1510.03111.pdf#equation.4.7: beniamini2 method selects from two distributions ECS and CCSN. The splitis based off the 60/40 split observed in double nurtron stars in our galaxy laid out in Fig 2: https://arxiv.org/pdf/1510.03111.pdf#figure.2

sample_distance(samples=None, method='median', size=None)[source]

Samples distance from posterior distrbution of your favorite PE run. Just uses the mean value for distance by default. Can specify methods ‘gaussian’, ‘mean’, or ‘posteriors’ to sample using other methods

sample_epre(method='circularized', size=None)[source]

samples initial eccentricity (for now, assume circularized)

sample_masses(samples=None, method='posterior', size=None)[source]

Samples m1 and m2 from posterior distrbution of your favorite PE run. Samples from the posterior samples by default. Can specify methods ‘gaussian’, ‘mean’, or ‘median’ to sample using other sampling methods

class astro_traj.sample.Hernquist_pdf(abulge, rcut, momtype=1, a=None, b=None, xtol=1e-14, badvalue=None, name=None, longname=None, shapes=None, extradoc=None, seed=None)[source]

Bases: scipy.stats._distn_infrastructure.rv_continuous

density pdf from Hernquist potential

Attributes

random_state Get or set the RandomState object for generating random variates.

Methods

__call__(*args, **kwds) Freeze the distribution for the given arguments.
cdf(x, *args, **kwds) Cumulative distribution function of the given RV.
entropy(*args, **kwds) Differential entropy of the RV.
expect([func, args, loc, scale, lb, ub, …]) Calculate expected value of a function with respect to the distribution.
fit(data, *args, **kwds) Return MLEs for shape (if applicable), location, and scale parameters from data.
fit_loc_scale(data, *args) Estimate loc and scale parameters from data using 1st and 2nd moments.
freeze(*args, **kwds) Freeze the distribution for the given arguments.
interval(alpha, *args, **kwds) Confidence interval with equal areas around the median.
isf(q, *args, **kwds) Inverse survival function (inverse of sf) at q of the given RV.
logcdf(x, *args, **kwds) Log of the cumulative distribution function at x of the given RV.
logpdf(x, *args, **kwds) Log of the probability density function at x of the given RV.
logsf(x, *args, **kwds) Log of the survival function of the given RV.
mean(*args, **kwds) Mean of the distribution.
median(*args, **kwds) Median of the distribution.
moment(n, *args, **kwds) n-th order non-central moment of distribution.
nnlf(theta, x) Return negative loglikelihood function.
pdf(x, *args, **kwds) Probability density function at x of the given RV.
ppf(q, *args, **kwds) Percent point function (inverse of cdf) at q of the given RV.
rvs(*args, **kwds) Random variates of given type.
sf(x, *args, **kwds) Survival function (1 - cdf) at x of the given RV.
stats(*args, **kwds) Some statistics of the given RV.
std(*args, **kwds) Standard deviation of the distribution.
var(*args, **kwds) Variance of the distribution.