Code Monkey home page Code Monkey logo

optimal-control-epg's Introduction

##Optimal Control EPG

This Matlab code may be used to reproduce results from an upcoming paper (link to be posted soon) on optimal control design of MRI pulse sequences. The work builds on prior work (see this paper, and this one) but treats the design problem using optimal control methods, rather than simple numerical optimization. The result is highly accelerated and much stabler calculation.

Alessandro Sbrizzi & Shaihan Malik, June 2015

Releases:

The releases page contains downloadable archives of the code along with test data (B1 field maps in .mat format). The Windows version also contains .exe compiled binaries.

###Contents

  1. Introduction
  2. Compile C++ code (optional)
  3. Choose the input parameters
  4. Run the main script

1. Introduction

This code runs on Matlab with the optimization toolbox (necessary for the function fmincon.m). The EPG simulator is implemented in C++ and in Matlab. The user can choose which version. The C++ implementation is faster but it requires the open-source linear algebra library ARMADILLO version 5.100 or higher. For more info and download see: http://arma.sourceforge.net For information about the compilation of the c++ code see section 2.

###2. COMPILE C++ code (optional)

The EPG simulator is implemented in both Matlab as well as in c++. The user can choose which version by indicating it in the info file (see below). To improve performance use the c++ version: obj_EPG13_cpp. To compile the C++ file, download ARMADILLO and save in a directory of your choice (indicated here as ARMADILLO). Then type in matlab:

system('g++ obj_EPG13.cpp -o obj_EPG13 -O2 -I DIRECTORY/armadillo-5.100.1/include -lblas -llapack');

If you have troubles compiling or running obj_EPG13_cpp.m you can choose for the analogous matlab version obj_EPG13.m (slower). Just replace "obj_EPG13_cpp.m" by "obj_EPG13.m" in the "OPTIMIZATION" cell of the MAIN.m file

NOTE: with some extra effort it is possible to compile obj_EPG13.cpp on Windows and modify the line

system('./obj_EPG13');

in "obj_EPG13_cpp.m" to

system('obj_EPG13.exe');

The C++ EPG simulator should then run also on Windows machines.

###3. Choose the input parameters

The optimal control EPG design requires input parameters. Their are given in the file named info_NAME.m where they are listed. The B1 maps have to be presented as .mat file. Two examples are already given. You can open them to have more detailed instructions.

###4. The main function is MAIN.m .

After commenting the relevant sections, run the script all the way through.

optimal-control-epg's People

Contributors

shaihanmalik avatar alessandrosbrizzi 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.