GridResidual¶
- class discO.GridResidual(*args, method: str | None = None, **kwargs)[source]¶
Bases:
ResidualMethod
Residual on a grid.
- Parameters:
- grid
BaseCoordinateFrame
orSkyCoord
The grid on which to evaluate the residual. Mandatory.
- original_potential: object or :class:`~PotentialWrapper` or None (optional)
The potential. If not already a PotentialWrapper, it is wrapped: this means that the frame is
UnFrame
. When evaluating the residual, the grid can only be frame-like if this has a frame (is notUnFrame
).- observable
str
(optional) name of method in
PotentialWrapper
.
- grid
- Other Parameters:
- representation_typerepresentation-resolvable (optional, keyword-only)
The output representation type. If None, resolves to
PotentialWrapper.base_representation
- **kwargs
default arguments into
evaluate_potential
.
Methods Summary
evaluate_potential
(potential[, observable, ...])Evaluate method on potential.
Methods Documentation
- evaluate_potential(potential: PotentialWrapper | Any, observable: str | None = None, *, representation_type: BaseRepresentation | str | None | ellipsis = None, **kwargs) object [source]¶
Evaluate method on potential.
- Parameters:
- potentialobject or
PotentialWrapper
The potential. If not already a PotentialWrapper, it is wrapped: this means that the frame is
UnFrame
.- observable
str
name of method in
PotentialWrapper
. If None (default), uses default value –.observable
.- representation_type: representation-resolvable (optional, keyword-only)
The output representation type. If None (default), uses default representation point.
- **kwargs
Passed to method in
PotentialWrapper
. First mixed in withdefault_params
(preferringkwargs
).
- potentialobject or
- Returns:
- object
- Other Parameters:
- pointsframe-like or
BaseRepresentation
(optional, keyword-only) Not recommended, but allowed, to force the points on which the residual is calculated. The points can only be frame-like if the frame of the potentials is not
UnFrame
. If not specified, and it shouldn’t be, uses points determined by the class at initialization.
- pointsframe-like or