Re: Reading GE MRI data off 1/2" tapes [message #16752 is a reply to message #16743] |
Thu, 19 August 1999 00:00  |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
David Foster wrote:
> Problem:
>
> Cannot read General Electric Signa 3.x/4.x MRI data off
> 9-track 1/2" tapes.
>
> The program I am writing is in Fortran (historical reasons, of course);
> I have tried using the Sun f77 topen,tread... routines, but these are
> record-oriented and don't work in this case. I've tried opening the
> tape device with open(...,form='unformatted') and can read the first
> file on tape, the label. But I cannot seem to get past the first file
> marker (tried mt, tskip).
>
> These tapes seem to be in a "unique" format, as a third-party program
> that is used to read files off of these tapes (sorry, can't remember
> the name, the folks I'm consulting for tried using it) doesn't work
> with them.
>
> Any pointers, hints, or code, in *whatever* language, would be
> greatly appreciated. I am getting desperate, as this project's
> deadline has long since passed.
>
> I apologize if this is off-topic for this newsgroup; I'm trying to reach
> an audience that is most likely to have experience with reading MRI
> data off tapes. Not many of those posting to the Fortran newsgroups.
Hey Dave,
Did you try the tcopy command on that tape, e.g.
% tcopy /dev/rmt/xxx
where xxx is your tape device? In this mode, tcopy should scan the whole
tape and display information about the sizes of all records and files on
the tape. You might need to experiment with the different tape devices
in /dev/rmt to find the right one.
If you can get this far, and the results make sense, then you can read
the contents of the tape in IDL (on Unix), assuming the tape records are
of fixed length:
file = '/dev/rmt/xxx'
openr, lun, file, /get_lun, /nostdio
recsize = 16384 ; or whatever size record
record = bytarr(recsize)
transfer_count = recsize
nrecords = 0
while transfer_count eq recsize do begin ; should quit at end-of-file
readu, lun, record, transfer_count=transfer_count
nrecords = nrecords + 1
endwhile
free_lun, lun
print, 'Records read: ', nrecords
Cheers,
Liam.
--
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley
|
|
|