Skip to content

Commit d7df0ca

Browse files
committed
added a new column to csv and modified python file
1 parent baf5d4a commit d7df0ca

File tree

3 files changed

+35
-50
lines changed

3 files changed

+35
-50
lines changed

doc/code_contributions_record.csv

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ IVIM,Fitting,segmented LSQ fitting,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollecti
44
Tri-exponential,Fitting,LSQ fitting,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion,Amsterdam UMC,fit_least_squares_tri_exp/fit_least_squares_array_tri_exp,,tbd,,no
55
Tri-exponential,Fitting,Segmented LSQ fitting,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion,Amsterdam UMC,fit_segmented_tri_exp/fit_segmented_array_tri_exp,https://doi.org/10.3389/fphys.2022.942495,tbd,,OGC_AmsterdamUMC_biexp_segmented
66
IVIM,Fitting,Bayesian,,OGC_AmsterdamUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/OGC_AmsterdamUMC/,Oliver Gurney-Champion/Sebastiano Barbieri,Amsterdam UMC,fit_bayesian_array,https://doi.org/10.1002/mrm.28852,tbd,,OGC_AmsterdamUMC_Bayesian_biexp
7-
IVIM,Fitting,two-step segmented fit approach,also includes ADC calculation as a separate function,PvH_KB_NKI,TF2.4_IVIM-MRI_CodeCollection/src/original/PvH_KB_NKI/,Petra van Houdt/Stefan Zijlema/Koen Baas,the Netherlands Cancer Institute,DWI_functions_standalone.py,https://doi.org/10.3389/fonc.2021.705964,tbd,,PvH_KB_NKI_IVIMfit.py
7+
IVIM,Fitting,two-step segmented fit approach,also includes ADC calculation as a separate function,PvH_KB_NKI,TF2.4_IVIM-MRI_CodeCollection/src/original/PvH_KB_NKI/,Petra van Houdt/Stefan Zijlema/Koen Baas,the Netherlands Cancer Institute,DWI_functions_standalone.py,https://doi.org/10.3389/fonc.2021.705964,tbd,,PvH_KB_NKI_IVIMfit
88
IVIM,Fitting,two-step (segmented) LSQ fitting, cut-off chosen for brain data; option to fit IVIM with inversion recovery or without IR,PV_MUMC,TF2.4_IVIM-MRI_CodeCollection/src/original/PV_MUMC/,Paulien Voorter,Maastricht University Medical Center,two_step_IVIM_fit.py,,tbd,,PV_MUMC_biexp
99
IVIM,Fitting,bi-exponential NLLS,Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_biexp.py,Ivan A. Rashid,Lund University,IvimModelBiexp,tba,tbd,,IAR_LU_biexp
10-
IVIM,Fitting,2-step segmented NLLS,First estimates and fixes D before a bi-exponential NLLS fit. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_segmented_2step.py,Ivan A. Rashid,Lund University,IvimModelSegmented2Step,tba,tbd,,IAR_LU_segmented_2step.py
11-
IVIM,Fitting,3-step segmented NLLS,First estimates and fixes D followed by an estimate of D* followed by a bi-exponential NLLS fit. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_segmented_3step.py,Ivan A. Rashid,Lund University,IvimModelSegmented3Step,tba,tbd,,IAR_LU_segmented_3step.py
10+
IVIM,Fitting,2-step segmented NLLS,First estimates and fixes D before a bi-exponential NLLS fit. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_segmented_2step.py,Ivan A. Rashid,Lund University,IvimModelSegmented2Step,tba,tbd,,IAR_LU_segmented_2step
11+
IVIM,Fitting,3-step segmented NLLS,First estimates and fixes D followed by an estimate of D* followed by a bi-exponential NLLS fit. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_segmented_3step.py,Ivan A. Rashid,Lund University,IvimModelSegmented3Step,tba,tbd,,IAR_LU_segmented_3step
1212
IVIM,Fitting,2-step segmented NLLS,First estimates and fixes D. Subtracts the diffusion signal and estimated D*. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_subtracted.py,Ivan A. Rashid,Lund University,IvimModelSubtracted,tba,tbd,,IAR_LU_subtracted
1313
IVIM,Fitting,Variable projection,See referenced article. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_mix.py,Farooq et al. Modified by Ivan A. Rashid,Lund University,IvimModelVP,https://doi.org/10.1038/srep38927,tbd,,IAR_LU_modified_mix
14-
IVIM,Fitting,Variable projection,See referenced article. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_topopro.py,Fadnavis et al. Modified by Ivan A. Rashid,Lund University,IvimModelTopoPro,https://doi.org/10.3389/fnins.2021.779025,tbd,,IAR_LundUniversity_topopro
14+
IVIM,Fitting,Variable projection,See referenced article. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_topopro.py,Fadnavis et al. Modified by Ivan A. Rashid,Lund University,IvimModelTopoPro,https://doi.org/10.3389/fnins.2021.779025,tbd,,IAR_LU_modified_topopro
1515
IVIM,Fitting,Linear fit,Linear fit for D with extrapolation for f. Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_linear.py,Modified by Ivan A. Rashid,Lund University,IvimModelLinear,tba,tbd,,no
1616
IVIM,Fitting,sIVIM fit,NLLS of the simplified IVIM model (sIVIM). Supports units in mm2/s and µm2/ms,IAR_LundUniversity,TF2.4_IVIM-MRI_CodeCollection/src/original/IAR_LundUniversity/ivim_fit_method_modified_sivim.py,Modified by Ivan A. Rashid,Lund University,IvimModelsIVIM,tba,tbd,,no
1717
IVIM,Fitting,Segmented NLLS fitting,MATLAB code,OJ_GU,TF2.4_IVIM-MRI_CodeCollection/src/original/OJ_GU/,Oscar Jalnefjord,University of Gothenburg,IVIM_seg,https://doi.org/10.1007/s10334-018-0697-5,tbd,,OJ_GU_seg

