Load a DEM of phobos

Load a DEM of phobos#

By Leo Minton

This example shows how to load arbitrary DEM data using the data composer.

1.7 load phobos dem
Creating a new grid
Generating a mesh with icosphere level 7.
Applying 1 dataset to the mesh
    Reading https://planetarymaps.usgs.gov/mosaic/Phobos_ME_HRSC_DEM_Global_2ppd.tif (699x349px of 699x349px)

  0%|          | 0/70 [00:00<?, ?it/s]
  1%|▏         | 1/70 [00:00<00:21,  3.25it/s]
  4%|▍         | 3/70 [00:00<00:09,  7.07it/s]
 10%|█         | 7/70 [00:00<00:05, 12.34it/s]
 24%|██▍       | 17/70 [00:00<00:02, 26.42it/s]
 50%|█████     | 35/70 [00:01<00:00, 47.76it/s]
100%|██████████| 70/70 [00:01<00:00, 63.80it/s]
        Calculating pixel distances
    Setting elevation data
    Done

from cratermaker import Simulation

simdir = "simdata-1_7"

# Note, that for these examples we pass ask_overwrite=False and reset=True to the Simulation constructor. This will suppress
# prompts that ask the user if they want to overwrite existing files, which would would prevent these examples from running on their
# own when building the documentation pages. Alternatively, calling cratermaker.cleanup(simdir) will remove all pre-existing output files.
sim = Simulation(
    target="Phobos",
    surface="icosphere",
    simdir=simdir,
    gridlevel=7,
    ask_overwrite=False,
    reset=True,
)

with sim.surface.data_composer() as composer:
    composer.add_data("https://planetarymaps.usgs.gov/mosaic/Phobos_ME_HRSC_DEM_Global_2ppd.tif")

sim.show3d()

Total running time of the script: (0 minutes 10.788 seconds)

Gallery generated by Sphinx-Gallery