On Wednesday, July 16, 2014 4:30:45 PM UTC-4, David Fanning wrote:
> Well, the images look exactly like you would expect if you don't pin the
>
> data coordinate space down by using the position keyword with what I
>
> presume is a Map_Set command in your drawing program. That was my
>
> original suggestion. The "smoothing" effect might go away if you fix
>
> that problem.
>
I am a coworker of Jason's and the guilty party who wrote rsl_plotsweep, the drawing program in question. It was my first endeavor at writing a drawing program, and it is less than elegant. The MAP_SET call looks like this:
maxrange_meters = maxrange * 1000. ; km to meters
meters_to_lat = 1. / 111177.
meters_to_lon = 1. / (111177. * cos(radar_lat * !dtor))
nb = radar_lat + maxrange_meters * meters_to_lat
sb = radar_lat - maxrange_meters * meters_to_lat
eb = radar_lon + maxrange_meters * meters_to_lon
wb = radar_lon - maxrange_meters * meters_to_lon
map_set, radar_lat, radar_lon, limit=[sb,wb,nb,eb],/grid, advance=advance, $
charsize=charsize, color=color, _extra=extra
> Do you have some kind of pre-1970s code in your IDL start-up file that somehow
>
> restricts the number of colors you are using? It looks to me like
>
> something fewer than 256 colors are being used on the display device.
As to the color table, I simply loaded the colors I wanted into the table as follows:
r = indgen(256)
g = r
b = r
r[0:16]= [0,102,153, 0, 0, 0, 0, 0, 0,255,255,255,241,196,151,239,135]
g[0:16]= [0,102,153,218,109, 0,241,190,139,253,195,138, 0, 0, 0, 0, 35]
b[0:16]= [0,102,153,223,227,232, 1, 0, 0, 0, 0, 0, 0, 0, 0,255,255]
; Make the top color white for axes and grids.
r[255] = 255
g[255] = 255
b[255] = 255
tvlct, r, g, b ; load colortable.
The actual plotting is done bin-by-bin for each radar ray. I use POLYFILL to fill an area equivalent to the size of the radar bin at a particular map coordinate. Nothing fancy, just:
polyfill, lon, lat, color=coloray[ibin],/data
where lon and lat are 4-element vectors containing the map coordinates, and coloray is an array of color table indices representing the data for the current ray.
The same program is being used for the X device and Z-buffer.
Thanks,
Bart
|