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

Home » Public Forums » archive » Re: skip_lun question
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: skip_lun question [message #65937] Tue, 31 March 2009 14:04
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
llo writes:

> I've a question with the skip_lun function.
>
> Looks the following example:
> I've a .dat file that contains a BYTARR(180,240,24) and I want to read
> a 180x240 matrix on the 7th position ([*,*,7])
>
> I tried something like that:
>
> openr, un$lun, file, /get_lun
> skip_lun, un$lun, (180.*240.*7)
> data=bytarr(180,240)
> readu, un$lun, data
> ------------------------------------------------------------ ----
> Now I verify the reading......
>
> point_lun, un$lun, 0
> all_data=bytarr(180,240,24)
> readu, un$lun, all_data
>
> print, total(abs(all_data[*,*,7]-data))
> IDL> 6.71223e+06
>
> The result is so different and I don't know why.
> Any suggestions? Does anybody knows how is the information saved in a
> DAT file.

SKIP_LUN!? That's a new one for me. :-)

First of all, [*,*,7] is the *eighth* position. I presume this
isn't your problem is it? The *seventh* position is [*,*,6].

Anyway, I would do this with an associated variable:

Openr, lun, file, /Get_lun
data = Assoc(lun, Bytarr(180,240,24))

Then, if I wanted the 7th frame of data:

thisframe = data[6]

Cheers,

David

--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: skip_lun question [message #65938 is a reply to message #65937] Tue, 31 March 2009 14:00 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
It must be the same
I found the problem,

Sorry
B.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: skip_lun question
Next Topic: Non-negative matrix factorization

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

Current Time: Thu Oct 09 12:01:35 PDT 2025

Total time taken to generate the page: 0.47864 seconds