utilities/repostatus.py

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import json
44

55
# directory of the current script
6-
script_dir = os.path.dirname(os.path.abspath(__file__))
6+
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
77

88
# path to the repository
9-
REPO_DIR = os.path.dirname(script_dir)
9+
REPO_DIR = os.path.dirname(SCRIPT_DIR)
1010

1111
CODE_CONTRIBUTIONS_FILE = os.path.join(REPO_DIR, "doc", "code_contributions_record.csv")
1212
ALGORITHMS_FILE = os.path.join(REPO_DIR, "tests", "IVIMmodels", "unit_tests", "algorithms.json")
@@ -31,33 +31,18 @@
3131
if not os.path.exists(subfolder_path):
3232
print(f"Warning: Subfolder '{subfolder}' does not exist in the source folder.")
3333

34-
# Add column 'Tested' to the DataFrame if it starts with that of subfolder
35-
df['Tested'] = df.apply(lambda row: 'Yes' if any(algorithm.startswith(row['subfolder'].split('_')[0]) for algorithm in all_algorithms) else 'No', axis=1)
36-
37-
# Parse files in the WRAPPED_FOLDER
38-
wrapped_algorithms = []
39-
for root, dirs, files in os.walk(WRAPPED_FOLDER):
40-
for file in files:
41-
if file.endswith('.py'):
42-
file_path = os.path.join(root, file)
43-
with open(file_path, 'r') as f:
44-
content = f.read()
45-
for algorithm in all_algorithms:
46-
if algorithm in content:
47-
wrapped_algorithms.append(algorithm)
48-
49-
# Add a column 'Wrapped' to the DataFrame
50-
df['Wrapped'] = df.apply(lambda row: 'Yes' if any(algorithm.startswith(row['subfolder'].split('_')[0]) for algorithm in wrapped_algorithms) else 'No', axis=1)
34+
# Add column 'Tested' to the DataFrame based on a match with algorithms and wrapped column
35+
df['Tested'] = df.apply(lambda row: 'Yes' if any(algorithm in row['wrapped'] for algorithm in all_algorithms) else 'No', axis=1)
5136

5237
# Select the desired columns
53-
df_selected = df[['Technique', 'subfolder', 'Authors', 'Tested', 'Wrapped']]
54-
df_selected.columns = ['Technique', 'Subfolder', 'Contributors', 'Tested', 'Wrapped']
38+
df_selected = df[['Technique', 'subfolder', 'Authors', 'Tested', 'wrapped']]
39+
df_selected.columns = ['Technique', 'Subfolder', 'Contributors', 'Tested', 'wrapped']
5540

5641
# Convert the DataFrame to HTML
5742
html_string = df_selected.to_html(index=False)
5843

5944
# Save the HTML to a file
60-
with open(os.path.join(REPO_DIR, 'combined_report.html'), 'w') as f:
45+
with open(os.path.join(REPO_DIR, 'website','combined_report.html'), 'w') as f:
6146
f.write(html_string)
6247

6348
# Printing message that report has been successfully generated

