Skip to main content

A package for impact crater data science.

Project description

craterpy |TravisBadge|_ |AppveyorBadge|_ |RtdBadge|_ |PyPiBadge|_ |CodecovBadge|_ |ZenodoBadge|_
.. |ZenodoBadge| image::
.. _ZenodoBadge:

.. |TravisBadge| image::
.. _TravisBadge:

.. |AppveyorBadge| image::
.. _AppveyorBadge:

.. |RtdBadge| image::
.. _RtdBadge:

.. |PyPiBadge| image::
.. _PyPiBadge:

.. |CodecovBadge| image::
.. _CodecovBadge:


Welcome to **craterpy** (formerly ACERIM), your one-stop shop to crater data science in Python!

Please note: this package is in the alpha stage of development. You can direct any questions to Christian at Feature requests and bugs tracking will be hosted on the GitHub `bug tracker <craterpy/bugtacker>`_.

You can use craterpy to:

- import tabular crater data into DataFrames (extends pandas),
- load image data into efficient Dataset objects (extends gdal),
- easily extract, mask, filter, plot, and compute stats on crater image data.

A code-snippet and plot is worth a thousand words::

import pandas as pd
import craterpy as cp
df = pd.DataFrame("craters.csv", index)
ds = cp.Dataset("moon.tif")
rois = cp.get_roi(ds, df["Crisium"], plot_roi=True)

..image:: get_roi.png

cp.compute_stats(ds, df, rois).head()

..image:: compute_stats.png

cp.ejecta_profiles(ds, df, rois, spacing=0.1)

..image:: ejecta_profiles.png

New users should start with the IPython notebook at `tutorial <>`_ for typical usage with examples.

**Note**: While craterpy is a tool used to query image data, it does reproject it. This package **only acepts image data in simple-cylindrical (Plate Caree) projection**. Many tools exist to reproject your data. To do so in Python, we suggest checking out `GDAL <>`_.


craterpy supports python versions 2.7, 3.4 and 3.5. It depends on:

- numpy
- scipy
- pandas
- matplotlib
- gdal=2.1.0

Quick Installation with Anaconda

We reccommend the `Anaconda <>`_ package manager. See `Continuum Analytics <>`_ for installation instructions.

The following section will describe how to create and activate a conda virtual environment to run ACERIM. For more on Anaconda virtual environments, see `Managing Environments <>`_.

With *anaconda and gdal installed*, open a terminal window and create a new conda environment with the following command (replace **your_env_name** and choose desired python version)::

conda create --name your_env_name python=3.5

Activate the environment (OS X, Unix, or powershell users may need to use *source*)::

(source) activate your_env_name

Now install the dependencies. Ensure to specify the gdal and libgdal versions to avoid a known bug being tracked `here <>`_::

conda install numpy scipy pandas matplotlib gdal=2.1.0 libgdal=2.1.0

Install the latest craterpy release with pip::

pip install craterpy

Now that you have craterpy installed, head over to the `tutorial <>`_ to get started!

**Note**: Remember to activate your virtual environment each time you use ACERIM.

Forking this repository

You can fork craterpy from `GitHub <>`_. You can then clone your forked version, navigate to the root directory and install craterpy with:


python install


Full documentation is available at `readthedocs <>`_.

Support and Bug Reporting

Bugs will be tracked at `craterpy bug tracker <craterpy/bugtacker>`_. General questions can be directed to Christian at


For convenience, this project uses the OSI-certified MIT open access liscence for warranty-free ease of use and distribution. The author simply asks that you cite the project. The citable DOI can be found at Zenodo by clicking the badge below. To read more about citable code, check out `Zenodo <>`_.

.. image::


craterpy is seeking contributers of all skill levels! Please read CONTRIBUTING.rst if you are interested in supporting craterpy. Feel free to check the bug tracker for open issues or get in touch with Christian at if you have any questions.


Copyright (c) 2017- Christian Tai Udovicic. Released under the MIT license. This software comes with no warranties. See LICENSE.txt for details.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for craterpy, version 0.2.1
Filename, size File type Python version Upload date Hashes
Filename, size craterpy-0.2.1-py2.py3-none-any.whl (878.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size craterpy-0.2.1.tar.gz (18.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page