Skip to content

Commit ccac02c

Browse files
committed
add DRO, small changes to simulation
1 parent d0a996f commit ccac02c

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

doc/create_local_copy_of_repository.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ The instructions outlined below shows a few (but far from all) ways for creating
88
# Alternative approach
99
- Create a github user
1010
- `git clone <repository name>`
11-
- e.g. `git clone git@github.com:DKuppens/TF2.4_IVIM_code_collection.git`
11+
- e.g. `git clone git@github.com:OSIPI/TF2.4_IVIM-MRI_CodeCollection.git`

utils/data_simulation/ivim_simulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def simulate_ivim_signal(D, Dp, f, S0, bvalues, SNR_array, rg):
2828
simulated_data = simulated_data.cpu().detach().numpy()
2929

3030
# create 2 signal arrays filled with gaussian noise
31-
noise_real = rg.normal(0, 1 / SNR_array, (1, len(bvalues)))
32-
noise_imag = rg.normal(0, 1 / SNR_array, (1, len(bvalues)))
31+
noise_real = rg.normal(0, 1 / SNR, (1, len(bvalues)))
32+
noise_imag = rg.normal(0, 1 / SNR, (1, len(bvalues)))
3333

3434
# add Rician noise to the simulated data
3535
simulated_data = np.sqrt(np.power(simulated_data + noise_real, 2) + np.power(noise_imag, 2)).squeeze()
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
The digital reference object (DRO.npy) is a numpy array containing the following fields:
2+
- `DRO['D']`: value of diffusion coefficient used for generating signal
3+
- `DRO['f']`: value of perfusion fraction used for generating signal
4+
- `DRO['Dp']`: value of pseudo-diffusion coefficient used for generating signal
5+
- `DRO['S0']`: value of signal at b=0 used for generating signal
6+
- `DRO['bvals']`: numpy array of b-values used for generating signal
7+
- `DRO['signals']`: numpy array of signals generated using the above parameters
8+
9+
The DRO can be loaded using the following code:
10+
data = np.load('DRO.npy', allow_pickle=True)

0 commit comments

Comments
 (0)