View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Be the first to rate this file! 3 Downloads (last 30 days) File Size: 74.9 KB File ID: #37101 Version: 1.1

Use GetData to Read a Dirfile into Matlab



11 Jun 2012 (Updated )

A Matlab MEX binding for the gd_getdata() function in the GetData ( project.

| Watch this File

File Information

The GetData project is the reference implementation for the dirfile file format. This format is used for scientific data, notably the Blast(-Pol) experiment, the BICEP2/Keck/Spider experiment, and others. I am aware of a Matlab mex file that allows dirfiles to be read into Matlab, but the file does not support interpolated fields (linterp). After a suggestion by Tom Montroy, I decided to write a short mex file that uses the native C functions in GetData to read the file, and use mex to pass that data quickly into Matlab.

Building this mex file requires linking to the GetData library. Instructions on how to do this are included in a pdf readme attached to this submission.

Once the code is compiled and linked, the function is used in Matlab as:

output_array = gd_getdata_mex('/filename/of/dirfile','field_name',100,75);

This would read 75 frames of data, starting at frame 100, of the field 'field_name' from the dirfile located in '/filename/of/dirfile'. You could then type plot(output_array) in Matlab and go from there with your analysis.

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Other requirements GetData, XCode, Matlab configured to build from gcc
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
12 Jun 2012 1.1

Added an improved readme with installation instructions.

Contact us