ISIS 2 Documentation

Isis Viking Image Processing using Pre ISIS Level Software



The Viking Orbiter Data Processing sequence is designed to create clean, radiometrically corrected, photometrically normalized mosaics with the Viking Orbiter digital data using the USGS/ISIS software. The sequence starts with accessing the raw digital data (i.e., the Viking Experiment Data Records, or EDRs) via the Internet or from the NASA Mission to Mars CDROM volumes. In the current version of ISIS, all programs run under UNIX, within TAE, except "tvtie" which runs in IDL.

Before processing begins, the user must first determine the image coverage in the area of interest. The images selected must be visually inspected for data quality (e.g., cloudy, grainy, saturated, etc.) to determine whether or not they are acceptable to use. It is recommended to have a rough layout of image placement (how and where the images overlap), this allows the user to eliminate redundant image coverage. The first data processing step (cartographically referred to as Level0 processing) involves transferring the raw images to a work disk. They can be downloaded via the Internet from PDSIMAGE (see below) or read in directly from the Viking Orbiter CDROM Volumes VO_1001 through VO_1064, as follows (note that data ranges describe revolution numbers):

Mission to Mars: Images of Mars (Experiment Data Records)

    vo_1001 - images in the range 122S01 - 166S24
    vo_1002 - images in the range 167S01 - 210S42
    vo_1003 - images in the range 149S16 - 251S30
    vo_1004 - images in the range 252S01 - 321S72
    vo_1005 - images in the range 152S11 - 363S56
    vo_1006 - images in the range 365S01 - 405S30
    vo_1007 - images in the range 406S11 - 436S36 (No Data on this CD)
    vo_1008 - images in the range 437S01 - 467S36
    vo_1009 - images in the range 286C01 - 485S24
    vo_1010 - images in the range 003A01 - 038A32
    vo_1011 - images in the range 039A01 - 070A32
    vo_1012 - images in the range 071A01 - 105A48
    vo_1013 - images in the range 106A01 - 212A64
    vo_1014 - images in the range 214A01 - 272A36
    vo_1015 - images in the range 273A01 - 322A40
    vo_1016 - images in the range 326A01 - 372A50
    vo_1017 - images in the range 373A01 - 414A40
    vo_1018 - images in the range 416A01 - 443A10
    vo_1019 - images in the range 444A01 - 472A60
    vo_1020 - images in the range 474A07 - 527A10
    vo_1021 - images in the range 529A01 - 572A36
    vo_1022 - images in the range 573A01 - 605A96
    vo_1023 - images in the range 606A01 - 634A48
    vo_1024 - images in the range 635A01 - 663A86
    vo_1025 - images in the range 664A01 - 693A48
    vo_1026 - images in the range 694A01 - 718A60
    vo_1027 - images in the range 719A01 - 743A66
    vo_1028 - images in the range 744A41 - 771X00
    vo_1029 - images in the range 772A01 - 825A52
    vo_1030 - images in the range 826A01 - 888A16
    vo_1031 - images in the range 890A01 - 919A62
    vo_1032 - images in the range 920A06 - 980A10
    vo_1051 - images in the range 004Y01 - 048B53
    vo_1052 - images in the range 049B01 - 077B95
    vo_1053 - images in the range 078B11 - 140B54
    vo_1054 - images in the range 141B01 - 187B52
    vo_1055 - images in the range 188B01 - 262B75
    vo_1056 - images in the range 264B01 - 308B90
    vo_1057 - images in the range 310B31 - 355B60
    vo_1058 - images in the range 356B01 - 392B20
    vo_1059 - images in the range 393B01 - 434B14
    vo_1060 - images in the range 437B01 - 497B96
    vo_1061 - images in the range 499B01 - 544B16
    vo_1062 - images in the range 545B01 - 576B60
    vo_1063 - images in the range 577B01 - 703B72
    vo_1064 - images in the range 704B01 - 705B52

The next processing step (Level1) involves using a series of ISIS programs designed to update the camera pointing information, find and remove reseau marks, remove random and systematic noise, and radiometrically correct the images. At least 4 images that fall on the outside corners of a quadrangle must be selected to be geometrically controlled to a base mosaic or MDIM (Mars Digital Image Mosaic). This geometric control is established by creating undistorted base images with the same pointing information as the selected level1 image. Matchpoints are picked between the base image and the level1 image, and the pointing is updated holding the base image. After updating their camera angles, these images become 'truth' for the remaining images of the mosaic. Matchpoints are then selected interactively between all overlapping images. These points are used to adjust the camera angles of all the images relative to the 'truth' images.

