Converting binary (*.dat) file containing Photon map data to readable format

672 views
Skip to first unread message

Ganapathy Iyer

unread,
Aug 9, 2011, 7:49:48 AM8/9/11
to tonatiuh-...@googlegroups.com
Is there simpler method of converting the data in the binary file (eg Photon map ) to a readable format. Maybe a csv file which can be read in excel or similar utilities.

Is it possible to read the binary data in a reader like http://www.proxoft.com/BinaryViewer.aspx.

I have attached the photon map of the receiver (Example case). Can some please help me decode it.




Photon_Map.dat

kumar saurav

unread,
Aug 10, 2011, 9:52:50 AM8/10/11
to tonatiuh-...@googlegroups.com
I do also have the same question. Even i tried the method on the webpage but i was not able to do it correctly.
Can some one do a more easier and elaborated study of the converting the data in the binary file.

God Help's
Kumar Saurav

Pablo Benito

unread,
Aug 10, 2011, 12:10:53 PM8/10/11
to tonatiuh-...@googlegroups.com
Well, I though the method in the webpage was simply enough to read the data and post processing it, but I suppose that if you're unfamiliar with Mathematica or R it could be a little tricky...

I have compiled a very little program that 'translates' the Tonatiuh output to csv (comma separated values) format that can be read by excel. Unpack the attachment and put your Photon file there, open a terminal/console (No fancy GUI, sorry!); on the terminal go the unpacked folder, and type:

Tonatiuh2CSV YourPhotonMapFileName

It will output the data in the console and generate a csv file with the same name. Open it with excel.

P.D. Windows & Linux versions included. No Mac version sorry.
tonatiuh2csv.rar

Manuel J. Blanco

unread,
Aug 10, 2011, 8:20:00 PM8/10/11
to tonatiuh-...@googlegroups.com
Dear all,

Just in case, what you want is an example of a Mathematica file that can be used to read the binary data generated by Tonatiuh, and:

  • Compute the total power at the target;
  • Draw a scatter plot of the photons hitting the target, and 
  • Estimates the flux distribution at the target plane.

I am attaching to this post a Mathematica file showing how to generate all the mentioned outputs.

Best regards,
Flux in a Flat Target.nb

Ganapathy Iyer

unread,
Aug 22, 2011, 4:02:32 AM8/22/11
to tonatiuh-...@googlegroups.com
Hi ,
The file was most useful. I could convert the data to a CSV file which I later used to create a 3D output in a 3D rendering Software (I used GAMBIT from ANSYS)

Regards
Ganapathy

Pablo Benito

unread,
Aug 22, 2011, 3:17:51 PM8/22/11
to tonatiuh-...@googlegroups.com
You're welcome,

Good to hear that was useful. 
Come back here if you have more questions or troubles

Regards,
Pablo

Ganapathy Iyer

unread,
Sep 9, 2011, 2:57:04 AM9/9/11
to tonatiuh-...@googlegroups.com
Dear Pablo,
Can you upload the complete code for converting the *.dat file to a Flux map in R which appears on the website.
I have installed R and am attempting to use it.

Regards

Arturo_nos

unread,
Oct 8, 2011, 9:59:34 PM10/8/11
to Tonatiuh - Monte Carlo ray tracer for the optical simulation of CSP systems.
pablo benito.

Thank you very much for the program, is such a great tool for new
persons in tonatiuh like me..

It looks that the program work fine..

your program make's me a excell sheet.. and , how can i graph this
values ?

how can i see the peak flux. ?

Thanks you very much again,

Reggards from mexico. ARTURO

ce...@ier.unam.mx

unread,
May 9, 2014, 12:56:29 PM5/9/14
to tonatiuh-...@googlegroups.com
Hello good day 

I have a question about how to enter or convert the. dat to csv. 

Could put the steps. 

thanks

Hola buen día

tengo una duda de como ingresar o convertir el archivo . dat a Csv.

Podrian poner los pasos. 

Gracias 

Mithun Srivan

unread,
Mar 29, 2021, 5:13:40 PM3/29/21
to Tonatiuh - Monte Carlo ray tracer for the optical simulation of CSP systems.
Hi
I tried importing dat file in R.
But i'm unable to see the dataframe
can someone help me with this issue in R ?

Reply all
Reply to author
Forward
0 new messages