data-exchange / dxchange

data exchange supporting tomopy
http://dxchange.readthedocs.io
Other
34 stars 42 forks source link

open .dat file #76

Open aconceicao opened 5 years ago

aconceicao commented 5 years ago

My tomographic data are already treated and are in .dat files. The experiment was carried out by several sequences of scanning the sample with a microbeam and further rotate it from 0 to 360°. I could not find out any script to convert these data for tomopy reconstruction. Could you help me?

decarlof commented 5 years ago

.dat is a very generic file extension and can be very simple such as even text data or a binary with header. Please provide more information.

aconceicao commented 5 years ago

These data come from scattering tomography. Where the sample is imaged as first generation tomography. Thereby, I have data files with two columns (1st: scattering vector in reciprocal space and 2nd: the correspondent intensity). Each projection is composed of 82 dat files in the y-axis and 122 dat files in the z-axis. It was acquired 80 projections. Therefore, what I need is how to convert this format to use Tomopy with MLEM algorithm for reconstruction. Could you help me with this @decarlof ?

decarlof commented 5 years ago

@aconceicao where did you collect the data? At one point in time we had support for dtp an ASCII data from the Synchrotron Ratiation Center infrared tomography, but we dropped support as the instrument was decommissioned and lost its user base. You can use that reader as an example but keep in mind that you don't need a converter to use tomopy; all you need is to load your raw data into a numpy arrays and since these are ASCII files you can use a simple:

with open('data.dat', 'r') as f:
       x = f.readlines()
aconceicao commented 5 years ago

Dear @decarlof I collected at PETRAIII in an experiment of Scattering tomography. Originally the data are .tiff but I have to integrate every image (using the FIT2D software) to obtain the scattering curve (Intensity vs q-vector), which the output is a .dat file.