yt.data_objects.derived_quantities.
CenterOfMass
(data_source)[source]¶Calculates the center of mass, using gas and/or particles.
The center of mass is the mass-weighted mean position.
Parameters: | use_gas : bool
use_particles : bool
|
---|
Examples
>>> ds = load("IsolatedGalaxy/galaxy0030/galaxy0030")
>>> ad = ds.all_data()
>>> print ad.quantities.center_of_mass()
Attributes
Methods