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

Home » Public Forums » archive » Re: Xinteranimate problem!!
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: Xinteranimate problem!! [message #18209] Fri, 10 December 1999 00:00 Go to previous message
dsreyn is currently offline  dsreyn
Messages: 10
Registered: December 1999
Junior Member
In article <3850F419.8382746A@leeds.ac.uk>,
mensar@leeds.ac.uk (Scott Reid) writes:

> I would like to thank everyone in the group for the help they have given
> me so far, particularly Liam Gumley. My latest problem is with
> XINTERANIMATE. The program runs, but I seem to be getting an error which
> says that 'only one animation at a time is allowed'. In the window I get
> the error :
>
> % Program caused arithmetic error: Floating divide by 0
>
> I believe the xinteranimate is loading the sequence 22 times. The
> program is :-
>
> pro OnOpen
>
> ; Get the Filename
> openr, 1, 'E:/Temp/batch.rvd'
> datas=fltarr(3,36,49,22)
> readf, 1, datas
> close, 1
> h=rebin(reform(datas[2,*,*,*]), 72, 98, 22)
> loadct, 3
> ; erase
> frames = fltarr(512, 512, 22)
> window, 1, TITLE='Bloodflow animation', xsize=512, ysize=512
> XINTERANIMATE, set=[512,512,22]
> for i=0, 21 do begin shade_surf, h[*,*,i], zrange=[-1,+1] &
> frames[*,*,i]=tvrd() & xinteranimate & end
>
> end

You need to specify two keywords to xinteranimate In the FOR loop that loads
the images into the animation - FRAMES and WINDOW. Here's a simple working
example that displays a running 40 point window of a 500 point data set:

pro anim_test
npts = 500
nshow = 40
nframes = npts - nshow + 1

pdat = sin (indgen(npts) / 5.)
window, 1, xsize = 500, ysize = 200
xinteranimate, set = [500, 200, nframes]

for i = 0, npts - nshow do begin
plot, pdat(i:i+nshow-1), title = strtrim (i,2) + ":" + strtrim (i+nshow-1,2)
xinteranimate, frame = i, window = 1
endfor

xinteranimate
end

Doug
[Message index]
 
Read Message
Read Message
Previous Topic: How to select best from a long list?
Next Topic: Re: CALL_EXTERNAL and strarr()

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

Current Time: Fri Oct 10 11:30:50 PDT 2025

Total time taken to generate the page: 0.72026 seconds