|
From: Sergey F. <ser...@gm...> - 2007-10-01 20:13:34
|
> (2) I suppose the program makes a linear mapping from the input numbers to the color > table, except for a parameter gpow which seems to be an exponent for a power law > mapping. How does that work? Is the mapping linear unless gpow is supplied? Jim, Yes, gpow defaults to 1 (I have changed the selfdoc to reflect that). > There are also parameters "gainstep" and "phalf" which seem to be involved in the > "estimation" of an optimal(?) gpow. How does that work? The criterion for an optimal gpow is (d/clip)^gpow =1/2, where d is the data value at "phalf" percantage quantile. The exact algorithm is in http://rsf.svn.sourceforge.net/viewvc/rsf/trunk/plot/lib/gainpar.c?view=markup "gainstep" allows to skip some data values when estimating optimal clip and gpow. > (3) The parameters clip and pclip seem to be for data clipping prior to application of the > color map, so that extreme values beyond the corresponding limits will all be assigned > colors at the corresponding ends of the color table. Yes? Yes. > (4) sfgrey seems to be designed mostly for data centered on zero. I suppose seismic > signals are like that (In case you haven't noticed, I'm not a geophysicist). So I think the > default behavior is to make a color map centered on zero. That is, the data value mapped > to one end of the color table is the negative of the value mapped to the other end. Am I > correct? Yes. You can change the center using the "bias" parameter. > The parameter allpos changes this default behavior so that zero is mapped to the lower > end of the color table, and a positive value is mapped to the upper end. It looks like the > data value mapped to the lower end of the color table will never be bigger than zero. Yes. This is again relative to "bias". > (6) There are parameters minval and maxval, but they don't seem to control the color > mapping. They just control the portion of the color mapping displayed on the color bar. > Correct? Yes. > for name in list: > min = plot_props[name][0] # get min value from dictionary > max = plot_props[name][1] # get max value from dictionary > bias = (min+max)/2.0 # calculate value for the center of the > color table > clip = (max-min)/2.0 # calculate half the difference between > values at the ends of the color table Would it make sense to define "min" and "max" as extra parameters to sfgrey that override "clip" and "bias"? This should be very easy to implement. > When I get some time I will put this explanation in the wiki... A wiki page would be very helpful indeed. SF |