<commit_before>DCEMRI.jl
=========

A Fast, Validated Open Source Toolkit for Dynamic Contrast Enhanced MRI Analysis

## Why Julia?

From the [Julia website](http://julialang.org/),

> Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library. The library, largely written in Julia itself, also integrates mature, best-of-breed C and Fortran libraries for linear algebra, random number generation, signal processing, and string processing.

Put simply, it looks like Matlab, which is simple to learn and familiar to most MRI researchers, but it works better and faster and is completely free.  In particular, for the problem of DCE MRI, Julia's simple and flexible parallel computing model allows almost perfect parallelization of the nonlinear least squares fitting problem.  In my informal testing, the intrinsic speed of Julia coupled to my parallel implementation produced a factor of 20-40 speedup over comparable Matlab and Python.

## Installation

1. To get running, you need two things for sure: Julia and __DCEMRI.jl__.
The simplest way to get Julia is to download the current release version from [julialang.org](http://julialang.org/downloads/).

2. Once Julia is installed, open it. You should see a terminal window with the `julia>` prompt.  This is analogous to the command line in Matlab.
To install __DCEMRI.jl__, run
```
julia> Pkg.clone("http://github.com/davidssmith/DCEMRI.jl")
```
at the `julia>` prompt.

3. (Optional) If you want to __DCEMRI.jl__ to create plots for you, you also need Python with [Matplotlib](http://matplotlib.org/) installed.
To install Matplotlib on most machines, you can run `easy_install matplotlib`.  If that doesn't work, you can try `pip install matplotlib`.
If neither works, see the Matplotlib [install FAQ](http://matplotlib.org/faq/installing_faq.html).

Now you're ready to roll!

## A Note about Units

All units in the code are SI where possible.  Sometimes, due to numerical accuracy issues, they have been converted internally. But all data should be supplied to the code in SI units.  In particular, time should be in seconds, and relaxation rates in inverse seconds.  Flip angles should be in degrees. The one exception to this in the output is that in the Tofts-Kety models Ktrans is in min^-1.

## Running the Code

### As a Julia module<commit_msg>fixed enumerate bug in README<commit_after>DCEMRI.jl
=========

A Fast, Validated Open Source Toolkit for Dynamic Contrast Enhanced MRI Analysis

## Why Julia?

From the [Julia website](http://julialang.org/),

> Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library. The library, largely written in Julia itself, also integrates mature, best-of-breed C and Fortran libraries for linear algebra, random number generation, signal processing, and string processing.

Put simply, it looks like Matlab, which is simple to learn and familiar to most MRI researchers, but it works better and faster and is completely free.  In particular, for the problem of DCE MRI, Julia's simple and flexible parallel computing model allows almost perfect parallelization of the nonlinear least squares fitting problem.  In my informal testing, the intrinsic speed of Julia coupled to my parallel implementation produced a factor of 20-40 speedup over comparable Matlab and Python.

## Installation

Installation is simple.  First you need Julia.
The simplest way to get Julia is to grab the current release version from [julialang.org](http://julialang.org/downloads/).

Next you need __DCEMRI.jl__.  Open Julia. You should see a terminal window with the `julia>` prompt.  This is analogous to the command line in Matlab.
To install __DCEMRI.jl__, run
```
julia> Pkg.clone("http://github.com/davidssmith/DCEMRI.jl")
```
at the `julia>` prompt.

(Optional) Finalyl, if you want to __DCEMRI.jl__ to create plots for you, you also need Python with [Matplotlib](http://matplotlib.org/) installed.
Most machines probably already have a version of Python installed.  It is a ubiquitous scripting language.  To install Matplotlib on top of it, you can run `easy_install matplotlib`.  If that doesn't work, you can try `pip install matplotlib`.
If neither works, see the Matplotlib [install FAQ](http://matplotlib.org/faq/installing_faq.html).  If you don't have Python at all for some reason, you can grab the excellent [Anaconda distribution](https://store.continuum.io/cshop/anaconda/), which comes with Matplotlib pre-installed.

Now you're ready to roll!

## A Note about Units

All units in the code are SI where possible.  Sometimes, due to numerical accuracy issues, they have been converted internally. But all data should be supplied to the code in SI units.  In particular, time should be in seconds, and relaxation rates in inverse seconds.  Flip angles should be in degrees. The one exception to this in the output is that in the Tofts-Kety models Ktrans is in min^-1.

## Running the Code

### As a Julia module
{'fraction_non_alphanumeric': 0.06490872210953347, 'fraction_numerical': 0.002397197123363452, 'mean_word_length': 4.673640167364017, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2782430', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1356, 'n_words': 755}