Read and convert a .dat file containing binary data
이전 댓글 표시
Hi all,
I'm a beginner with the binary files and I would need some help. I have a *.dat file coming out from my CAEN digitizer that contains binary data. The structure of the file is the following:
EVENT=│Event│Event│Event│....│Event│; Event=(unsigned 64 bits int)Time Tag│(unsigned 16 bit)Energy
So the idea is: a 1-column (or 1-row, I'm not pretty sure) file containing data of timing and energy of alpha particles.
- First Event: timing of the first particle in unsigned 64 bits int.
- Second Event: Energy of the first alpha particle in unsigned 16 bit.
- Third Event: timing of the second particle in unsigned 64 bits int.
- Fourth Event: Energy of the second alpha particle in unsigned 16 bit.
And so on....I would like to convert the file into a 2-columns file containing:
- First column: timings
- Second column: energies
First in binary to really see the zeros and ones and then to ASCII. I attach one of those files (I had to change the extension to .txt to upload).
Any help will be very welcome. Jose Manuel.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Particle & Nuclear Physics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!