Skip to main content

Python package for processing and analyzing images from the NASA Mars rovers.

Project description

MarsImage

MarsImage logo

CI status Docs status Docs PyPI - Version PyPI - Python Version


MarsImage is a python package to process Mars rover images hosted on the PDS.

The full documentation can be found in: marsimage.readthedocs.io

Features

  • efficiently download rover images from the NASA Planetary Data System
  • open PDS images and access their metadata (including rover localizations and CAHVORE camera model parsing)
  • convert PDS images to .DNG or .TIFF format with rich exif metadata
  • color calibrate rover images to approximate what the human eye would see on Mars
  • preprocess images for panorama or photogrammetry workflows

Supported Missions and instruments

Mission Supported Instruments Supported Product types
Curiosity (MSL) Mastcam, Mahli, Mardi, Navcam, Hazcam DRXX, RAD_, MXY_
Perseverance (Mars2020) planned for future release -

Installation

MarsImage is available on PyPI (Python Package Index). It is recommended to install this package in a dedicated virtual environment, then install it with pip:

pip install marsimage

If you want to use this package in a Jupyter environment, you will need some extra-dependencies:

pip install marsimage[jupyter]

To upgrade to the latest version simply to:

pip install --upgrade marsimage

How to contribute

If you want to contribute to this project, you need to install hatch on your system, then clone the depot and install the default env:

git clone https://gitlab.univ-nantes.fr/mars-rovers/marsimage.git
cd marsimage

# Install dev dependencies
hatch env create

To lint and format the source code:

# preview the formatting changes
hatch fmt --diff
hatch fmt

To test the module:

hatch -e tests run tests

To build the docs:

hatch -e docs run build

External libraries disclaimer

This package requires a few externals dependencies:

  • PiDNG
  • ExifTool
  • Raw Therapee

Credits, issues and change requests to these libraries should be reported to their original developers.

Note: Only Raw Therapee needs to be installed manually by the user (see below).

PiDNG

This sub-module is mainly copy-pasted from PiDNG developed by schoolpost and available on PyPI. Here, it was patched to fix missing tags and remove LJ92 compression library (which requires a C compiler).

Details of the patch can be found in: pidng/0001-Fix-missing-tags-and-remove-LJ92-compression.patch

  • Version patched: 4.0.9
  • License: MIT

ExifTool

To simplify the install for the user, exiftool is bundled with MarsImage and should work out-of-the box on windows, linux and macos.

Note: A locally installation of perl is required on linux and macOS.

  • Currently version bundled: 13.17
  • License: GPLv3

Raw Therapee

To allow automatic TIFF conversion of the DNG images via MarsImage.rawtherapee_convert() you will need to install Raw Therapee locally. The install procedure is available on their website, then it should be automatically detected by MarsImage.

The expected location of rawtherapee-cli should be :

  • C:\Program Files\RawTherapee\X.Y\ on Windows
  • /usr/local/bin/ on macOS (and RawTherapee.app in /Applications)
  • Anywhere in the $PATH on Linux

If you don't install it to its default location, you can provide a $RAWTHERAPEE_CLI environment variable to specify the location of the rawtherapee-cli entrypoint.

  • Tested version: 5.11
  • License: GPLv3

About this project

This project was developed by Simeon Schmauß during his internship funded by Osuna and under the supervision of Stéphane Le Mouélic (LPG) and Benoît Seignovert (Osuna). It is still under active development. The source code is available in Nantes Université Gitlab and distributed under a GPLv3 public license.

Logos OSUNA / LPG / CNRS / Nantes Université

Project details


Download files

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

Source Distribution

marsimage-0.1.2.tar.gz (68.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

marsimage-0.1.2-py3-none-any.whl (16.1 MB view details)

Uploaded Python 3

File details

Details for the file marsimage-0.1.2.tar.gz.

File metadata

  • Download URL: marsimage-0.1.2.tar.gz
  • Upload date:
  • Size: 68.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for marsimage-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9486ca16f874a1972560828e51e08131bff1c9571e9e8303403554c81fea2b7d
MD5 6b0f87b33d1eaebf12ea17b377c55e8a
BLAKE2b-256 36fd9ac4a59399b3c351f9ac64ceafec5f03b5aea911355fdd1b5eadab56566d

See more details on using hashes here.

File details

Details for the file marsimage-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: marsimage-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for marsimage-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec793e003b18b6e2dcf45c19cd80facc8bfb5959b9fca92ac497a0ccc15dbd8c
MD5 8076c3501e4e7d838d2d7fa96f9c9ce8
BLAKE2b-256 76f1b11be1b0e36c5f09a05adc926ca7957fec743410fcaaba312c29ee2d94ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page