Guide to Reducing MOC Narrow-Angle
Data using ISIS (2.1.x)

Table of Contents
![]()
Introduction to MOC Images and ISIS
MOC images are available in the Planetary Data System's .img or .imq data format (.imq's are compressed .img's).
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:
/home/marsdata/mars/MOC/data/<PDS CD VOLUME>/....
or more easily at:
/home/marsdata/mars/MOC/data_links/<3 letter mission phase>/<Image Name>
ISIS is a software suite created/managed by the USGS.
Images/spectra are called 'cubes' with a .cub extension.
ISIS formats are divided into different levels, or degrees of sophistication: lev0, lev1, lev2. Lev1 must be made from a lev0.
Commonly used to work with a variety of NASA (and ESA) missions.
To start
ISIS :
unix prompt>isis
*Note: You may have to type 'setisis' to initiate some ISIS environment variables.
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
ISIS Tutor mode
Sometimes it can be easiest to use ISIS in its interactive tutor mode which works for every ISIS program.
Tutor mode allows you to interactively set each parameter for a program, instead of from the command line.
To use it type 't' or 'tutor' before the program name:
ISIS>t moclev0
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.
![]()
Processing with ISIS
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
The MAPPARS parameter:
This parameter is used to specify the desired map projection and the required parameters.
For additional detailed information, tutor the mappars.pdf (i.e., TAE>t mappars ).
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"
Many MOC processing programs can be run on many different images at once
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).
Alternatively you can call moclev0_batch, moclev1_batch, moclev2_batch, instead.
moclevall Will also take an image (or list via moclevall_batch) and run it through to lev2.
ISIS> moclevall image.img mappars=“SINU:0”
Creating Tiffs, GeoTiffs, and other universal image formats
You can create jpegs, tiffs, geo-referenced tiffs (tiff+worldfile), and other common image formats using ISIS.
Dform will convert cubes to most types of images:
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.
Calling Routine:
ISIS> dform [-bit=8|16] [-c|-r|-g|-t|-j(=quality 2 - 100)] image.cub [min] [max]
![]()
Bringing MOC into Arcmap (*coming soon).
![]()
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
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