comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How to display single orbits of satellite data in function graphics?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How to display single orbits of satellite data in function graphics? [message #84101 is a reply to message #84100] Tue, 30 April 2013 13:24 Go to previous messageGo to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
First off, regarding the loop over points using PLOT(): D'oh!!
<headslap> I was caught in a brainfade loop due to trying to recreate
the DG code.

Based on David and Mark's (and Dick's!) suggestions, this is what I did,
but now using multiple orbits (793647 points):

-----%<----
map.Refresh, /Disable

t0 = SYSTIME(1)
p = PLOT(lon,lat,$
SYMBOL='circle', $
/SYM_FILLED, $
SYM_SIZE=0.2, $
RGB_TABLE=39, $
VERT_COLORS=colour, $
LINESTYLE=6, $
/OVERPLOT)
t1 = SYSTIME(1)
MESSAGE, 'Plot of '+STRTRIM(N_ELEMENTS(lon),2)+$
' datapoints took '+STRTRIM(t1-t0,2)+' seconds', $
/INFORMATIONAL

t0 = SYSTIME(1)
map.Refresh
t1 = SYSTIME(1)
MESSAGE, 'Refresh of map display took '+$
STRTRIM(t1-t0,2)+' seconds', $
/INFORMATIONAL
-----%<----

and this is what the various MESSAGE output tells me:

IDL> display_gsi_map,nnobs.depar_bc[2],nnmeta
% DISPLAY_GSI_MAP: Plot of 793647 datapoints took 1.0648339 seconds
% DISPLAY_GSI_MAP: Refresh of map display took 15.363068 seconds


If I do the following, commenting out all the map.refresh stuff:

-----%<----
; map.Refresh, /Disable

t0 = SYSTIME(1)
p = PLOT(lon,lat,$
SYMBOL='circle', $
/SYM_FILLED, $
SYM_SIZE=0.2, $
RGB_TABLE=39, $
VERT_COLORS=colour, $
LINESTYLE=6, $
/OVERPLOT)
t1 = SYSTIME(1)
MESSAGE, 'Plot of '+STRTRIM(N_ELEMENTS(lon),2)+$
' datapoints took '+STRTRIM(t1-t0,2)+' seconds', $
/INFORMATIONAL

; t0 = SYSTIME(1)
; map.Refresh
; t1 = SYSTIME(1)
; MESSAGE, 'Refresh of map display took '+$
; STRTRIM(t1-t0,2)+' seconds', $
; /INFORMATIONAL
-----%<----

I get the following:
IDL> display_gsi_map,nnobs.depar_bc[2],nnmeta
% DISPLAY_GSI_MAP: Plot of 793647 datapoints took 31.771896 seconds


So it takes twice as long if you just do a straight PLOT() without use
of the refresh method?

Why?

Additionally, if I switch to another virtual desktop (on my linux
system) when I switch back to the desktop that contains the map display,
it takes 15s (I timed it 3 times) for the graphic to redisplay (from
black) and for the IDL command line to become active again.

This may be more of a system question (e.g. load, memory, etc) but i'll
ask anyway: Why?

cheers,

paulv


p.s. Onto using COLORBAR! (cowering in corner in abject fear....)

On 04/30/13 14:17, Mark Piper wrote:
> On Tuesday, April 30, 2013 10:56:08 AM UTC-6, David Fanning wrote:
>>
>> My first thought would have been to try to plot all points at once, with
>> a single Plot() command, without the loop. Did you try that?
>>
>
> As David suggests, vectorization is the IDL Way! Here's an example:
>
> IDL> x = randomu(1, n)*360
> IDL> y = randomu(2, n)*180 - 90
> IDL> z = floor(randomu(3, n)*256)
> IDL> tic
> IDL> p = plot(x, y, rgb_table=27, vert_colors=z, linestyle='none', symbol='+')
> IDL> toc
> % Time elapsed: 0.54600000 seconds.
>
> mp
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: i cann't open idl because idlde.exe has stopped working.
Next Topic: How to convert saved postscript file to PNG

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:32:47 PDT 2025

Total time taken to generate the page: 0.00467 seconds