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

Home » Public Forums » archive » Re: Reading unformatted data from exabyte tape
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: Reading unformatted data from exabyte tape [message #3982] Wed, 12 April 1995 00:00
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <3mesb5$7u9@post.gsfc.nasa.gov>, Dennis Lee Hlavka <sgdlh@virl.gsfc.nasa.gov> writes:
> I'm trying to find a way to read unformatted data from an exabyte tape
> using readu. The problem is the data is structured with a lonarr
> header of 50 words followed by a data array (fltarr of 6620 words).
> I can read each record successfully if I only read the header or
> the data alone (ie lonarr(6670) or fltarr(6670). I hope there is
> a way that I can read both in the same record in IDL. Any
> suggestions?

How about making a structure and reading that:

IDL> str = {header: lonarr(50), data: fltarr(6620)}
IDL> readu, lun, str

I just tried this (on a disk file) and it seems to work.
____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
Re: Reading unformatted data from exabyte tape [message #3984 is a reply to message #3982] Wed, 12 April 1995 00:00 Go to previous message
Fergus Gallagher is currently offline  Fergus Gallagher
Messages: 41
Registered: January 1995
Member
Dennis Lee Hlavka <sgdlh@virl.gsfc.nasa.gov> wrote:
> I'm trying to find a way to read unformatted data from an exabyte tape
> using readu. The problem is the data is structured with a lonarr
> header of 50 words followed by a data array (fltarr of 6620 words).
> I can read each record successfully if I only read the header or
> the data alone (ie lonarr(6670) or fltarr(6670). I hope there is
> a way that I can read both in the same record in IDL. Any
> suggestions?

Sounds like a similar situation to when the data are written by F77. F77
adds checksum longwords at the start and end of each record and so you
have to account for this if the data are read without the /F77 flag in
openr.

If this is not relevant, please supply a few more details.

Fergus

=================================================
| Fergus Gallagher |
| Remote Sensing Applications Development Unit |
| British National Space Centre |
| Monks Wood |
| Huntingdon PE17 2LS / UK |
| |
| F.Gallagher@nerc.ac.uk |
| http://uh.nmt.ac.uk/bnsc/fgg.html |
=================================================
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Rendering 3D surfaces
Next Topic: Killing IDL the easy way

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

Current Time: Wed Oct 08 22:09:59 PDT 2025

Total time taken to generate the page: 1.11687 seconds