MeasurementErrorSampler¶
- class discO.MeasurementErrorSampler(*, c_err: Callable | CoordinateFrame | SkyCoord | BaseRepresentation | float | ndarray | Mapping | Quantity | None = None, method: str | None = None, **kwargs)[source]¶
Bases:
CommonBase
Draw a realization given measurement errors.
- Parameters:
- c_err
callable()
orNone
(optional) Callable with single mandatory positional argument – coordinates (“c”) – that returns the absolute error.
- frame: frame-like or None (optional, keyword-only)
- The frame of the observational errors, ie the frame in which
the error function should be applied along each dimension.
- representation_type: |Representation| or None (optional, keyword-only)
The coordinate representation in which to resample along each dimension.
- c_err
- Returns:
PotentialSampler
or subclassIf
return_specific_class
is True, returns subclass.
- Other Parameters:
- Raises:
KeyError
On class declaration if class registry information already exists, eg. if registering two classes with the same name.s
ValueError
If directly instantiating a MeasurementErrorSampler (not a subclass) and
method
is not in the registryIf instantiating a MeasurementErrorSampler subclass and
method
is not None.
Attributes Summary
The frame.
The representation type.
Methods Summary
__call__
(c[, c_err, random])Draw a realization given Measurement error.
run
(c[, c_err, random, batch, progress])Draw a realization given measurement error.
Attributes Documentation
- frame¶
The frame.
- representation_type¶
The representation type.
Methods Documentation
- abstract __call__(c: CoordinateFrame | SkyCoord, c_err: Callable | CoordinateFrame | SkyCoord | BaseRepresentation | float | ndarray | Mapping | Quantity | None = None, *, random: int | RandomState | None = None, **kwargs) SkyCoord [source]¶
Draw a realization given Measurement error.
- Parameters:
- c
SkyCoord
instance - c_errcoord-like or
callable()
orQuantity
orNone
(optional) - representation_type: |Representation| or None (optional, keyword-only)
The coordinate representation in which to resample along each dimension.
- random
RandomState
orint
(optional, keyword-only) The random number generator or generator seed. Unfortunately, scipy does not yet support
Generator
- **kwargs
passed to underlying instance
- c
- Returns:
Notes
If this is
MeasurementErrorSampler
then arguments are passed to the wrapped instance (see ‘method’ argument on initialization).
- run(c: SkyCoord, c_err: CoordinateFrame | SkyCoord = None, *, random: int | RandomState | None = None, batch: bool = False, progress: bool = True, **kwargs) SkyCoord [source]¶
Draw a realization given measurement error.
- Parameters:
- Returns:
- Other Parameters:
- random
RandomState
orint
(optional, keyword-only) The random number generator or generator seed. Unfortunately, scipy does not yet support
Generator
- random
Notes
If this is
MeasurementErrorSampler
then arguments are passed to the wrapped instance (see ‘method’ argument on initialization).