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

Home » Public Forums » archive » open and save a set of image
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: open and save a set of image [message #51394 is a reply to message #51365] Tue, 21 November 2006 06:29 Go to previous messageGo to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
I don't understand how your first example below can write
more than one file?

Ciao,
Paolo

cecilia.devecchi@gmail.com wrote:
> We have a set of hdf files about wind field. We extract these data of
> an area on the Mediterranean Sea.
> We extract these data and we write them in a *.txt file with the
> following lines:
>
> fileout= 'C:\QS' + name + '.txt'
> print,' OUTPUT FILE: ',fileout
> openw,2,/get_lun, fileout
> printf, 2, 'ASCENDING PASS (DAYTIME)'
> printf, 2, ' LON LAT SPD U V SPD2 COUNT
> TIME
> etc....
> ....
> close, 2
>
> With these lines, we succed to pass every file, but we succed to write
> in txt only the first file :
>
> file_array=file_search('C:\QS\',$
> '*.200*', count=num_file)
> for i=0, num_file-1 do begin
> filename=file_array(i)
> print, filename
> openr, lun, /get_lun, filename
>
> ;read, analisys so the lines that we found above
> fileout= 'C:\QS' + name + '.txt'
> print,' OUTPUT FILE: ',fileout
> openw,2,/get_lun, fileout
> printf, 2, 'ASCENDING PASS (DAYTIME)'
> printf, 2, ' LON LAT SPD U V SPD2 COUNT
> TIME
> etc....
> ....
> close, 2
>
> free_lun, lun
> endfor
>
> How do we write (or we wrong) to write every files txt automatically?
> We hope to explain our problem.
> Thanks a lot
> Regards
>
>
> greg michael ha scritto:
>
>
>> Hold on - what's that *.200* about? That wouldn't match either of the
>> names you showed.
>>
>> Try beginning from something like:
>>
>> print,file_search('D:\mydocs\tmp\*.*')
>>
>> (or a path with just a * for unix) - see if it lists what you expect.
>>
>> many greetings,
>> Greg
>>
>>
>> cecilia.devecchi@gmail.com wrote:
>>
>>> No, sorry....We open, read, extract our data. We have written the
>>> following 'loop for' to open these data:
>>>
>>> file_array=file_search('filepath', '*.200*', count=num_file)
>>> for i=0, num_file-1 do begin
>>> filename=file_array(i)
>>> print, filename
>>> openr, lun, /get_lun, filename
>>>
>>> ;read
>>> free_lun, lun
>>> ;Analyze....
>>> ....
>>> ....
>>> endfor
>>>
>>> But analyze only the first file.....where do we wrong?
>>> We hope to explain our problem....
>>>
>>>
>>>
>>> Ben Tupper ha scritto:
>>>
>>>
>>>> cecilia.devecchi@gmail.com wrote:
>>>>
>>>> >Well, probably we're more newbie than others :).
>>>> >
>>>> >We agree with Paul, we have given few details. We know that we need of
>>>> >a FOR loop, but we have this problem: the name of image are
>>>> >01--1-960305-0941-D-24258, 02--1-960409-0941-D-24759, etc...How do we
>>>> >open (simply open) all the image with this kind of name? For the remain
>>>> >of homework (analisys etc), the script is already written.
>>>> >We need some advice about this "name problem" from programmers expert
>>>> >(like David that is a "IDL guru" ;)) or programmer that has already
>>>> >dealt this problem.
>>>>
>>>>
>>>> Hi,
>>>>
>>>> Is the concern is that your files don't have extensions? If so, then
>>>> rest easy if the images are standard format like TIFF, PNG, etc.
>>>>
>>>> I created a TIFF and saved it without an extension. IDL (6.3) read it
>>>> back in without a hitch.
>>>>
>>>> IDL> image = read_image('/Users/ben/12--345-67')
>>>> IDL> help, image
>>>> IMAGE BYTE = Array[406, 408]
>>>>
>>>> Does that help?
>>>>
>>>> cheers,
>>>> Ben
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: POLYFILLV weirdness
Next Topic: vectorized RK4

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

Current Time: Wed Oct 08 18:19:14 PDT 2025

Total time taken to generate the page: 0.00451 seconds