Skip to main content

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é

Metadata

Release files for marsimage 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marsimage 0.1.2
File Size Uploaded Provenance
marsimage-0.1.2.tar.gz 68.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for marsimage 0.1.2
File Interpreter ABI Platform
marsimage-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.2 MB

Release files / marsimage-0.1.2.tar.gz

Download URL marsimage-0.1.2.tar.gz
Size 68.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9486ca16f874a1972560828e51e08131bff1c9571e9e8303403554c81fea2b7d
BLAKE2b-256 checksum
How to use checksums
36fd9ac4a59399b3c351f9ac64ceafec5f03b5aea911355fdd1b5eadab56566d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Release files / marsimage-0.1.2-py3-none-any.whl

Download URL marsimage-0.1.2-py3-none-any.whl
Size 16.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ec793e003b18b6e2dcf45c19cd80facc8bfb5959b9fca92ac497a0ccc15dbd8c
BLAKE2b-256 checksum
How to use checksums
76f1b11be1b0e36c5f09a05adc926ca7957fec743410fcaaba312c29ee2d94ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Security for marsimage 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page