PotentialWrapper¶
- class discO.PotentialWrapper(potential: Any, *, frame: CoordinateFrame | SkyCoord | str | None = None, representation_type: BaseRepresentation | str | None | ellipsis = None)[source]¶
Bases:
object
Base-class for evaluating potentials.
- Parameters:
- potentialobject
The potential.
- frameframe-like or
None
orEllipsis
(optional, keyword-only) The natural frame of the potential.
- representation_typerepresentation-like or
None
orEllipsis
Attributes Summary
The default
BaseRepresentation
of the potential.The
BaseCoordinateFrame
of the potential.The
BaseRepresentation
of the potential.The wrapped potential.
Methods Summary
__call__
(points, *[, representation_type])Evaluate the specific potential.
acceleration
(potential, points, *[, frame, ...])Evaluate the specific force.
coefficients
(potential)Coefficients of the potential.
density
(potential, points, *[, ...])Evaluate the density in the
potential
-density pair.potential
(potential, points, *[, frame, ...])Evaluate the potential.
specific_force
(potential, points, *[, ...])Evaluate the specific force.
total_mass
(potential)Evaluate the total mass.
Attributes Documentation
- default_representation¶
The default
BaseRepresentation
of the potential.
- frame¶
The
BaseCoordinateFrame
of the potential.
- representation_type¶
The
BaseRepresentation
of the potential.
- wrapped¶
The wrapped potential.
Methods Documentation
- __call__(points: BaseRepresentation | CoordinateFrame | SkyCoord, *, representation_type: BaseRepresentation | str | None | ellipsis = None, **kwargs)[source]¶
Evaluate the specific potential.
- Parameters:
- pointscoord-array or
BaseRepresentation
orNone
(optional) The points at which to evaluate the potential. Potentials do not have an intrinsic reference frame, but if we have assigned one, then anything needs to be converted to that frame.
- representation_type
BaseRepresentation
orNone
(optional, keyword-only) The representation type in which to return data. None means no representation is forced.
- **kwargs
Arguments into the potential.
- pointscoord-array or
- Returns:
- points
BaseCoordinateFrame
orSkyCoord
- values
Quantity
- points
- classmethod acceleration(potential: Any, points: BaseRepresentation | CoordinateFrame | SkyCoord, *, frame: CoordinateFrame | None = None, representation_type: BaseRepresentation | str | None | ellipsis = None, **kwargs)¶
Evaluate the specific force.
- Parameters:
- pointscoord-array or
BaseRepresentation
orNone
(optional) The points at which to evaluate the force. Potentials do not have an intrinsic reference frame, but if we have assigned one, then anything needs to be converted to that frame.
- representation_type
BaseRepresentation
orNone
(optional, keyword-only) The representation type in which to return data.
- **kwargs
Arguments into the potential.
- pointscoord-array or
- Returns:
BaseVectorField
subclass instanceType set by
representation_type
- classmethod density(potential: Any, points: BaseRepresentation | CoordinateFrame | SkyCoord, *, representation_type: BaseRepresentation | str | None | ellipsis = None, **kwargs) Tuple[CoordinateFrame | SkyCoord, Quantity] [source]¶
Evaluate the density in the
potential
-density pair.- Parameters:
- pointscoord-array or
BaseRepresentation
orNone
(optional) The points at which to evaluate the density. Potentials do not have an intrinsic reference frame, but if we have assigned one, then anything needs to be converted to that frame.
- representation_type
BaseRepresentation
orNone
(optional, keyword-only) The representation type in which to return data. None means no representation is forced.
- **kwargs
Arguments into the potential.
- pointscoord-array or
- Returns:
- points
BaseCoordinateFrame
orSkyCoord
- values
Quantity
- points
- classmethod potential(potential: Any, points: BaseRepresentation | CoordinateFrame | SkyCoord, *, frame: CoordinateFrame | None = None, representation_type: BaseRepresentation | str | None | ellipsis = None, **kwargs)[source]¶
Evaluate the potential.
- Parameters:
- pointscoord-array or
BaseRepresentation
orNone
(optional) The points at which to evaluate the potential. Potentials do not have an intrinsic reference frame, but if we have assigned one, then anything needs to be converted to that frame.
- representation_type
BaseRepresentation
orNone
(optional, keyword-only) The representation type in which to return data. None means no representation is forced.
- **kwargs
Arguments into the potential.
- pointscoord-array or
- Returns:
- points
BaseCoordinateFrame
orSkyCoord
- values
Quantity
- points
- classmethod specific_force(potential: Any, points: BaseRepresentation | CoordinateFrame | SkyCoord, *, frame: CoordinateFrame | None = None, representation_type: BaseRepresentation | str | None | ellipsis = None, **kwargs)[source]¶
Evaluate the specific force.
- Parameters:
- pointscoord-array or
BaseRepresentation
orNone
(optional) The points at which to evaluate the force. Potentials do not have an intrinsic reference frame, but if we have assigned one, then anything needs to be converted to that frame.
- representation_type
BaseRepresentation
orNone
(optional, keyword-only) The representation type in which to return data.
- **kwargs
Arguments into the potential.
- pointscoord-array or
- Returns:
BaseVectorField
subclass instanceType set by
representation_type