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

Home » Public Forums » archive » How can make a simple movie from .txt files
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 can make a simple movie from .txt files [message #77715 is a reply to message #77611] Wed, 21 September 2011 13:24 Go to previous message
Russell[1] is currently offline  Russell[1]
Messages: 101
Registered: August 2011
Senior Member
On Sep 16, 9:28 am, ece <ecekile...@gmail.com> wrote:
> Hi,
>
> I have 100 spectra in .txt files. Each file has wavelength and flux
> values. I want to make a movie showing each spectra  as a function of
> time. Does anyone have a suggestion about how to start?

Hi Ece, I've done something like this for some galaxy spectra I had.
What I did was to use the MPEG tools (mpeg_open.pro, mpeg_put.pro,
mpeg_close.pro, and mpeg_save.pro) that come with IDL. So the
algorithm is pretty simple:

(1) read the first spectrum
(2) create a window with the pixmap option set
(3) plot the spectrum
(4) use tvrd() to get the data which you just plotted. this will be a
3xm x n array.
(5) use the mpeg_* utilities to put this into the file
(6) destroy the window
(7) goto (1) with a new spectrum

Now, you can add things along the way to deal with frame rate, colors,
etc. And there maybe a better way than the creating/destroying all
those windows, but this did work for me.

-Russell
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL_IDLBridge hangs
Next Topic: Function 'folfing' in IDLDE 7.1?

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

Current Time: Sat Oct 11 15:09:50 PDT 2025

Total time taken to generate the page: 0.48272 seconds