The SDS library makes it easy for .Net developers to read, write and share scalars, vectors, matrices and multidimensional grids which are very common in scientific modelling. It supports CSV, NetCDF and other file format
Programs that use the library store related data and associated metadata in a compact self-describing package.
Libraries come with a set of utilities and packages: sds
command line utility, DataSet Viewer
application and an add-in for Microsoft Excel 2007 (and later versions)
. See Release page for details.How to use SDS library in your projects
- Run SDS installer on your machine.
- Reference Microsoft.Research.Science.Data.* assemblies in your Visual Studio project.
- Use Documentation and .chm reference documentation installed in Start menu to program in any .Net language.
Here are just 2 code snippets.Reading a column from a .csv file
Storing a 3D grid with axes and metadata in a NetCDF file
DataSet ds = DataSet.Open("filepath.csv");
double data = ds.GetData<double>("ColumnHeader");
float[,] grid = new float[360,720];
double x = new double;
double y = new double;
// ... compute grid, x and y values
DataSet ds = DataSet.Open("filepath.nc?openMode=create");
ds.Add("grid", grid, "x", "y");
ds.Add("x", x, "x");
ds.Add("y", y, "y");
ds.PutAttr("grid", "units", "m/sec2");
Read the Getting started
document for a more detailed introduction. To complete tutorials found in this paper you need full SDS package from the following page: http://research.microsoft.com/projects/sdsHow to develop a new SDS provider
SDS allows to develop new providers, extending set of data sources accessible through the SDS API.
Additional SDS providers come as dynamically linked assemblies. Your existing applications can take advantage of a new provider. To create a new provider:
- Download sources.
- Read instructions for creating new provider.
- Create a separate CodePlex project for your provider.
- Tell us about your development.