Re: Reading unformatted data from exabyte tape [message #3982] |
Wed, 12 April 1995 00:00 |
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  |
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 |
=================================================
|
|
|