Re: Plotting a long vector on PV-WAVE [message #10459] |
Tue, 02 December 1997 00:00 |
mgs
Messages: 144 Registered: March 1995
|
Senior Member |
|
|
In article <3482A196.500F@astro.ufl.edu>, Christos Siopis
<siopis@astro.ufl.edu> wrote:
...
> snap = tvrd(0,0,640,512)
...
David Fanning already replied with the Device, Copy command.
> What's also funny is that the "TV, snap" command worked
> instantaneously on a low-end Sun workstation but it would need half a
> second or more to "unroll" on a much faster DEC Alpha machine. Could
> it be that the Alpha's display holds more information?
This could be due to the video to system bus attributes, which are beyond
IDL's control. If the low-end Sun workstation is using the S24 video, you
should be getting excellent video throughput. I can't recall the specifics
of the white paper I read about five years ago (I wonder what I used to
kill those brain cells), but the basics were that the video and memory bus
were shared, allowing much better performance.
--
Mike Schienle Interactive Visuals
mgs@sd.cybernex.net http://ww2.sd.cybernex.net/~mgs/
|
|
|
Re: Plotting a long vector on PV-WAVE [message #10467 is a reply to message #10459] |
Mon, 01 December 1997 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Christos Siopis (siopis@astro.ufl.edu) writes:
> I have a long real-number vector (of more than 10,000 elements) that
> I would like to plot (e.g., versus time). However, if I plot the
> whole thing the display gets crammed... The best way I can think of
> to view the data is to see it as a time series: plot only a few data
> points at a time and "pan" (scroll) the viewing window to the right.
>
> I tried to do something like that, using the Z buffer to avoid the
> flickering, but the program runs very slow (it takes about 1/3 or 1/2
> of a second between consecutive frames on a Pentium/Linux machine).
> Is this normal? Here is the procedure I used (PV-WAVE):
>
> PRO pan, x, n, win, stp
>
> ; x = fltarr(n)
> ; n = number of datapoints (e.g., 10000)
> ; win = viewing window size (e.g., 100 data points at a time)
> ; stp = how much to shift to the right between successive
> ; snapshots (e.g., 10)
>
> thisdev = !D.Name
> for i = 0, n-win-1 do begin
> set_plot, 'z'
> plot, x(i:i+win), psym=-2
> snap = tvrd(0,0,640,512)
> set_plot, thisdev
> tv, snap
> if (get_kbrd(0) ne "") then return
> endfor
> END
>
> What's also funny is that the "TV, snap" command worked
> instantaneously on a low-end Sun workstation but it would need half a
> second or more to "unroll" on a much faster DEC Alpha machine. Could
> it be that the Alpha's display holds more information?
Try using the "Device Copy" technique with a pixmap instead
of the Z-graphics buffer. Device Copy should be orders of
magnitude faster, probably, than the TVRD command. Here is
a revised Pan program. Surprisingly, the two programs ran
about the same on my WindowsNT machine.
PRO pan, x, n, win, stp
; x = fltarr(n)
; n = number of datapoints (e.g., 10000)
; win = viewing window size (e.g., 100 data points at a time)
; stp = how much to shift to the right between successive
; snapshots (e.g., 10)
thisdev = !D.Name
window, 0, xsize=400, ysize=400
window, 1, xsize=400, ysize=400, /Pixmap
for I = 0, n-win-1 do begin
WSet, 1
plot, x(I:I+win), psym=-2
WSet, 0
Device, Copy=[0,0,400,400,0,0,1]
if (get_kbrd(0) ne "") then return
endfor
END
Cheers,
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|