In Level2 processing, the images are projected to a Sinusoidal Equal-Area or Orthographic projection with the same map scale and center longitude defined. The next step (Level3) is to apply a photometric correction or simulate the correction by applying a high pass filter and a low pass filter to the projected images. In Level4 processing, these images are then mosaicked together to generate a tone-matched mosaic. To show the layout of each image in the mosaic (Level5), a cutline plot is generated, in which each image in the mosaic is assigned a different density value and a border is drawn around each image boundary.

Processing Sequence

For each level of processing, the following programs must be run:

  1. Sort through the Viking Orbiter database using user defined constraints to identify images that are available in the area of interest using "sedrsort". The user must define a combination of parameters: latitude range, longitude range, resolution of images, etc. (within TAE type "t sedrsort" to tutor the program for help on all parameter options that are available). If the TO parameter is not specified, the selected image numbers will only go to the default output print file (print.prt) or log file that is automatically generated by the application. See ISIS user help to reassign print.prt to a different filename. Otherwise, they will also go to an ascii file as a single column list.

    Example on how to get help on individual programs, tutor the program and type help*

      tae>t sedrsort
      tae>help list

    A window will pop up showing the parameter names, "sedrsort" has a parameter "list", to get information about this parameter type "help list". After reading the information type "ex" to return to the main window.

      tae>sedrsort to=mars.lis res=(0,.116) lat=(10,15) +
        lon=(-15,-10) target=MARS mission=VIKING_ORBITER   

    The next example runs the program four times so there are four separate output lists for the different Mission and Camera Id.

      tae>sedrsort to=mars_1a.lis res=(0,.116) lat=(10,15) +
        lon=(-15,-10) target=MARS mission=VIKING_ORBITER_1 +
      tae>sedrsort to=mars_1b.lis res=(0,.116) lat=(10,15) +
        lon=(-15,-10) target=MARS mission=VIKING_ORBITER_1 +
      tae>sedrsort to=mars_2a.lis res=(0,.116) lat=(10,15) +
        lon=(-15,-10) target=MARS mission=VIKING_ORBITER_2 +
      tae>sedrsort to=mars_1b.lis res=(0,.116) lat=(10,15) +
        lon=(-15,-10) target=MARS mission=VIKING_ORBITER_2 +


  2. Transfer the raw images onto a work disk by downloading the images from the PDS Imaging Node or by reading them directly from CDROM. The volume numbers containing the set of revolution numbers was listed previously. To download from PDS, log in as an anonymous user onto, and find the volume names located in the /cdroms directory.
      for example:
        >Name: anonymous
        >Password:email address
        >cd /cdroms
        >cd vo_1018
        >cd f431axx
        >get f431a56.imq
        load CDROM vo_1018 into CD drive
        >cp /cdrom/f431axx/f431a56.imq .

  3. Convert the raw files to ISIS format using "cd2isis". Below is an example of image number 431a56 which was downloaded from vo_1018 CDROM, and the filename is f431a56.imq.
      for example:
        tae>cd2isis from=f431a56.imq to=431a56.cub

  4. Visually inspect the selected images to determine image quality, and reject images that are too noisy, too grainy, or has too much cloud cover. Use "qview" to view the images after they have been converted to ISIS format. After displaying the first image, the browse option can be used to quickly view each image. After clicking on the browse button, the file selection menu will appear, select the next file and click okay or double click on the filename. Continue working down the list of filenames until all images are viewed.
      for example:
        tae>qview 431a56.cub


  5. For the LEVEL1 sequence, the images are processed through a series of programs that will update the camera pointing information, find and remove reseau marks, remove random noise appearing on the images, and radiometrically correct the images. The program "vlev1" runs through the following programs:
      spicelab - updates the camera pointing information with
        the predicted values from JPL or ext=gem.
      findrx - find and store reseau locations on the image
      remrx - remove the reseau marks by assigning these pixel
        locations to 'null' and then applying a low pass filter
        to replace these pixel with an average of surrounding 
        valid pixels.  An alternative option is to apply a 
        bilinear interpolation algorithm.
      boxfilter - the 'salt and pepper' type noise are removed
        by applying a series of standard deviation filters to
        the image depending on the amount of noise
      vikcal - radiometrically calibrates the image

    for example:

        tae>vlev1 from=431a56.cub to=431a56l1.cub

    Note* (notice the recommended l1 filename convention)

  6. Recover camera angles that have already been adjusted to the MDIM, by running "spicelab" specifying ext=rmb. The rmb spice file contains the image product_id's and their updated camera angles. This file was generated and updated as local processors generated mosaics using Viking Orbiter data. As a result, the rmb spice file is an incomplete set. The program "vlev1" will terminate if the PRODUCT_ID is 'not found' in the rmb spice file if the parameter vflag="no". If vflag="yes" the program will automatically update the camera angles using the gem spice file if no record is found in the rmb spice files. The gem spice file is complete, but the camera pointing information are the mission predicted values. If the camera angles are updated with no errors using the rmb spice files, this means the image was controlled previously and the camera angles don't need to be updated. Save this portion of the print file to refer to later in the processing.
      for example:
        tae>spicelab to=431a56l1 ext=rmb

  7. To remove the systematic electronic noise run "slosin". Display the LEVEL1 file using "qview" to visually select where the noise patterns are in the image. The starting line and ending line must be defined for each noise pattern. The filt parameter is used to estimate the number of samples between crests, calculate this value by looking at the sample locations between the darkest part of the diagonal line patterns. Make sure the sample location is obtained along the same line when calculating the value for FILT parameter. After running "slosin", the images may still need additional doctoring of bad pixels; this can be done using "qview"'s MD option. It is best to make a backup copy of the file because "qview" doesn't undo any of the editing that's done.
    The values listed below for STAL, ENDL and WAVE parameters in
    "slosin" are used a majority of the time for the different
    spacecraft, and camera id.  SLOSIN works better if you use the
    default value for wave.
    Viking Orbiter 1 - Camera A (odd),Camera B (even)
      revAodd  (e.g., 421A01) stal=(26,940) endl=(50,1020)
      revAeven (e.g., 421A02) stal=(26,940) endl=(50,995)
      revSodd  (e.g., 079S01) stal=26 endl=100 wave=93
      revSeven (e.g., 079S02) stal=(26,940) endl=(95,995)
    Viking Orbiter 2 - Camera A (odd), Camera B (even)
      revBodd  (e.g., 199B01) stal=26 endl=200 wave=127
      revBeven (e.g., 199B02) stal=(26,940) endl=(400,1020)

    for example (single noise pattern):

      tae>slosin from=431a56l1.cub to=431a56l1s.cub stal=26 endl=50 +

    (two noise pattern one at top and one at bottom part of image)

      tae>slosin from=431a56l1.cub to=431a56l1s.cub stal=(26,940) +
        endl=(50,995) filt=101

    There are three methods of processing to select from after the images have gone through Level1 processing. (1.) An uncontrolled mosaic can be generated by projecting the images without updating camera angles, and mosaicking them together. The result will have misregistration. (2.) A controlled mosaic can be generated if all images processed were found in the 'rmb' spice file. The camera angles have already been adjusted, requiring no new camera angle updates with "jigsaw". The last options 3a and 3b require using "tvtie" which is an IDL program. (3a.) If only a subset of the images are found in the rmb spice file, matchpoints must be selected for all overlapping pairs of images, and camera angles updated with "jigsaw". (3b.) If none of the images were found in the rmb spice file and you want to generate a controlled mosaic, then you would need select at least 4 level1 images that would be matched to a base image (MDIM quadrangles). The camera angles would need to be updated first by runnin "jigsaw" between these images first. The MDIM quads are listed in Appendix 1, select one that has the closet latitude and longitude range to your area of interest. Then pick matchpoints for remaining overlapping pairs of images. This can be done by running "tvtie" in IDL, there is additional information in the file $ISISIDL/tvtie.hlp on how to use this program. The matchpoints are always stored on the labels of the first image listed, and both images displayed must be unprojected images. After selecting matchpoints between all overlapping images, the camera angles are updated by running "jigsaw" holding the level1 images that were tied to the base mosaic.

  8. Look at the session log file generated after running "spicelab" (step 7) and search for the message "no record found". If none of the images were found in the rmb spice file, then you must create undistorted base images of at least four images using the MDIM mosaic as your input into BASE2L1 program. Then matchpoints between all overlapping images must be selected. Make sure you change the value of falsen parameter for each BASE2L1 run. This assigns a unique image number id to each base image which is used later in JIGSAW to update the camera pointing. Prepare the 4 level1 images selected to be tied to a base mosaic by running the following:
      For example 044b16 and 044b42 fall closest to mi05n137.img on
      Volume vo_2003.
      tae> pds2isis from=mi05n137.img to=mi05n137.cub
      tae> base2l1 from=mi05n137.cub level1=044b16l1s.cub +
        falsen=4416 tf=tfile.dat
      tae> geom from=mi05n137.cub to=base_044b16.cub tf=tfile.dat
      tae> base2l1 from=mi05n137.cub level1=044b42l1s.cub +
        falsen=44b42 tf=tfile.dat
      tae> geom from=mi05n137.cub to=base_044b42.cub tf=tfile.dat
      tae> exit
  9. To tie the base image to the level1 image run TVTIE in idl.
      idl> tvtie,/match,'base_044b16.cub','044b16l1s.cub'
      idl> tvtie,/match,'base_044b42.cub','044b42l1s.cub'
    After selecting the match points run "jigsaw" in TAE to update the camera pointing of the level1 images relative to the base images.
      tae>jigsaw from=(044b16l1s.cub,base_044b16.cub) +
      tae>  hold=base_044b16.cub opt=2 tol=16  
      tae>jigsaw from=(044b42l1s.cub,base_044b42.cub) +
      tae>  hold=base_044b42.cub opt=2 tol=16  
    After running JIGSAW on all 4 images selected to be controlled to a base mosaic, pick matchpoints between remaining overlapping level1 images. From this point on the 4 images will be considered truth images and will all need to be entered as hold images in any JIGSAW run.

    The matchpoint selection between pairs of overlapping images is done by running tvtie/match,'file1,'file2' or wmatch (interactive file selection) in idl. After displaying the two images, select a point number, move the cursor to a feature on the first image, click middle button to zoom in on feature, use the left button to select a point on a feature, then move cursor to the right image and select the same feature by clicking the left button. When you are satisfied with the points selected, click the save button. The point number, line and sample number of each point, and the image_number of the second image will be recorded in the label section of the first image. It is best to pick at least 3 matchpoints for each pair. Avoid selecting points in the corners which cause larger errors due to camera distortion.

        a. exit tae 
        b. idl (type "idl" at command line outside TAE)
        c.  idl>tvtie,/match,'level1_file1','level1_file2' 
  10. After all the matchpoint selections are done, update the camera angles with "jigsaw". The input list should contain filenames of all the level1 images that were matched. If any images were controlled to a base mosaic, these would need to be entered as hold images in a list containing their filenames for the 'holdlist' parameter or enter each filename in the 'hold' parameter. Use option=2 to allow rotation, and 'tol' parameter to change the error tolerance, the default is 16 pixels for Viking data. If node=y the camera angles of any image found in the rmb spice file is not updated. If node=n then all camera angles are updated except the ones listed as hold images.

    Examples of various options:

      tae>jigsaw from=(file1,file2) hold=file2 tol=16 +
        opt=2 node=y
      tae>jigsaw fromlist=l1s.lis holdlist=hold.lis tol=10 +
        opt=2 node=y
      tae>jigsaw fromlist=l1s.lis node=y
      tae>jigsaw fromlist=l1s.lis holdlist=hold.lis node=y
      tae>jigsaw fromlist=l1s.lis hold=file2 tol=20 node=y

    After updating the camera angles use "hidim" to generate a TAE pdf to process the entire set of images through a series of programs and mosaic them together. This procedure uses "boxfilter" and "mosaic" to create 32 bit tone-matched mosaics. The following output files are created automatically: mos51.cub, mos251.cub, mos4.cub, moscut.cub, tran4.cub and trancut.cub. "hidim" has the flexibility to generate pdfs containing only the levels you are interested in.

  11. "hidim" will run the following programs to process your set of images:
      level2 - project to sinusoidal or orthographic projection
          projflag = tran (creates sinusoidal and transverse mercator
          projflag = pola (creates orthographic and polar
              stereographic mosaics)
      hilev3a - boxfilter level2 images
      hilev3b - mosaic filtered images 
      hicut - stretch each of the filtered images to a single dn 
        value and mosaic them together to create a plot showing 
        the boundaries of all images mosaicked
      hilev4 - add the two filtered mosaics together to generate
        the final mosaic in sinusoidal projection
      TRAN or POLA selected based on projflag parameter defined
        by user.
      tran - reprojects the mosaic to transverse mercator 
        projection, this is the final mosaic used as base maps 
        for the Mars Geologic Mapping program. 
      pola - reprojects the mosaic to polar stereographic 
        projection, this is the final mosaic used as base maps 
        for the Mars Geologic Mapping program. 

    "hidim" will reproject the images to a sinusoidal or orthographic projection, based on the projflag parameter defined by the user. Then, a 251x251 and 51x51 high pass filter is applied to the projected images. The 251x251 high pass filtered images and the 51x51 high pass filtered images are mosaicked into two separate output mosaics (mos251.cub and mos51.cub). One of the filtered image will also be stretched so that all the valid density values are set to one density number, then mosaicked into a third output mosaic (moscut.cub). The next step is to apply a 251x251 low pass filter to the 51x51 hpf filter mosaic, and add the low pass filtered file to the 251x251 high pass filter mosaic to create a tone matched mosaic (mos4.cub). If MTMQUAD is set to "YES", mos4.cub is trimmed down to the exact boundaries needed for the Mars 1:500k mapping project. Based on the user input for "projflag", the files mos4.cub and moscut.cub are converted to a transverse mercator (tran4.cub and trancut.cub) or a polar stereographic projection (pola4.cub and polacut.cub). A 1024 pixel/degree mosaic at 32 bit would require approximately 108mb for each mosaic. There is an option in "hidim" to select subquad=y, which will allocate space based on the latitude and longitude ranges of images listed in the input list. The intermediate files are deleted only if you set del=y, it is recommended that all intermediate files get deleted to save disk space.

    For sinu projections
      for example:
        tae>hidim from=l1s.lis to=mtmtest.pdf level=all +
          quad=-10022 init=y final=y work=/work9/scratch del=y
    For the polar areas use PROFLAG=pola to save on disk space. The parameters clat and clon must both be specified in HIDIM.

Appendix 1: Other Mars data CDROMS available

Mission to Mars: Digitial Image Maps

vo_2001 - Vastitas Borealis Region (north pole southward to
  lat 42.5 N)
vo_2002 - Xanthe Terra (lat 52.5 N to 52.5 S, long 355 W
  to 95 W)
vo_2003 - Amazonis Planitia Region (lat 52.5 N to 52.5 S,
  lon 85 W to 185W)
vo_2004 - Elysium Planitia Region (lat 52.5 N to 52.5 S,
  lon 175 W to 275 W)
vo_2005 - Arabia Terra (lat 52.5 N to 52.5 S, long 265 W
  to 5 W)
vo_2006 - Planum Australe Region (south pole northward to
  lat 42.5 S)

Mission to Mars: Digital Topographic Maps

vo_2007 - Global Topography

Mission to Mars: Digital Color Mosaics

vo_2008 - Vastitas Borealis Region (north pole southward to
  lat 37.5 N)
vo_2009 - Xanthe Terra (lat 37.5 N to 52.5 S, long 0 W
  to 90 W)
vo_2010 - Amazonis Planitia Region (lat 37.5 N to 52.5 S,
  lon 90 W to 180 W)
vo_2011 - Elysium Planitia Region (lat 37.5 N to 52.5 S,
  lon 180 W to 270 W)
vo_2012 - Arabia Terra (lat 37.5 N to 52.5 S, lon 270 W
  to 360 W) 
vo_2013 - Planum Australe Region (south pole northward to
  lat 52.5 S)

Appendix 2: Viking Orbiter processing in ISIS

The following is a list of individual programs needed to process Viking Orbiter data. These are the processing procedures we follow, you may be interested in only portions of the processing sequence.

  1. Convert PDS formatted files to ISIS format:
        tae>cd2isis from=f009b19.imq to=009b19.cub
  2. Update camera angles:
        tae>spicelab to=009b19.cub ext=gem
  3. Find and store reseau locations on the image labels:
        tae>findrx from=009b19.cub
  4. Remove the "salt and pepper" noise from the image. Select low or high noise depending on the amount of salt and pepper noise on the image.

    If (Noise is high) run the following

      tae>boxfilter FROM=009b19.cub TO=f1 FILT=STDZ +
      tae>LINE=9 SAMP=9 TOLMIN=8 STDH=1.5 MIN=9 band=1
      tae>boxfilter FRO=f1 TO=f2 FILT=STD LINE=3 SAMP=3 +
      tae>TOLMIN=5 STDH=1.5 STDL=1.0 MIN=3 band=1
      tae>ush /bin/rm f1.cub
      tae>boxfilter FROM=f2 TO=009b19f.cub FILT=STD +
      tae>LINE=5 SAMP=5 TOLMIN=5 STDH=1.5 STDL=1.0 MIN=5 band=1
      tae>ush /bin/rm f2.cub

    IF (Noise is low) run the following:

      tae>boxfilter FRO=009b19.cub TO=f1 FILT=STDZ +
      tae>LINE=9 SAMP=9 TOLMIN=8 STDH=2.0 MIN=9 band=1
      tae>boxfilter FRO=f1 TO=009b19f.cub FILT=STD +
      tae>LINE=3 SAMP=3 TOLMIN=8 STDH=1.5 MIN=3 band=1
      tae>ush /bin/rm f1.cub

  5. Remove the reseau marks via two options: (1) interpolate, and (2) to null pixels then replace with averages of surrounding pixel values. The null option has worked better for us.

    (ACTION = "NULL")

      tae>remrx FROM=009b19f TO=rfil LDIM=7 SDIM=5 ACTION=NULL
      tae>boxfilter from=rfil to=lpfz1 line=3 samp=3 +
      tae>filt=lpfz band=1
      tae>boxfilter from=lpfz1 to=lpfz2 line=3 samp=3 +
      tae>filt=lpfz band=1
      tae>boxfilter from=lpfz2 to=009b19r line=5 samp=5 +
      tae>filt=lpfz band=1
      tae>ush /bin/rm filt.cub
      tae>ush /bin/rm lpfz*.cub
      tae>ush /bin/rm rfil.cub


      tae>remrx FROM=009b19f TO=009b19r LDIM=7 SDIM=5 ACTION=BIL

  6. Calibrate the image file:
      tae>vikcal FROM=009b19r TO=009b19l1 SAT_FLAG=no

  7. Remove the systematic electronic noise patterns from the images. You may need to do additional editing of pixels interactively using QVIEW.
      tae>slosin from=009b19l1 to=009b19l1s stal=startingline +
      tae>endl=endingline stas=startingsample ends=endingsample

  8. Update camera angles:
        tae>spicelab from=009b19l1s.cub ext=rmb
    • if an error message stating "no record found" is returned, it means that the image has never been processed before and the camera angles used are predicted values. If the image is found in the rmb spice file, the camera angles don't need to be updated with "jigsaw". If all the images are found in the rmb file, then you can generate a controlled mosaic without having to select match points between images. If any image returned "no record found", these will need match points selected interactively using "tvtie,/match" in IDL, and the camera angles updated with "jigsaw".

  9. Select matchpoints in IDL, the points are always stored in the labels of the first image listed.
  10. Update the camera angles of the images selected.
      tae>jigsaw from=(009b20l1s,009b19l1s) node=y +
        hold=009b19l1s opt=2
  11. Project the cleaned up image to sinusoidal-equal area projection. All images to be mosaicked together must have the same center longitude and resolution (KM or DEG)
      For sinusoidal projected output files:
      tae>level2 from=009b19l1s to=009b19l2 deg=1024 clon=180 +
      For orthograhic projected output files:
      tae>level2 from=009b19l1s to=009b19l2 deg=1024 clon=0 +
      tae>clat=-90 projflag=pola

  12. Mosaic projected images together.
      tae> mosaic from=009b19l2 to=mos.cub in=y lat=(10,15) +
      tae> mosaic from=009b20l2 to=mos.cub in=n

Documentation | Tutorials | Technical Documents | Isis Support Center (URL: | Home

Last updated: Feb 17 2006