Skip to content

Python package to manipulate the Cassini VIMS data from the PDS

License

Notifications You must be signed in to change notification settings

seignovert/pypds

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPDS

Python package to manipulate the Cassini VIMS data from the PDS.

Install

python setup.py install|develop

Init

import pypds as pds

# Download a single release
pds.PDS('vims').download_release(1)
# or
pds.PDS('vims').download_release('covims_0001')

# Download a serie releases
pds.PDS('vims').download_release([1,2,3])

# Check the last release for `VIMS` available on the PDS
pds.PDS('vims').last_release

# List the releases downloaded
pds.PDS('vims').releases

# Download all the new releases
pds.PDS('vims').update

# Count the number of images included in the downloaded releases
pds.PDS('vims').nb_imgs
# or
len(pds.PDS('vims'))

# Get start time in the downloaded releases
pds.PDS('vims').start
# Get release end time in the downloaded releases
pds.PDS('vims').end

# Get first image in the downloaded releases
pds.PDS('vims').first
# Get last image in the downloaded releases
pds.PDS('vims').last

Usage

import pypds as pds

## RELEASES

# Load a release
pds.RELEASE('covims_0001')
# or
pds.RELEASE(1, inst='VIMS')
# or [default: `VIMS`]
pds.RELEASE(1)

# (If the MD5 file does not exist it will be downloaded into `./md5/` folder)

# Update release
pds.RELEASE('covims_0001', overwrite=True, load=False).download

# Get release folders
pds.RELEASE('covims_0001').folders

# Count the number of images included in the release
pds.RELEASE('covims_0001').nb_imgs
# or
len(pds.RELEASE('covims_0001'))

# Get release start time
pds.RELEASE('covims_0001').start
# Get release end time
pds.RELEASE('covims_0001').end

# Get release first image
pds.RELEASE('covims_0001').first
# Get release last image
pds.RELEASE('covims_0001').last


## FOLDERS

# Get a specific folder
pds.FOLDER('2000262T123038_2000262T132642', 'covims_0001')

# Count the number of images included in the folder
pds.FOLDER('2000262T123038_2000262T132642', 'covims_0001').nb_imgs
# or
len(pds.FOLDER('2000262T123038_2000262T132642', 'covims_0001'))

# Get folder start time
pds.FOLDER('2000262T123038_2000262T132642', 'covims_0001').start
# Get folder end time
pds.FOLDER('2000262T123038_2000262T132642', 'covims_0001').end

# Get folder first image
pds.FOLDER('2000262T123038_2000262T132642', 'covims_0001').first
# Get folder last image
pds.FOLDER('2000262T123038_2000262T132642', 'covims_0001').last


## IMAGES

# Get a specific image
img = pds.IMG('1347971911_3','2000262T123038_2000262T132642', 'covims_0001')

# Get its `.LBL` location
img.lbl
# Get its `.QUB` location
img.qub
# Get its `.JPG` location
img.jpg
# Get its `.JPG thumbnail` location
img.thumb
# Get its `.TIFF` location
img.tiff

Database

from pypds import DB

# Create the database based on MD5 files
# available for a specific instrument
DB().build('vims')

# Search for the first image in a release
DB().first('covims_0001')

# Search for the last image in a release
DB().last('covims_0001')

# Count the number of images in a release
DB().nb_imgs('covims_0001')

# Count the total number of images in the database
DB().nb_tot_imgs('vims')

# Delete the database
DB().delete

## IMAGES

# Search an image
DB().img('1766654697_1','vims')
# or [default: `VIMS`]
DB().img('1766654697_1')

# Get `.lbl` pds location
DB().img('1766654697_1').lbl

## RELEASE

# Get all the releases for an instrument
DB().releases('vims')

Dependencies:

  • wget
  • lxml
  • requests
  • logging
  • datetime

About

Python package to manipulate the Cassini VIMS data from the PDS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages