Guide to Reducing MOC Narrow-Angle

Data using ISIS (2.1.x)





Table of Contents

  1. Introduction to MOC Images and ISIS

    1. Basics

    2. Viewing Images

  2. Processing with ISIS

    1. Basic Processing (Lev0 and Lev1)

    2. Map Projections (Lev2)

    3. Batch Processing

    4. Creating Tiffs, GeoTiffs, and other universal image formats.

  3. Bringing MOC into Arcmap (*coming soon)

  4. Sample Scripts

  5. DOWNLOAD: USGS ISIS Workshop PDF



  1. Introduction to MOC Images and ISIS

    1. Basics

      1. MOC images are available in the Planetary Data System's .img or .imq data format (.imq's are compressed .img's).

      2. MOC images can be downloaded via the PDS's website and Malin Space System's site. They are also available on Caltech's GPS unix network:

        1. /home/marsdata/mars/MOC/data/<PDS CD VOLUME>/....

            or more easily at:

        2. /home/marsdata/mars/MOC/data_links/<3 letter mission phase>/<Image Name>

      3. ISIS is a software suite created/managed by the USGS.

        1. Images/spectra are called 'cubes' with a .cub extension.

      4. ISIS formats are divided into different levels, or degrees of sophistication: lev0, lev1, lev2. Lev1 must be made from a lev0.

        1. Commonly used to work with a variety of NASA (and ESA) missions.

        2. Detailed Help for MOC-related programs

      5. To start ISIS :
        unix prompt>isis

        *Note: You may have to type 'setisis' to initiate some ISIS environment variables.

      6. Some ISIS programs can also work outside of the ISIS environment (with addition of .pl to the command), but follow the same command format:

        unix prompt> moclev0.pl image.img or ISIS> moclev0 image.img

      7. ISIS Tutor mode

        1. Sometimes it can be easiest to use ISIS in its interactive tutor mode which works for every ISIS program.

        2. Tutor mode allows you to interactively set each parameter for a program, instead of from the command line.

        3. To use it type 't' or 'tutor' before the program name:

            ISIS>t moclev0

    2. Viewing Images:

      1. Qview is ISIS's gui for opening cubes:

            unix prompt>qview <image.cub> or ISIS>qview <image.cub>

            *NOTE <image.cub> is not necessary. Can you qview's file open dialog instead.



  1. Processing with ISIS

    1. Basic Processing (Lev0 and Lev1)

      1. moclev0 is just a conversion from PDS .img's to ISIS .cub's:

          ISIS> moclev0 image.img

          --> Creates image.lev0.cub

      2. moclev1 applies radiometric corrections to the image cube (.cub)

          ISIS> moclev1 image.lev0.cub

          --> Creates image.lev1.cub

    2. Map Projections (lev2)

      1. moclev2 takes a lev1 cub and projects it into lat/lon space via various possible map projections (simple cylindrical, sinusoidal, etc)

          ISIS> moclev2 image.lev1.cub mappars=“SINU:0”

          --> Creates image.lev2.cub

      2. The MAPPARS parameter:

        1. This parameter is used to specify the desired map projection and the required parameters.

        2. For additional detailed information, tutor the mappars.pdf (i.e., TAE>t mappars ).

        3. Examples:

                  1) Sinusoidal projection with center longitude = 0

                  mappars = "SINU:0"

                  2) Polar projection with center latitude = -90 and center longitude = 0

                  mappars = "POLA:-90,0"

    3. Batch Processing

      1. Many MOC processing programs can be run on many different images at once

      2. moclev0, moclev1, moclev2 can be run using the FROMLIST= parameter. You must provide a text list of image filenames (including the full path if they are not in the current directory).

      3. Alternatively you can call moclev0_batch, moclev1_batch, moclev2_batch, instead.

        1. moclevall Will also take an image (or list via moclevall_batch) and run it through to lev2.

            ISIS> moclevall image.img mappars=“SINU:0”

    4. Creating Tiffs, GeoTiffs, and other universal image formats

      1. You can create jpegs, tiffs, geo-referenced tiffs (tiff+worldfile), and other common image formats using ISIS.

      2. Dform will convert cubes to most types of images:

        1. dform - Convert ISIS cube to different format and bit-type. This procedure will convert an ISIS cube to a different format, tif, gif, jpg, or raw. The user can change the output to 8 or 16 bit (Gif, Jpeg, and Tif require 8 bit output). The default for output bit type is 8. The user can output an ISIS cube, a common application would be to change the bit type of a 32-bit input cube. The min/max values can by specified by the user or default to the valid min/max values that are reported from the 'avg_sd' program. You can also have the program generate GIS header and/or world files. If GIS files are created and the user outputs raw or an ISIS file then the image file will be named bil or bsq.

        2. Calling Routine:

            ISIS> dform [-bit=8|16] [-c|-r|-g|-t|-j(=quality 2 - 100)] image.cub [min] [max]

  2. Bringing MOC into Arcmap (*coming soon).

  3. Sample Scripts

    1. Take a list (imq.list) of south polar images and make into projected cubes and geotiffs:

##  This program will create tif/tfw's for MOC images of the South Pole

setisis


echo 'Assuming South  Pole'

moclev0_batch.pl 'imq.list'

ls *lev0.cub > lev0.list


moclev1_batch.pl 'lev0.list'

ls *lev1.cub > lev1.list


moclev2_batch.pl 'lev1.list' 'POLA:-90.0,0.0'

ls *.lev2.cub > lev2.list

awk '{ print "dform.pl -t -bit=8 -gis=yes " $0}' lev2.list > dform.tmp
source dform.tmp

echo 'Reducing tifs'

ls -1 *.tif | sed 's/.tif//g' | awk '{print "tifftopnm " $0".tif |  pnmtotiff -packbits > " $0 ".compressed.tif"}' > command.csh

ls -1 *.tif | sed 's/.tif//g' | awk '{print "mv -f " $0 ".compressed.tif " $0 ".tif" }' >> command.csh

chmod 744 command.csh
./command.csh

rm *.tmp -f
rm lev*.list -f
rm command.csh -f

rm *.cmd -f

    1. Take a list (imq.list) of equatorial Mars images and make into projected cubes and geotiffs:

##  This program will create tif/tfw's for MOC images equatorial region 
##  in Simple Cylindrical projection

setisis

moclevall_batch.pl -delete=yes 'imq.list' 'SIMP:180,OCENTRIC'

ls *.lev2.cub > lev2.list

awk '{ print "dform.pl -t -bit=8 -gis=yes " $0}' lev2.list > dform.tmp
source dform.tmp

echo 'Reducing tifs'

ls -1 *.tif | sed 's/.tif//g' | awk '{print "tifftopnm " $0".tif |  pnmtotiff -packbits > " $0 ".compressed.tif"}' > command.csh

ls -1 *.tif | sed 's/.tif//g' | awk '{print "mv " $0 ".compressed.tif " $0 ".tif" }' >> command.csh

chmod 744 command.csh
./command.csh

rm *.tmp -f
rm lev*.list -f
rm command.csh -f