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

Home » Public Forums » archive » IDL save result of procedure to file
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: IDL save result of procedure to file [message #84756 is a reply to message #84755] Fri, 07 June 2013 11:49 Go to previous messageGo to previous message
Andy Sayer is currently offline  Andy Sayer
Messages: 127
Registered: February 2009
Senior Member
You can use the 'save' procedure to save the data to an IDL .sav file.

The printf command will write data to a file in the format you specify. You probably want to be using save rather than printf, if I undertstand your posts correctly. See: http://www.exelisvis.com/docs/SAVE.html

If you're talking about saving an actual plot, rather than the data in it, that's a different question. If you want a jpeg or png then IDL has routines for that, e.g.: http://www.exelisvis.com/docs/WRITE_PNG.html (you'll also need to use tvrd before.)

If you want eps/pdf output then that involves a little more typing but is also pretty straightforward.

As to looping over files, you can do something like:

files=file_search(my_folder+'*.myformat',count=nfiles)

if nfiles gt 0 then begin
for i=0l,nfiles-1 do begin
(do your stuff here)
endfor
endif

Hope this helps,

Andy


On Friday, June 7, 2013 2:44:26 PM UTC-4, David Fanning wrote:
> quincyaflint@gmail.com writes:
>
>
>
>> I'm trying to use printf, but I'm not sure in what format this will save my image
>
>
>
> Well, you don't want that one, for sure.:-)
>
>
>
> It is a text format. Not at all what you want. What format were you
>
> hoping for?
>
>
>
> For your other questions, you want to look up File_Search and
>
> Dialog_Pickfile.
>
>
>
> If you are new to programming, I would recommend Ken Bowman's book, An
>
> Introduction to Programming with IDL. It will get you started on these
>
> basic programming concepts.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: putting file names into lists
Next Topic: Updating FFmpeg libraries on MacOS

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

Current Time: Sat Oct 11 09:31:56 PDT 2025

Total time taken to generate the page: 0.08077 seconds