Skip to content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

HiRISE Anaglyphs

Not recommended for polar regions

This anaglyph procedure is recommended for lower-latitude coverage. Polar region stereo coverage is more complex and has not been streamlined yet.

Preparation - SPICE

Overview

  • Select two stereo observations
  • Use RED0-9
  • Begin with calibrated images
  • Geometric control is an option (ccd-to-ccd)
  • Run spiceinit on all RED CCD’s0-9 for both observations
    • Default to system shape model
    • Kernels Group with loaded SPICE keywords
Kernels Group
Group = Kernels 
  NaifIkCode = -74699
  LeapSecond = $base/kernels/lsk/naif0008.tls  
  TargetAttitudeShape = $base/kernels/pck/pck00008.tpc
  TargetPosition = Table 
  InstrumentPointing = Table
  Instrument = Null 
  SpacecraftClock = $mro/kernels/sclk/MRO_SCLKSCET.00021.65536.tsc
  InstrumentPosition = Table 
  Frame = $mro/kernels/fk/mro_v08.tf
  InstrumentAddendum = $mro/kernels/iak/hiriseAddendum003.ti 
  ShapeModel = $base/dems/molaMarsPlanetaryRadius0001.cub
End_Group

Run spicefit on all Red CCD’s 0-9 for both image observations

Fit cube to InstrumentPointing parameters with spicefit

Do this for each image in the observation.

spicefit from=psp_red0.cub

Map Template

Make map templates and compare

Create a map template from both observations and compare. The input is a list of the images in each observation.

maptemplate fromlist=img1_0-9.lis map=img1.map proj=EQUIRECTANGULAR clat=0.0 clon=0.0 rngopt=CALC resop=CALC 
maptemplate fromlist=img2_0-9.lis map=img2.map proj=EQUIRECTANGULAR clat=0.0 clon=0.0 rngopt=CALC resop=CALC 

Evaluate the information within img1.map and img2.map.

Figure out the map values that will satisfy the coverage of both observations.

  • latitude range, longitude range
  • center latitude, center longitude
  • average pixel resolution

Local Radius

Find the local radius values with campt and getkey

The default system shape model will be referenced (spiceinit).

Specify the center of each observation (Number of Lines / 2),
and get the local radius there:

campt from=psp_red5_img1.cub samp=1 line=(nlines/2) to=red5_pt1.dat 
getkey from=red5_pt1.dat grpnname=GroundPointkeyword=LocalRadius 

campt from=psp_red5_img2.cub samp=1 line=(nlines/2) to=red5_pt2.dat  
getkey from=red5_pt2.dat grpname=GroundPointkeyword=LocalRadius 

Calculate an average local radius and store it in NAIF format

  1. Calculate the average “local radius” value from the values found with campt
  2. Convert the average value from meters to kilometers
  3. Build a NAIF-format text file with the average local radius (km)
  4. *LocalRad3391.97.tpc contents
    \begindata 
    BODY499_RADII       = ( 3391.97   3391.97 3391.97)
    

Modify Labels

Edit labels with editlab

Do this for all RED0-9 images, in both observations.

  1. Remove ShapeModel reference from labels

    editlab from=psp_red0_img1.cub options=modkeygrpname=Kernels keyword=ShapeModel value=Null 
    

  2. Add the "new" NAIF .tpcfile with the local radius to the Kernels group

    editlab from=psp_red0_img1.cub options=modkeygrpname=Kernels keyword=Instrument keyvalue= LocalRad3391.97.tpc 
    

We are temporarily using an 'unused' keyword (Instrument) for the local radius .tpcfile; this keyword follows the main TargetAttitudeShape keyword which MUST retain reference to the original NAIF .tpcfile (we are mimicking a ‘search’ list for radius value).

