RVS_Continuous¶
- class discO.RVS_Continuous(*, rvs: rv_continuous, c_err: Callable | CoordinateFrame | SkyCoord | BaseRepresentation | float | ndarray | Mapping | Quantity | None = None, method: str | None = None, **kwargs)[source]¶
Bases:
MeasurementErrorSampler
Draw a realization given a
scipy.stats.rv_continuous
.- Parameters:
- rvs
rv_continuous
subclass (keyword-only) In the call method this is used to generate points by calling
.rvs()
with:params set by kwarg
loc
from the samplesscale
from c_errsize
as the samples’ shaperandom_state
from the NumPy random generator.
- c_err
float
orNone
(optional, keyword-only) The absolute error.
- **kwargs
Stored as
params
.
- rvs
- Other Parameters:
Attributes Summary
The random-variate sampler (rvs).
Methods Summary
__call__
(c[, c_err, random])Draw a realization given the errors.
Attributes Documentation
- rvs¶
The random-variate sampler (rvs).
Methods Documentation
- __call__(c: CoordinateFrame | SkyCoord, c_err: Callable | CoordinateFrame | SkyCoord | BaseRepresentation | float | ndarray | Mapping | Quantity | None = None, *, random: int | RandomState | None = None, **params) SkyCoord [source]¶
Draw a realization given the errors.
Steps:
transforms
c
to frame and representation type.constructs RVS parameters, in particular
scale
.(re)samples, on the representation array.
reverse constructs the new
c
in the original frame and representation type.
- Parameters:
- c
SkyCoord
instance The coordinates at which to resample.
- c_err
SkyCoord
orNone
(optional) The scale of the errors. Must be in the correct frame and representation type.
d_pos
is created fromc_err
. It setsscale
.- **params
Parameters into the RVS. Scipy normally does these as arguments, but it also works as kwargs.
- c
- Returns:
- new_c
SkyCoord
The resampled points. Has the same frame, representation_type, and shape and framas
c
.
- new_c
- Other Parameters:
- random
RandomState
orint
(optional, keyword-only) The random number generator or generator seed. Unfortunately, scipy does not yet support
Generator
- random