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

Home » Public Forums » archive » Re: problem reading Fortran binary file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: problem reading Fortran binary file [message #70242 is a reply to message #70241] Thu, 25 March 2010 11:50 Go to previous messageGo to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
This is what you were asking, but I think the way you are reading it,
your Nphot_tab will have the elements messed up in it. Both IDL and
Fortran are row major, so when you read the data, the leftmost
dimension should vary the fastest. Also I think you could use just:


nrej = 0L
n = 0L
my_file = 'bfile.bin'
openr,unit,myfile,/get_lun,/f77_unformatted
readu,unit, nrej,n
Nphot_tab = dblarr(nrej,n)
readu,unit,Nphot_tab
free_lun,unit

You should also make sure that the data types match. Is your fortran
array data made of 64-bit reals? Are the fortran nrej and n 32 bit
integers?
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: problem reading Fortran binary file
Next Topic: outline keyword for bar_plot

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

Current Time: Sun Oct 12 08:31:52 PDT 2025

Total time taken to generate the page: 0.88062 seconds