Kernels Group with modified keywords
Group = Kernels
  NaifIkCode = -74699 
  LeapSecond = $base/kernels/lsk/naif0008.tls
  TargetAttitudeShape = $base/kernels/pck/pck00008.tpc  
  TargetPosition = Table
  InstrumentPointing = Table  
  Instrument          = LocalRad3386.70.tpc
  SpacecraftClock = $mro/kernels/sclk/MRO_SCLKSCET.00021.65536.tsc 
  InstrumentPosition = Table
  Frame               = $mro/kernels/fk/mro_v08.tf 
  InstrumentAddendum = $mro/kernels/iak/hiriseAddendum003.ti
  ShapeModel = Null 
End_Group

Gallery - Local Radius and Stereo Information
  • Hirise_local_radius_both_high_and_low.png
    Local Radius retains both high and low frequency stereo data

  • Local_Radius_bad_example.png
    The mapping results for left/right views are too far apart. Example of bad local radius.

  • Hirise_stereo_information_removed.png
    All stereo information removed

  • Hirise_low_freq_removed_gentle_slopes.png
    Low frequency stereo information is removed; (e.g., gentle slopes across the scene)

Map Projection

Map Template

equi.map

Build a Map Template for cam2map. Specify the Ellipsoid values for Mars Contents:

:::::::::::::: 
equi.map
:::::::::::::: 
Group = Mapping
  ProjectionName = Equirectangular 
  CenterLongitude = 353.18
  CenterLatitude = 8.06 
  TargetName = mars
  EquatorialRadius = 3396190.0 <meters> 
  PolarRadius = 3376200.0 <meters>
  LatitudeType = Planetocentric 
  LongitudeDirection = PositiveEast
  LongitudeDomain = 360 
  PixelResolution = 0.28 <meters/pixel>
End_Group 
End

Map Projection

Map Project all images in both observations with cam2map

Run cam2map on both observations, all RED0-9 images.

cam2map from=psp_red0_img1.cub map=equi.mapto=psp_red0_eq.cub pixres=map defaultrange=camera 

OR Use the -batchlist option

cam2map –batchlist=all_reds.lis from=\$1.balance.cub to=\$1.eq.cub pixres=map defaultrange=camera 
  • all_reds.lis should not include file extensions
  • Let cam2map figure out the lat/lon boundaries of each individual CCD

Mosaics

Create Two RED[0-9] Mosaics

Mosaic with automos

  1. Create a list of cam2map output files for each observation
  2. Mosaic the projected Red CCDs;
    Specify the same latitude/longitude boundaries for the output mosaics:
    automos fromlist=img1_eq.lis mosaic=img1_RedMos.cub grange=user minlat=  maxlat=  minlon=  maxlon= 
    automos fromlist=img2_eq.lis mosaic=img2_RedMos.cub grange=user minlat=  maxlat=  minlon=  maxlon=
    

Determine the 'Left Look'

  1. Get the SubSpacecraft Longitudes from the campt output files from earlier.

    getkey from=red5_pt1.dat grpnname=GroundPointkeyword=SubSpacecraftLongitude 
    getkey from=red5_pt2.dat grpnname=GroundPointkeyword=SubSpacecraftLongitude 
    

  2. The observation with the furthest west SubspacecraftLongitude is the "Left Look."
    (subspc1 < subspc2) or (subspc2 < subspc1)

Assumptions

  • Observation pair has a longitude range within 0 –360 longitude
  • LongitudeDomain = 360
  • Neither image pair crosses the 0 and/or the 360 longitude boundary
  • cam2map defaults to reassigning the LongitudeDomain if the image crosses a 0/360/180 boundary

Stack Left/Right Observations

Stack with cubeit

  1. Create a list of input cubes

    ls left_redmos_img.cub > c.lis
    ls right_redmos_img.cub >> c.lis 
    

  2. Stack Cubes

    cubeit list=c.lis to=anag.cub
    

  3. Display anag.cub with qview

    Band1 = Red
    Band2 = Green 
    Band2 = Blue