Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 24 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,51 @@ The implementation is based on Ben-Eliezer et al. 2015 (https://doi.org/10.1002/

## Install

Recommended and tested is to clone git repository.
From the repository root, run with a name of your choice:
Recommended and tested is to clone the git repository.
From the repository root, create a conda environment with an `env_name` of your choice by running:

`conda env create -f environment.yml -n <env_name>`
```shell
conda env create -f environment.yml -n env_name

`conda activate <env_name>`
conda activate env_name
```

If you don't have a conda installation,
we recommend using [Miniforge](https://conda-forge.org/miniforge/).
You should also consider calling `mamba` instead of `conda` for a faster resolution of dependencies.

## Usage

The Package contains simulation of dictionary databases as well as the fitting of data to such databases.

#### Simulation
To simulate with configuration found in the "example/simulate" folder run:

`python simulate.py`
To simulate with the configuration found in the `example/simulate` folder run:

```shell
python simulate.py
```

To see all options run

`python simulate.py --help`

```shell
python simulate.py --help
```

The simulation needs information about Gradients and RF events.
The basic inputs can be seen in the "example/simulate/emc_params.json" file.
Default configuration will create a database and some plots within the "example/simulate/" folder.

The basic inputs can be seen in the `example/simulate/emc_params.json` file.
The default configuration will create a database and plots within the `example/simulate/` folder.

#### Fit
To fit with a configuration found in the "example/fit" folder run:

`python fit.py`
To fit with the configuration found in the `example/fit` folder run:

`python fit.py`

To see all options run

`python fit.py --help`


The fit can take additional input files and needs specification of data and database.
The basic inputs can be seen in the "example/fit/fit_config.json" file.
Default configuration will use the data within the "examples/fit" folder and b1 regularization.


The basic inputs can be seen in the `example/fit/fit_config.json` file.
The default configuration will use the data within the `examples/fit` folder and b1 regularization.
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: emc_env
channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- pandas=2.0.3
Expand All @@ -13,4 +12,5 @@ dependencies:
- plotly=5.16.1
- simple-parsing
- tqdm
- nibabel
- nibabel
- wandb