Giter Site home page Giter Site logo

drjmcauliffe / planetaryimage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from planetarypy/planetaryimage

0.0 1.0 0.0 2.78 MB

Python PDS and Isis Cube file parser.

License: BSD 3-Clause "New" or "Revised" License

Makefile 6.51% Python 93.49%

planetaryimage's Introduction

planetaryimage - Open PDS and Isis CubeFiles in Python

NOTE This is Alpha quality software that is being actively developed, use at your own risk.

Planetary image parser

Features

  • Reads in PDS Images as NumPy arrays.
  • Reads in Isis Cube Files as NumPy arrays.

Check out a few simple examples of opening and viewing PDS and Isis CubeFiles in an IPython notebook.

Quickstart

The example below will walk you through setting up a Python virtual environment and installing the necessary software as well as a few handy extras. It then downloads a sample Pancam PDS image, opens and displays that image in your web browser in an IPython Notebook. The example assumes you have Python, virtualenv, and pip installed on your system. If you don't, don't know what this means or aren't thrilled by the opportunity to learn what this means, this software may be a little too immature for you to use at this point.

Create and activate a virtual environment:

virtualenv venv
source venv/bin/activate

Upgrade pip, then pip install the package and IPython notebook and matplotlib to help display the image:

pip install -U pip
pip install planetaryimage matplotlib ipython[notebook]

This quick example will show how to open and display a Pancam PDS image using this module. First, grab a sample image:

wget http://pds-imaging.jpl.nasa.gov/data/mer/opportunity/mer1po_0xxx/data/sol2840/edr/1p380322615effbr43p2443l1m1.img

Now run python in an IPython Notebook (a browser window should pop up after entering the following command):

$ ipython notebook

Create a new notebook in your web browser and then paste the following code into a cell and execute it by pressing Shift+ENTER. This will load and display the image:

%matplotlib inline
import matplotlib.pyplot as plt
from planetaryimage import PDS3Image
image = PDS3Image.open('1p380322615effbr43p2443l1m1.img')
plt.imshow(image.data, cmap='gray')

planetaryimage's People

Contributors

nikhilkalige avatar godber avatar percurnicus avatar

Watchers

Dr. J. McAuliffe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.