website/combined_report.html

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,142 +5,142 @@
55
<th>Subfolder</th>
66
<th>Contributors</th>
77
<th>Tested</th>
8-
<th>Wrapped</th>
8+
<th>wrapped</th>
99
</tr>
1010
</thead>
1111
<tbody>
1212
<tr>
1313
<td>IVIM</td>
1414
<td>OGC_AmsterdamUMC</td>
1515
<td>Oliver Gurney-Champion</td>
16-
<td>Yes</td>
17-
<td>Yes</td>
16+
<td>No</td>
17+
<td>no</td>
1818
</tr>
1919
<tr>
2020
<td>IVIM</td>
2121
<td>OGC_AmsterdamUMC</td>
2222
<td>Oliver Gurney-Champion</td>
2323
<td>Yes</td>
24-
<td>Yes</td>
24+
<td>OGC_AmsterdamUMC_biexp</td>
2525
</tr>
2626
<tr>
2727
<td>Tri-exponential</td>
2828
<td>OGC_AmsterdamUMC</td>
2929
<td>Oliver Gurney-Champion</td>
30-
<td>Yes</td>
31-
<td>Yes</td>
30+
<td>No</td>
31+
<td>no</td>
3232
</tr>
3333
<tr>
3434
<td>Tri-exponential</td>
3535
<td>OGC_AmsterdamUMC</td>
3636
<td>Oliver Gurney-Champion</td>
3737
<td>Yes</td>
38-
<td>Yes</td>
38+
<td>OGC_AmsterdamUMC_biexp_segmented</td>
3939
</tr>
4040
<tr>
4141
<td>IVIM</td>
4242
<td>OGC_AmsterdamUMC</td>
4343
<td>Oliver Gurney-Champion/Sebastiano Barbieri</td>
4444
<td>Yes</td>
45-
<td>Yes</td>
45+
<td>OGC_AmsterdamUMC_Bayesian_biexp</td>
4646
</tr>
4747
<tr>
4848
<td>IVIM</td>
4949
<td>PvH_KB_NKI</td>
5050
<td>Petra van Houdt/Stefan Zijlema/Koen Baas</td>
5151
<td>Yes</td>
52-
<td>Yes</td>
52+
<td>PvH_KB_NKI_IVIMfit</td>
5353
</tr>
5454
<tr>
5555
<td>IVIM</td>
5656
<td>PV_MUMC</td>
5757
<td>Paulien Voorter</td>
5858
<td>Yes</td>
59-
<td>Yes</td>
59+
<td>PV_MUMC_biexp</td>
6060
</tr>
6161
<tr>
6262
<td>IVIM</td>
6363
<td>IAR_LundUniversity</td>
6464
<td>Ivan A. Rashid</td>
6565
<td>Yes</td>
66-
<td>Yes</td>
66+
<td>IAR_LU_biexp</td>
6767
</tr>
6868
<tr>
6969
<td>IVIM</td>
7070
<td>IAR_LundUniversity</td>
7171
<td>Ivan A. Rashid</td>
7272
<td>Yes</td>
73-
<td>Yes</td>
73+
<td>IAR_LU_segmented_2step</td>
7474
</tr>
7575
<tr>
7676
<td>IVIM</td>
7777
<td>IAR_LundUniversity</td>
7878
<td>Ivan A. Rashid</td>
7979
<td>Yes</td>
80-
<td>Yes</td>
80+
<td>IAR_LU_segmented_3step</td>
8181
</tr>
8282
<tr>
8383
<td>IVIM</td>
8484
<td>IAR_LundUniversity</td>
8585
<td>Ivan A. Rashid</td>
8686
<td>Yes</td>
87-
<td>Yes</td>
87+
<td>IAR_LU_subtracted</td>
8888
</tr>
8989
<tr>
9090
<td>IVIM</td>
9191
<td>IAR_LundUniversity</td>
9292
<td>Farooq et al. Modified by Ivan A. Rashid</td>
9393
<td>Yes</td>
94-
<td>Yes</td>
94+
<td>IAR_LU_modified_mix</td>
9595
</tr>
9696
<tr>
9797
<td>IVIM</td>
9898
<td>IAR_LundUniversity</td>
9999
<td>Fadnavis et al. Modified by Ivan A. Rashid</td>
100100
<td>Yes</td>
101-
<td>Yes</td>
101+
<td>IAR_LU_modified_topopro</td>
102102
</tr>
103103
<tr>
104104
<td>IVIM</td>
105105
<td>IAR_LundUniversity</td>
106106
<td>Modified by Ivan A. Rashid</td>
107-
<td>Yes</td>
108-
<td>Yes</td>
107+
<td>No</td>
108+
<td>no</td>
109109
</tr>
110110
<tr>
111111
<td>IVIM</td>
112112
<td>IAR_LundUniversity</td>
113113
<td>Modified by Ivan A. Rashid</td>
114-
<td>Yes</td>
115-
<td>Yes</td>
114+
<td>No</td>
115+
<td>no</td>
116116
</tr>
117117
<tr>
118118
<td>IVIM</td>
119119
<td>OJ_GU</td>
120120
<td>Oscar Jalnefjord</td>
121121
<td>No</td>
122-
<td>No</td>
122+
<td>OJ_GU_seg</td>
123123
</tr>
124124
<tr>
125125
<td>IVIM</td>
126126
<td>OJ_GU</td>
127127
<td>Oscar Jalnefjord</td>
128128
<td>No</td>
129-
<td>No</td>
129+
<td>no</td>
130130
</tr>
131131
<tr>
132132
<td>IVIM</td>
133133
<td>OJ_GU</td>
134134
<td>Oscar Jalnefjord</td>
135135
<td>No</td>
136-
<td>No</td>
136+
<td>no</td>
137137
</tr>
138138
<tr>
139139
<td>IVIM</td>
140140
<td>ETP_SRI</td>
141141
<td>Eric Peterson</td>
142142
<td>Yes</td>
143-
<td>Yes</td>
143+
<td>ETP_SRI_LinearFitting</td>
144144
</tr>
145145
</tbody>
146146
</table>

0 commit comments

Comments
 (0)