DAT files (.dat) are a common file type containing data. They can be stand-alone files, but are often accompanied by a configuration file such as a header file (.hdr).
This summer my team at NASA is working with .dat and .hdr files containing radar data of near-earth asteroids. The files are generated from an asteroid modelling program called SHAPE.
We are experimenting with preprocessing the data in MATLAB. There wasn't an existing way to straightforwardly ("straightforwardly") work with the .dat files in MATLAB, so we had to write our own script. In that script we use information contained in the .hdr file to read the .dat file as an image. That code is below in case it's useful to somebody.
This summer my team at NASA is working with .dat and .hdr files containing radar data of near-earth asteroids. The files are generated from an asteroid modelling program called SHAPE.
We are experimenting with preprocessing the data in MATLAB. There wasn't an existing way to straightforwardly ("straightforwardly") work with the .dat files in MATLAB, so we had to write our own script. In that script we use information contained in the .hdr file to read the .dat file as an image. That code is below in case it's useful to somebody.
EXAMPLE DATA:
| <- example .dat file |
| <- associated .hdr file |
MATLAB Script:
| <- .m file containing the MATLAB function datHdrConv |
EXAMPLE RESULTS:
Run the function on example data:
>> pixval = datHdrConv('data/run20040918175737');
>> pixval = datHdrConv('data/run20040918175737');
This code was developed with Agata Rożek. Please post any comments below.