Example 9: The Data Probe


The data probe table file consists of one or more tables that map physical data values to RGB (Red, Green, Blue) pixel values. The assumption is that between given RGB values, one can use a linear interpolation to deduce values in between. Each table begins with a line like this:

*Name of table [, optional display text for transparent pixels]

The asterisk and the Name of table are required. The optional... text will only appear if the pixel is completely transparent (that is, the alpha value == 0).

Following this header, one or more lines specifying the "breakpoints" are given. As with FlAniS, you may include extra information regarding the number of decimal digits to display, the units (will be appended to the numeric value) and a "prefix" (will precede the value). For example:

0.37 18 160 246 , 2 , inches per hour , Rainfall Rate=

indicates that the "data" value of "0.37" is at Red=18, Green=160, and Blue=246. In addition, 2 decimal digits are to be used, and the display value should appear like:

Rainfall Rate= 0.37 inches per hour

The appended information will apply to all subsequent lines until new values are given (see the GOES tables, below for an example of changing units within the table).

You may also specify a Text String to be displayed for a specific RGB value. For example:

0.0 100 200 0, "Snow" will display "Snow" (without the quotes) for an RGB value of (100,200,0).


Here is the complete data probe table used in this example:

*Rainfall Rates, Nothing... 0.00 0 0 0, "No rain...or snow!" 0.009 1 160 246 , 2 , inches per hour , Rainfall Rate= 0.01 0 0 246 0.02 0 255 0 0.05 0 200 0 0.07 0 144 0 0.10 255 255 0 0.22 231 192 0 0.45 255 144 0 0.92 255 0 0 1.90 214 0 0 4.0 255 0 255 8.8 200 0 200 16.6 150 0 150 999 255 0 0,"Too much precip!" OMG 255 255 255 *GOES-LI , These's aren't the droids you're looking for...move along... 25. 0 0 0, "Fade to black" 24.8 2 2 2,"Fade to black" 24.6 60 40 10,1,C, LI= 0.28 215 165 115 0.08 128 128 255 -3.74 63 63 106 -3.94 100 100 0 -7.76 233 233 0 -7.97 255 0 0 -11.78 120 0 0 -12.0 100 0 0 -14.2 85 0 0 -14.4 80 0 0 -15.0 60 0 0 -15.0 109 0 0 301 110 110 110, 2, K,CTT= 273.6 128 128 128 271.55 148 148 148 242.09 170 170 170 240.13 190 190 190 222.45 220 220 220 220.49 230 230 230 193.0 255 255 255 *GOES-TPW, ...move along.... 0 0 0 0, 1,mm,TPW= .336 1 0 0 .673 60 40 10 9.764 217 167 117 10.1 150 150 250 19.86 80 80 150 20.0 0 100 100 29.965 115 165 40 30.3 145 190 60 40.065 255 255 0 40.0 255 130 100 50.165 150 40 40 50.50 100 0 100 60.267 240 0 240 60.603 255 200 255 67.0 225 180 225 301 110 110 110,1,K,CTT= 273.6 128 128 128 271.55 148 148 148 242.09 170 170 170 240.13 190 190 190 222.45 220 220 220 220.49 240 240 240 193.0 256 256 256

Go To Front Page
Next Example
This webapp Copyright© 2014-2017 by Tom Whittaker