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

Home » Public Forums » archive » Re: Help with envi_output_to_external_file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Help with envi_output_to_external_file [message #71038] Tue, 25 May 2010 07:06
lorenzo is currently offline  lorenzo
Messages: 3
Registered: May 2010
Junior Member
> Hi Lorenzo,
>
> out_lib is the problem here. You can't specify the data in this function
> (you could be using writeu directly though). Moreover, you use the fid
> of your original file. I believe you must get a fid for your output (i.e
> have out_lib as an Envi image, loaded in memory), and
> envi_output_to_external_format will convert this data to ascii.
>
> Jean

Hi Jean;
Thanks a lot for the advice. It did the trick! I used
envi_write_envi_file to write a file to memory and then
envi_output_to_external_format to retrieve that file and write it to
to an ASCII file. In the call I used the new file's id and added the
"dims" and "pos" keywords which I had forgotten to include too. I just
have to resize the arrays and do a couple of more things to get it all
right, but I am on my way now.


Lorenzo.
Re: Help with envi_output_to_external_file [message #71055 is a reply to message #71038] Mon, 24 May 2010 10:10 Go to previous message
jeanh is currently offline  jeanh
Messages: 79
Registered: November 2009
Member
> envi_select, fid=fid, dims=dims, pos=pos

> envi_output_to_external_format, /ascii, out_lib, field=array,
> dims=sub_dims, pos=pos, fid=fid, out_name ="spectra.txt"

Hi Lorenzo,

out_lib is the problem here. You can't specify the data in this function
(you could be using writeu directly though). Moreover, you use the fid
of your original file. I believe you must get a fid for your output (i.e
have out_lib as an Envi image, loaded in memory), and
envi_output_to_external_format will convert this data to ascii.

Jean
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Sodium Phosphide Formula
Next Topic: mean and stdev w/ errors

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

Current Time: Wed Oct 08 11:32:15 PDT 2025

Total time taken to generate the page: 0.00425 seconds