Planetary Body Examples
Below are plots of supported planetary bodies in craterpy. Example crater lists and global imagery are available from craterpy.sample_data for plotting and testing purposes.
Image data are named
<body>.tif(ex.sample_data["moon.tif"])Crater data are named
<body>_craters_km.csv(ex.sample_data["moon_craters_km.csv"])
from craterpy import all_bodies, CraterDatabase, sample_data
import matplotlib.pyplot as plt
print("Supported planetary bodies:", all_bodies)
Supported planetary bodies: ['mercury', 'venus', 'moon', 'earth', 'mars', 'ceres', 'vesta', 'europa', 'ganymede', 'callisto', 'enceladus', 'tethys', 'dione', 'rhea', 'iapetus', 'pluto']
/home/docs/checkouts/readthedocs.org/user_builds/craterpy/checkouts/latest/craterpy/helper.py:20: TqdmExperimentalWarning: Using `tqdm.autonotebook.tqdm` in notebook mode. Use `tqdm.tqdm` instead to force console mode (e.g. in jupyter console)
from tqdm.autonotebook import tqdm
for body in all_bodies:
fname = f'{body}_craters_km.csv'
if fname not in sample_data:
continue
cdb = CraterDatabase(sample_data[fname], body, units='km')
print("Starting", body.capitalize(), "with CRS:", ":".join(cdb.data.crs.to_authority()))
cdb.add_circles('Rim', 1)
cdb.add_circles('Ejecta', 2.5)
ax = cdb.plot(sample_data[f'{body}.tif'], "Rim")
ax = cdb.plot_rois(sample_data[f'{body}.tif'], "Ejecta")
plt.show()
Starting Mercury with CRS: IAU_2015:19900
Starting Venus with CRS: IAU_2015:29900
Starting Moon with CRS: IAU_2015:30100
Starting Mars with CRS: IAU_2015:49900
Starting Ceres with CRS: IAU_2015:200000100
Starting Vesta with CRS: IAU_2015:200000400
Starting Europa with CRS: IAU_2015:50200
Starting Ganymede with CRS: IAU_2015:50300
Starting Callisto with CRS: IAU_2015:50400
Starting Enceladus with CRS: IAU_2015:60200
Starting Tethys with CRS: IAU_2015:60300
Starting Dione with CRS: IAU_2015:60400
Starting Rhea with CRS: IAU_2015:60500
Starting Iapetus with CRS: IAU_2015:60800
Starting Pluto with CRS: IAU_2015:99900