Skip to content

Commit 2f8062b

Browse files
committed
Now outputting CNR for gm-challenge data
1 parent 0e92170 commit 2f8062b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

process_data.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,14 @@ python ${PATH_TO_SCRIPT}/compute_contrast.py > contrast.txt
133133
file_results="${PATH_RESULTS}/results.csv"
134134
if [[ ! -e $file_results ]]; then
135135
# add a header in case the file does not exist yet
136-
echo "Subject,SNR_diff,SNR_single,Contrast" >> $file_results
136+
echo "Subject,SNR_diff,SNR_single,Contrast,CNR" >> $file_results
137137
fi
138-
echo "${SUBJECT},`cat snr_diff.txt`,`cat snr_single.txt`,`cat contrast.txt`" >> ${PATH_RESULTS}/results.csv
138+
snr_single=`cat snr_single.txt`
139+
snr_diff=`cat snr_diff.txt`
140+
contrast=`cat contrast.txt`
141+
cnr=`python ${PATH_TO_SCRIPT}/compute_cnr.py ${snr_diff} ${contrast}`
142+
echo "${SUBJECT},${snr_single},${snr_diff},${contrast},${cnr}" >> ${PATH_RESULTS}/results.csv
143+
139144

140145
# Verify presence of output files and write log file if error
141146
# ------------------------------------------------------------------------------

0 commit comments

Comments
 (0)