colorize

From DavinciWiki
Jump to: navigation, search

Description

Colorize any numeric array based on either a linear or non linear scale. Standard XV and TES scales are included but are hard linked to /themis/lib/dav_lib/. The files are included for download below if you require them. You must then edit the code to check for the right directory.

Arguments and Return Values

Input: Any numeric array

Output: A numeric array of contours of the same dimensions as the input with contours of a multiplicative of the interval value

Usage

Syntax: colorize(data [, ignore = VAL] [, type = VAL] [, colors = VAL] [, values = VAL] )

  data   - Any numerical array.
  ignore - null value of the data (Default = -32768)
  type   - apply colorize in "rgb" or "hsv" space (Default = "rgb")
  colors - number of colors to use 1 = 6 colors, 2 =  7 colors 
           3 = XV color scale, 4 = TES colormap, 5 = TES daily colormap  6 = MOLA Colorbar 7 = Blue/White/Red (Default = 1).
  values - values of the data for each color (Assigned linearly by default)

Examples

dv> mola
1037x1185x1 array of short, bsq format [2,457,690 bytes]

dv> colorize  = colorize(mola,ignore = -32768)
255,000,255 = -4758.000000
000,000,255 = -3345.799805
000,255,000 = -1933.599854
255,255,000 = -521.399902
255,128,000 = 890.800293
255,000,000 = 2303.000000
1037x1185x3 array of byte, bip format [3,686,535 bytes]


dv> mola
1037x1185x1 array of short, bsq format [2,457,690 bytes]

dv> colorize  = colorize(mola,ignore = -32768,values = -4758//-3345//-1933//-521//890//2303)
255,000,255 = -4758.000000
000,000,255 = -3345.000000
000,255,000 = -1933.000000
255,255,000 = -521.000000
255,128,000 = 890.000000
255,000,000 = 2303.000000
1037x1185x3 array of byte, bip format [3,686,535 bytes]


Images

elevation.png colorelevation.png

Grayscale elevation and colorized elevation

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

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

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 08-11-2006
Modified On: 07-31-2019

Personal tools