ast2000tools.utils¶
Module containing various utility functions.
Functions
|
Converts a given speed from astronomical units per year to meters per second. |
|
Converts a given distance from astronomical units to kilometers. |
|
Converts a given distance from astronomical units to meters. |
|
Informs about whether a newer version of ast2000tools than the one currently installed is available. |
|
Converts a given time from days to seconds. |
|
Converts a given time from days to years. |
|
Converts a given angle from degrees to radians. |
|
Turns a username into a 5-digit seed. |
|
Converts a given mass from kilograms to meters. |
|
Converts a given distance from kilometers to astronomical units. |
|
Converts a given speed from meters per second to astronomical units per year. |
|
Converts a given distance from meters to astronomical units. |
|
Converts a given mass from meters to kilograms. |
|
Converts a given angle from radians to degrees. |
|
Converts a given time from seconds to days. |
|
Converts a given time from seconds to years. |
|
Converts a given time from years to days. |
|
Converts a given time from years to seconds. |
-
ast2000tools.utils.
check_for_newer_version
(verbose=False)¶ Informs about whether a newer version of ast2000tools than the one currently installed is available.
- Parameters
verbose (bool, optional) – Whether to print a confirmation message when the package is up to date. Default is False.
- Raises
RuntimeError – When ast2000tools is not installed through pip.
-
ast2000tools.utils.
get_seed
(username)¶ Turns a username into a 5-digit seed.
-
ast2000tools.utils.
yr_to_s
(yr)¶ Converts a given time from years to seconds.
-
ast2000tools.utils.
s_to_yr
(s)¶ Converts a given time from seconds to years.
-
ast2000tools.utils.
day_to_s
(day)¶ Converts a given time from days to seconds.
-
ast2000tools.utils.
s_to_day
(s)¶ Converts a given time from seconds to days.
-
ast2000tools.utils.
day_to_yr
(day)¶ Converts a given time from days to years.
-
ast2000tools.utils.
yr_to_day
(yr)¶ Converts a given time from years to days.
-
ast2000tools.utils.
AU_to_m
(AU)¶ Converts a given distance from astronomical units to meters.
-
ast2000tools.utils.
m_to_AU
(m)¶ Converts a given distance from meters to astronomical units.
-
ast2000tools.utils.
AU_to_km
(AU)¶ Converts a given distance from astronomical units to kilometers.
-
ast2000tools.utils.
km_to_AU
(km)¶ Converts a given distance from kilometers to astronomical units.
-
ast2000tools.utils.
kg_to_m
(kg)¶ Converts a given mass from kilograms to meters.
-
ast2000tools.utils.
m_to_kg
(m)¶ Converts a given mass from meters to kilograms.
-
ast2000tools.utils.
AU_pr_yr_to_m_pr_s
(AU_pr_yr)¶ Converts a given speed from astronomical units per year to meters per second.
-
ast2000tools.utils.
m_pr_s_to_AU_pr_yr
(m_pr_s)¶ Converts a given speed from meters per second to astronomical units per year.
-
ast2000tools.utils.
rad_to_deg
(rad)¶ Converts a given angle from radians to degrees.