Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""Physical units on snapshots."""
from .. import units as plonk_units
from .snap import SnapLike
# Add units
plonk_units.define('solar_mass = 1.9891e33 g')
plonk_units.define('solar_radius = 6.959500e10 cm')
plonk_units.define('earth_mass = 5.979e27 g')
plonk_units.define('earth_radius = 6.371315e8 cm')
plonk_units.define('jupiter_mass = 1.89813e30 g')
def generate_units_dictionary(length, mass, time, magnetic_field):
"""Generate units dictionary.
Parameters
----------
length
Length unit as a Pint quantity.
mass
Mass unit as a Pint quantity.
time
Time unit as a Pint quantity.
magnetic_field
Magnetic field unit as a Pint quantity.
"""Physical units on snapshots."""
from .. import units as plonk_units
from .snap import SnapLike
# Add units
plonk_units.define('solar_mass = 1.9891e33 g')
plonk_units.define('solar_radius = 6.959500e10 cm')
plonk_units.define('earth_mass = 5.979e27 g')
plonk_units.define('earth_radius = 6.371315e8 cm')
plonk_units.define('jupiter_mass = 1.89813e30 g')
def generate_units_dictionary(length, mass, time, magnetic_field):
"""Generate units dictionary.
Parameters
----------
length
Length unit as a Pint quantity.
mass
Mass unit as a Pint quantity.
time
"""Physical units on snapshots."""
from .. import units as plonk_units
from .snap import SnapLike
# Add units
plonk_units.define('solar_mass = 1.9891e33 g')
plonk_units.define('solar_radius = 6.959500e10 cm')
plonk_units.define('earth_mass = 5.979e27 g')
plonk_units.define('earth_radius = 6.371315e8 cm')
plonk_units.define('jupiter_mass = 1.89813e30 g')
def generate_units_dictionary(length, mass, time, magnetic_field):
"""Generate units dictionary.
Parameters
----------
length
Length unit as a Pint quantity.
mass
Mass unit as a Pint quantity.
time
Time unit as a Pint quantity.
magnetic_field
"""Physical units on snapshots."""
from .. import units as plonk_units
from .snap import SnapLike
# Add units
plonk_units.define('solar_mass = 1.9891e33 g')
plonk_units.define('solar_radius = 6.959500e10 cm')
plonk_units.define('earth_mass = 5.979e27 g')
plonk_units.define('earth_radius = 6.371315e8 cm')
plonk_units.define('jupiter_mass = 1.89813e30 g')
def generate_units_dictionary(length, mass, time, magnetic_field):
"""Generate units dictionary.
Parameters
----------
length
Length unit as a Pint quantity.
mass
Mass unit as a Pint quantity.
time
Time unit as a Pint quantity.
magnetic_field
Magnetic field unit as a Pint quantity.
"""Physical units on snapshots."""
from .. import units as plonk_units
from .snap import SnapLike
# Add units
plonk_units.define('solar_mass = 1.9891e33 g')
plonk_units.define('solar_radius = 6.959500e10 cm')
plonk_units.define('earth_mass = 5.979e27 g')
plonk_units.define('earth_radius = 6.371315e8 cm')
plonk_units.define('jupiter_mass = 1.89813e30 g')
def generate_units_dictionary(length, mass, time, magnetic_field):
"""Generate units dictionary.
Parameters
----------
length
Length unit as a Pint quantity.
mass
Mass unit as a Pint quantity.
time
Time unit as a Pint quantity.