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

Home » Public Forums » archive » Writing a dat file and opening in ENVI
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Writing a dat file and opening in ENVI [message #90095] Mon, 26 January 2015 06:05 Go to previous message
Sarah Douglas is currently offline  Sarah Douglas
Messages: 3
Registered: December 2014
Junior Member
Hi,

I am quite new to IDL so this might be just a basic problem which I am overlooking.

I am trying to write a .dat file of an image which can be read in ENVI. I am able to write the array to the file but then when I open it in ENVI, I get an image with vertical stripes in every other pixel. However, if i re-read the file into IDL, I do not see these stripes.

I believe this could be to do with how ENVI reads .dat files or how the data is written to the file. Here is some example code,

nrows = 382L
ncols = 38L
num_bd = 102
test_arr = uintarr(nrows, num_bd, ncols)
for i=0,num_bd-1 do test_arr(*,i,*) = i+1

FILENAME = '/home/sarah/Data/Upscaled_pre_SVD/'+ 'test.dat'

openw, 1, filename
writeu, 1, test_arr
close, 1

result = 0
result = uintarr(nrows, num_bd, ncols)
openr, 1, filename
readu, 1, result
close, 1
[Message index]
 
Read Message
Read Message
Previous Topic: saving an output from the find.pro script
Next Topic: GPS Rinex reader

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

Current Time: Wed Oct 08 11:59:34 PDT 2025

Total time taken to generate the page: 0.00475 seconds