Giter Site home page Giter Site logo

aparek / adinstruments_sdk_matlab Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jimhokanson/adinstruments_sdk_matlab

0.0 0.0 0.0 2.76 MB

Implementation of AD Instruments SDK in Matlab

License: MIT License

MATLAB 77.20% C++ 12.49% M 0.02% C 10.28%

adinstruments_sdk_matlab's Introduction

Overview

This code base exposes the C SDK by ADInstruments to Matlab.

General parts include:

  • sdk class/package (see adi.sdk) - this is the Matlab code that directly interfaces with the mex code
  • sdk_mex (see +adi/private directory) - this is the actual mex code which calls the ADInstruments dll

Note, I've also written a similar, slightly less polished version for Python. https://github.com/JimHokanson/adinstruments_sdk_python

Motivation

LabChart provides functionality for exporting data to a '.mat' file, although I have yet to get it to work. I also prefer not having files that are simply copies of an original file but in a different format. This code allows reading data directly from LabChart data files.

Top Level Functions

  • adi.readFile : Reads a file
  • adi.convert : Converts the a given file to another format (e.g. from .adicht to .mat)

File Reading Notes

Like most of my more recent readers, the raw channel data are not returned unless specifically requested. Instead a lightweight (low memory) handle is returned with relevant meta data and the raw channel data can be requested via subsequent method calls.

f = adi.readFile;
pres_chan = f.getChannelByName('pressure');
raw_pres_data = pres_chan.getData(1); %Get data from the first record

At some point a function could be written that reads everything and reads it into a structure but this is really really low priority for me.

To read these files on a Mac first requires converting the 'adicht' format into a 'mat' format. Unfortunately, the way in which these files needs to be created leaves the mat file looking a bit ugly. Once however it is in the 'mat' format, it can be read via the code in the same way that the original 'adicht' file could.

f = adi.readFile('/Users/Jim/Work/example_file.mat');

Current Status

I've fully implemented the reading portion. I've started the writing portion but I haven't finished it. I have no plans to finish the writing portion at this point in time.

Requirements & Installation

Requires 64bit Matlab on Windows. 32bit Matlab could be supported but some of the mex code would need to be rewritten.

To install the package ('+adi') needs to be on the Matlab path. Sub-folders of the package should not be added to the path.

adinstruments_sdk_matlab's People

Contributors

cutiger avatar greggoldman avatar jimhokanson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.