popsynth.aux_samplers package¶
Submodules¶
- popsynth.aux_samplers.delta_aux_sampler module
- popsynth.aux_samplers.lognormal_aux_sampler module
- popsynth.aux_samplers.normal_aux_sampler module
- popsynth.aux_samplers.plaw_aux_sampler module
- popsynth.aux_samplers.sky_sampler module
- popsynth.aux_samplers.trunc_normal_aux_sampler module
- popsynth.aux_samplers.viewing_angle_sampler module
Module contents¶
-
class
popsynth.aux_samplers.
DeltaAuxSampler
(name: str, observed: bool = True)[source]¶ Bases:
popsynth.auxiliary_sampler.AuxiliarySampler
-
__init__
(name: str, observed: bool = True)[source]¶ A delta-function sampler for which the true value is fixed at
xp
. Assumes property is observed by default, in which case the observed value is sampled from the true value with some normally-distributed error,sigma
.Parameters: - name (str) – Name of the property
- observed (bool) – True if the property is observed, False if it is latent. Defaults to True
- xp (
AuxiliaryParameter
) – Value at which delta function is located - sigma (
AuxiliaryParameter
) – Standard deviation of normal distribution from which observed values are sampled, ifobserved
is True
-
sigma
¶
-
xp
¶
-
-
class
popsynth.aux_samplers.
ViewingAngleSampler
[source]¶ Bases:
popsynth.auxiliary_sampler.NonObservedAuxSampler
-
__init__
()[source]¶ A viewing angle sampler that samples from 0 to
max_angle
. Unlike other samplers, it assumes that this is NOT an observed propertyParameters: max_angle ( AuxiliaryParameter
) – The maximum angle to which to sample in degrees
-
max_angle
¶
-
-
class
popsynth.aux_samplers.
LogNormalAuxSampler
(name: str, observed: bool = True)[source]¶ Bases:
popsynth.auxiliary_sampler.AuxiliarySampler
-
__init__
(name: str, observed: bool = True)[source]¶ A Log normal sampler, where property ~ e^N(
mu
,sigma
).Parameters: - name (str) – Name of the property
- observed (bool) – True if the property is observed, False if it is latent. Defaults to True
- mu (
AuxiliaryParameter
) – Mean of the lognormal - tau (
AuxiliaryParameter
) – Standard deviation of the lognormal - sigma (
AuxiliaryParameter
) – Standard deviation of normal distribution from which observed values are sampled, ifobserved
is True
-
mu
¶
-
sigma
¶
-
tau
¶
-
-
class
popsynth.aux_samplers.
Log10NormalAuxSampler
(name: str, observed: bool = True)[source]¶ Bases:
popsynth.auxiliary_sampler.AuxiliarySampler
-
__init__
(name: str, observed: bool = True)[source]¶ A Log10 normal sampler, where property ~ 10^N(
mu
,sigma
).Parameters: - name (str) – Name of the property
- observed (bool) – True if the property is observed, False if it is latent. Defaults to True
- mu (
AuxiliaryParameter
) – Mean of the log10normal - tau (
AuxiliaryParameter
) – Standard deviation of the log10normal - sigma (
AuxiliaryParameter
) – Standard deviation of normal distribution from which observed values are sampled, ifobserved
is True
-
mu
¶
-
sigma
¶
-
tau
¶
-
-
class
popsynth.aux_samplers.
NormalAuxSampler
(name: str, observed: bool = True)[source]¶ Bases:
popsynth.auxiliary_sampler.AuxiliarySampler
-
__init__
(name: str, observed: bool = True)[source]¶ A normal distribution sampler, where property ~ N(
mu
,sigma
).Parameters: - name (str) – Name of the property
- observed (bool) – True if the property is observed, False if it is latent. Defaults to True
- mu (
AuxiliaryParameter
) – Mean of the normal - tau (
AuxiliaryParameter
) – Standard deviation of the normal - sigma (
AuxiliaryParameter
) – Standard deviation of normal distribution from which observed values are sampled, ifobserved
is True
-
mu
¶
-
sigma
¶
-
tau
¶
-
-
class
popsynth.aux_samplers.
TruncatedNormalAuxSampler
(name: str, observed: bool = True)[source]¶ Bases:
popsynth.auxiliary_sampler.AuxiliarySampler
-
__init__
(name: str, observed: bool = True)[source]¶ A truncated normal sampler, where property ~ N(
mu
,sigma
), betweenlower
andupper
.Parameters: - name (str) – Name of the property
- observed (bool) – True if the property is observed, False if it is latent. Defaults to True
- mu (
AuxiliaryParameter
) – Mean of the normal - tau (
AuxiliaryParameter
) – Standard deviation of the normal - lower (
AuxiliaryParameter
) – Lower bound of the truncation - upper (
AuxiliaryParameter
) – Upper bound of the truncation - sigma (
AuxiliaryParameter
) – Standard deviation of normal distribution from which observed values are sampled, ifobserved
is True
-
lower
¶
-
mu
¶
-
sigma
¶
-
tau
¶
-
upper
¶
-
-
class
popsynth.aux_samplers.
ParetoAuxSampler
(name: str, observed: bool = True)[source]¶ Bases:
popsynth.auxiliary_sampler.AuxiliarySampler
-
__init__
(name: str, observed: bool = True)[source]¶ A pareto distribution sampler, where property ~ 1 / x^(
alpha
+ 1).Parameters: - name (str) – Name of the property
- observed (bool) – True if the property is observed, False if it is latent. Defaults to True
- xmin (
AuxiliaryParameter
) – Minimum value of the pareto - alpha (
AuxiliaryParameter
) – Index of the pareto - sigma (
AuxiliaryParameter
) – Standard deviation of normal distribution from which observed values are sampled, ifobserved
is True
-
alpha
¶
-
sigma
¶
-
xmin
¶
-
-
class
popsynth.aux_samplers.
PowerLawAuxSampler
(name: str, observed: bool = True)[source]¶ Bases:
popsynth.auxiliary_sampler.AuxiliarySampler
-
__init__
(name: str, observed: bool = True)[source]¶ A bounded power law distribution sampler, where property ~ x^``alpha``.
Parameters: - name (str) – Name of the property
- observed (bool) – True if the property is observed, False if it is latent. Defaults to True
- xmin (
AuxiliaryParameter
) – Minimum value of the power law - xmax (:class:``AuxiliaryParameter) – Maximum value of the power law
- sigma (
AuxiliaryParameter
) – Standard deviation of normal distribution from which observed values are sampled, ifobserved
is True
-
alpha
¶
-
sigma
¶
-
xmax
¶
-
xmin
¶
-
-
class
popsynth.aux_samplers.
BrokenPowerLawAuxSampler
(name: str, observed: bool = True)[source]¶ Bases:
popsynth.auxiliary_sampler.AuxiliarySampler
-
__init__
(name: str, observed: bool = True)[source]¶ A broken power law distribution sampler, where property ~ x^``alpha`` for x <
xbreak
, and property ~ x^``beta`` for x >xbreak
.Parameters: - name (str) – Name of the property
- observed (bool) – True if the property is observed, False if it is latent. Defaults to True
- xmin (
AuxiliaryParameter
) – Minimum value of the broken power law - xmax (:class:``AuxiliaryParameter) – Maximum value of the broken power law
- sigma (
AuxiliaryParameter
) – Standard deviation of normal distribution from which observed values are sampled, ifobserved
is True
-
alpha
¶
-
beta
¶
-
xbreak
¶
-
xmax
¶
-
xmin
¶
-