Re: [fluka-discuss]: Post processing USRBIN file (*.bnn format)

From: Mohammad Islam <rafiqul.islam_at_okstate.edu>
Date: Thu, 23 Oct 2014 17:45:14 -0500

Hi mary,
I figured out the problem and now i understand the layout of the data in
the ascii file. I vastly appreciate your help.

Thanks
Rafiq
On Oct 23, 2014 3:19 PM, "Mohammad Islam" <rafiqphy_at_gmail.com> wrote:

> Dear Mary,
>
> Thank you very much for your prompt answer. As your suggestion, I
> converted using the approach => FLAIR>Run>Files>data then right-click
> on the bnn file and select 'To ascii'. But now I see a tons of data
> point (although most of them are zero), however if I plot the original
> bnn file using flair it gives me a simple *dat file of the whatever
> bin width that I had chosen in the input. Can you please tell me how
> can I interpret this ascii file. I want a similar .dat file that flair
> produces which is just a bragg curve in this case. Attached is one of
> the converted ascii file for your comments. Thank you very much.
>
> On Thu, Oct 23, 2014 at 2:51 PM, me_at_marychin.org <me_at_marychin.org> wrote:
> > Dear Rafiq,
> >
> > bnn is binary. If you'd like to do it the brute-force way, use MATLAB
> fread.
> >
> > The easy way is to convert bnn to ascii, under FLAIR>Run>Files>data then
> > right-click on the bnn file and select 'To ascii'. Thereafter, use MATLAB
> > fscanf, fgets, fgetl or ...
> >
> > An alternative to the 'To ascii' function would be just to take the dat
> > file, assuming you plotted with FLAIR.
> >
> > The lazyman's way is: manually edit the ascii file by removing the header
> > lines. Thereafter, use MATLAB load. This way, you won't even need to
> worry
> > about bytes and fields. You won't even need to open and close the file.
> >
> > MATLAB or PYTHON or PERL the algorithm would be similar (with the
> exception
> > that MATLAB's load condenses all the steps in to one):
> > open the file
> > read each line, split according to the spaces or fields or bytes
> > arrange the numbers into an array
> > close the file
> >
> > :) mary
> >
> >> On 23 October 2014 at 11:32 Mohammad Islam <rafiqul.islam_at_okstate.edu>
> >> wrote:
> >>
> >>
> >> Dear Users,
> >>
> >> Does anybody know how to read the *.bnn file that comes from USRBIN
> >> using MATLAB or any other language. I tried to read it through MATLAB
> >> but it did not give me the data I was looking for. I need to do some
> >> post processing of the deposited energy which is in number of binary
> >> files. FLAIR can read and plot it and also save it as *.dat file but I
> >> have so many files that a little bit coding would be helpful. I
> >> appreciate any help.
> >>
> >> Thanks
> >> Rafiq
> >>
>
>
>
> --
> Mohammad Rafiqul Islam, PhD
>
Received on Fri Oct 24 2014 - 02:12:20 CEST

This archive was generated by hypermail 2.3.0 : Fri Oct 24 2014 - 02:12:21 CEST