Hello,
On 04/30/13 12:34, David Fanning wrote:
> Paul van Delst writes:
>
>> Just an update: left my brain-dead function graphics translation of the
>> direct graphics program running overnight.... the plot was probably only
>> 10% complete when I hit ^C. That's quite funny.
>
> So, the "couple orders of magnitude" improvement you are seeking will
> bring that down to under 10 hours, at least. That's certainly doable, it
> seems to me. But, I would wait for 8.2.3 before upgrading. :-)
>
> I'm curious to see some code. Function graphics have been slow, but they
> are not totally brain dead, usually. I wonder if something else is going
> on here?
Here's the DG code plotting the data "var"
-----%<-----
lat=reform(meta.cenlat)
lon=reform(meta.cenlon)
map_set,limit=[latmin,lonmin,latmax,lonmax],$
title=title1
map_continents
colour=bytscl(var,min=minval,max=maxval)
for i=0L,nobs-1 do begin
plots,lon(i),lat(i),color=colour(i),$
psym=8,symsize=symsize
endfor
-----%<-----
And here is my practically line-by-line translation of the above using
FG. note that I am using "PLOT()" to approximate PLOTS by simply
overplotting the same point.
-----%<-----
map = MAP('Mercator', $
LIMIT=[minlat,minlon,maxlat,maxlon], $
RGB_TABLE=3, $
CURRENT=w)
; Change some grid properties.
grid = map.MAPGRID
grid.LINESTYLE = "dotted"
grid.LABEL_POSITION = 0
grid.BOX_AXES = 1
; Display continetnal outlines
m1 = MAPCONTINENTS()
lat = REFORM(metadata.cenlat)
lon = REFORM(metadata.cenlon)
colour = BYTSCL(variable,MIN=minval,MAX=maxval)
map.Refresh, /Disable
FOR i = 0L, N_ELEMENTS(variable)-1L DO BEGIN
p = PLOT([lon[i],lon[i]],[lat[i],lat[i]],$
SYMBOL='circle',SYM_COLOR=colour[i],$
/SYM_FILLED,SYM_FILL_COLOR=colour[i],$
VERT_COLORS=[colour[i],colour[i]], $
LINESTYLE=6, $
/OVERPLOT)
ENDFOR
map.Refresh
-----%<-----
I realise the symbol colouring is completely wrong but the above FG code
was written as the initial test case. First plot the data points, then
colour them accordingly.
The data vectors (variable, lat, lon) contains 131085 data points. Not
that big.
I also realise my use of PLOT() above is completely wrong/bad/stupid
(creating millions of FG objects no doubt) - hence my request about how
to plot individual points, in this case satellite FOV measurements, on a
map. The actual data is thinned, cloud-cleared, and quality controlled
so creating a regular image is not an option.
There's obviously a much smarter way of doing this - before I started
data mining the IDL documentation (which, with regards to examples of
using the FG mapping commands that *don't* involve an image, is quite
poor), I figured I'd ask the newsgroup.
cheers,
paulv
>
> Unfortunately, I don't have the faintest idea how to even get started
> replicating the problem. Can you suggest a test case?
>
> Cheers,
>
> David
>
>
>
|