Target#
The Target class contains the properties of the celestial body being impacted.
Available Implementation#
Currently, there is only one implementation of Target. Passing the name of the target body, such as “Moon” or “Mars” to the Target.maker() factory method will return a Target object with the properties of the specified body. The
- class cratermaker.components.target.Target(name, radius=None, diameter=None, mass=None, transition_scale_type=None, material=None, density=None, **kwargs)[source]#
Bases:
ComponentBaseRepresents the target body in a crater simulation.
This class encapsulates the properties of the target that is impacted, including its material composition, size, and other relevant physical characteristics.
- classmethod maker(target='Moon', radius=None, diameter=None, mass=None, transition_scale_type=None, material=None, density=None, **kwargs)[source]#
Initialize the target object, setting properties from the provided arguments.
- Parameters:
target (str, Target, or None) – Name of the target body or a Target object.
radius (FloatLike or None) – Radius of the target body in km.
diameter (FloatLike or None) – Diameter of the target body in km.
mass (FloatLike or None) – Mass of the target body in kg.
transition_scale_type (str or None) – Simple-to-complex transition scaling to use for the surface (either “silicate” or “ice”).
material (str or None) – Name of the material composition of the target body.
density (FloatLike or None) – Volumetric density of the surface of the target body in kg/m³.
**kwargs (Any) – Additional keyword arguments that are either ignored or passed to internal functions as needed.
Notes
The radius and diameter parameters are mutually exclusive. Only one of them should be provided.
Parameters set explicitly using keyword arguments will override those drawn from the catalogue.
- property radius#
The radius of the target body in meters.
- property diameter#
The diameter of the target body in meters.
- property surface_area#
The surface area of the target body in m².
- property volume#
The volume of the target body in m³.
- property circumference#
The circumference of the target body in meters.
- property mass#
The mass of the target body in kilograms.
- property name#
The name of the target body.
- property material#
The name of the material composition of the target body’s surface, which is used for crater scaling.
- property density#
The volumetric density of the surface of the target body in kg/m³.
- property catalogue#
Catalogue of predefined target bodies.
- property catalogue_key#
The key used to identify the property used as the key in a catalogue.
- property transition_scale_type#
The type of simple-to-complex transition scaling used for the surface, either ‘silicate’ or ‘ice’.
- property escape_velocity#
The escape velocity for the target body in m/s.
- property gravity#
The gravitational acceleration at the surface of the target body in m/s².
In [1]: from cratermaker import Target
In [2]: target = Target.maker("Ceres")
In [3]: print(target)
<Target: Ceres>
Material: Soft Rock
Diameter: 939.4 km
Mass: 9.38e+20 kg
Surface density: 2250.0 kg/m³
Transition Type: ice
Escape Velocity: 516.4 m/s
Gravity: 0.284 m/s²