{ "cells": [ { "cell_type": "markdown", "id": "warming-county", "metadata": {}, "source": [ "# Diffusion Encoding Gradients Example" ] }, { "cell_type": "code", "execution_count": 1, "id": "hearing-laundry", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Building GrOpt . . .\n" ] }, { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "import os\n", "\n", "os.chdir(\"./python/\")\n", "\n", "import build_gropt\n", "build_gropt.build_gropt()\n", "import gropt\n", "\n", "from helper_utils import *\n", "from interactive_plots import plot_waveform_interactive\n", "from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot\n", "from IPython.core.display import display, HTML\n", "init_notebook_mode(connected = True)\n", "config={'showLink': False, 'displayModeBar': False}\n", "from timeit import default_timer as timer\n", "\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "id": "official-gallery", "metadata": {}, "source": [ "## Constraints on:\n", "- Maximum gradient amplitude: params['gmax']\n", "- Maximum slew rate: params['smax']\n", "- Zero gradient moment = 0 (mT*ms)/m\n", "- Add objective function to maximize b-value\n", "- Add constraint to turn gradients off during excitation RF (T_90), refocusing RF (T_180), and ADC readout (T_redout)" ] }, { "cell_type": "code", "execution_count": 2, "id": "democratic-brass", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Minimum TE = 69.06 ms\n" ] }, { "data": { "text/html": [ "\n", "
\n", "\n", "