project crism index

From DavinciWiki
Jump to: navigation, search

Description

Project and colorize/overlay a CRISM product using gdal from control points in the DDR image.

NOTE: requires gdalwarp and gdal_translate >1.5.1, specified by $DV_GDAL_PATH

e.g. add putenv("DV_GDAL_PATH","/usr/bin/" to ~/.dvrc or library*.dvrc

Arguments and Return Values

Inputs: the index, processed data, ddr OR standard CRISM structure from process_crism() with the indexes created

Outputs: a projected, colorized CRISM index image

Usage

Syntax: project_crism_index (index_image, data, ddr [,proj=STRING][,planet=BOOL][,index=INT][,colors=INT][,ignore=VAL][,stretch=STRING][,variance=VAL][,in_low=VAL][,in_high=VAL])

OR

project_crism_index (struct=STRUCT [,proj=STRING][,planet=BOOL][,index=INT][,colors=INT][,ignore=VAL][,stretch=STRING][,variance=VAL][,in_low=VAL][,in_high=VAL])


REQUIRED:

index_image - the index created by create_indices()

ddr - the specific ddr lat/lon bands

data - 1 or 3 band byte fully processed CRISM data

OR

struct - the complete structure from process_crism()


OPTIONS:

proj - projection type, "simp" or "sinu", default is "simp"

planet - use the Mars ellipsoid reference (Default is 1)

index - use if more than one index is supplied (Default is 1) e.g. index=5 is the 5th index in the index array in the z direction

colors - color options from colorize() (Default is 5)

ignore - ignore value of the image (Default is 0)

stretch - type of stretch to perform on the data "sstretch" (default) or "lstretch"

variance - variance setting for "sstretch" option (default is 40)

in_low - low data value input for "lstretch" option (default is min data)

in_high - high data value input for "lstretch" option (default is max data)

Examples

dv>out=process_crism("000035B5_07")
struct, 1 elements
   long: struct, 7 elements
       anc: struct, 5 elements...
       wl_array: 1x1x438 array of double, bil format [3,504 bytes]
       at_array: 320x1x438 array of float, bil format [560,640 bytes]
       id: ""HRS000035B5_07_IF174L_TRR2.IMG""
       data: 320x225x438 array of float, bsq format [126,144,000 bytes]
       index: 320x225x16 array of double, bsq format [9,216,000 bytes]
       index_key: Text Buffer with 16 lines of text
           1: Olivine Index
           2: LCP Index
           3: HCP Index
           4: Ferric Coating
           5: BD2290 MG, Fe-OH Minerals
           6: D2300 Hydrates Minerals - Particularily Phyllosilicates
           7: BD2210 AL-OH Minerals
           8: BD1900 H20 - Alternate from CAT code
           9: SINDEX Water Containing Minerals
           10: BD2100 Monohydrated Sulfates

dv> LCP_proj_color=project_crism_index(struct=out,index=2) 
0...10...20...30...40...50...60...70...80...90...100 - done.
0...10...20...30...40...50...60...70...80...90...100 - done.
0...10...20...30...40...50...60...70...80...90...100 - done.
.01340x269x3 array of byte, bsq format [274,380 bytes]

Images

crism LCP index.pngcrism LCP index color proj.png

Left - un-projected CRISM index image, Right - projected colorized CRISM image

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Recent Library Changes

Created On: 03-30-2009
Modified On: 05-10-2009

Personal tools