From 908a91667c437f659a41810608a1e1d77c0d9a25 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Sat, 20 Apr 2024 09:30:03 -0400 Subject: [PATCH] Modify things. --- .../02_Volume-wise_T2star_estimation_with_t2smap.md | 2 +- content/Multi_Echo_Datasets.md | 2 +- content/TE_Dependence.md | 11 +++++++++-- content/book_utils.py | 3 ++- content/references.bib | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/content/02_Volume-wise_T2star_estimation_with_t2smap.md b/content/02_Volume-wise_T2star_estimation_with_t2smap.md index 700ff30..126fba7 100644 --- a/content/02_Volume-wise_T2star_estimation_with_t2smap.md +++ b/content/02_Volume-wise_T2star_estimation_with_t2smap.md @@ -14,7 +14,7 @@ kernelspec: # Volume-wise T2*/S0 estimation with `t2smap` Use {py:func}`tedana.workflows.t2smap_workflow` {cite:p}`DuPre2021` to calculate volume-wise T2*/S0, -as in {cite:t}`power2018ridding` and {cite:t}`HEUNIS2021118244`. +as in {cite:t}`power2018ridding` and {cite:t}`heunis2021effects`. ```{code-cell} ipython3 import os diff --git a/content/Multi_Echo_Datasets.md b/content/Multi_Echo_Datasets.md index 871dba8..7c02dae 100644 --- a/content/Multi_Echo_Datasets.md +++ b/content/Multi_Echo_Datasets.md @@ -80,7 +80,7 @@ Accessing this dataset requires a data access application. **Link**: https://doi.org/10.34894/R1TNL8 -**Citation**: {cite:t}`HEUNIS2021118244` +**Citation**: {cite:t}`heunis2021effects` **Brief Description**: 28 participants, with one run of resting-state, one run of emotion-processing task, one run of imagined emotion-processing task, diff --git a/content/TE_Dependence.md b/content/TE_Dependence.md index c07ea29..1f25240 100644 --- a/content/TE_Dependence.md +++ b/content/TE_Dependence.md @@ -423,8 +423,15 @@ mean_s0 = 16000 s0_std = mean_s0 * frac # simulate the T2*/S0 time series -t2s_ts = np.random.normal(loc=mean_t2s, scale=t2s_std, size=(n_trs + 20,)) -t2s_ts = signal.convolve(t2s_ts, hrf)[20 : n_trs + 20] +scales = np.random.random(5) * 3 +t2s_ts = [] +for section in range(10): + ts = np.hstack((np.zeros(10), np.ones(20), np.zeros(10))) + ts *= scales[section] + t2s_ts.append(ts) + +t2s_ts = np.hstack(t2s_ts)[:n_trs + 20] +t2s_ts = signal.convolve(t2s_ts, hrf)[:n_trs] t2s_ts *= t2s_std / np.std(t2s_ts) t2s_ts += mean_t2s - np.mean(t2s_ts) diff --git a/content/book_utils.py b/content/book_utils.py index 17eb9bd..350354e 100644 --- a/content/book_utils.py +++ b/content/book_utils.py @@ -1,4 +1,5 @@ """Utility functions for the JupyterBook.""" + import numpy as np from nilearn import image, masking @@ -95,7 +96,7 @@ def predict_bold_signal(echo_times, s0, t2s): Echo times for which to predict data, in milliseconds. s0 : numpy.ndarray of shape (time,) S0 time series. - t2s : numpy.ndarray of shpae (time,) + t2s : numpy.ndarray of shape (time,) T2* time series. Returns diff --git a/content/references.bib b/content/references.bib index 542eae5..c55013b 100644 --- a/content/references.bib +++ b/content/references.bib @@ -12,7 +12,7 @@ @article{power2018ridding publisher={National Acad Sciences} } -@article{HEUNIS2021118244, +@article{heunis2021effects, title = {The effects of multi-echo fMRI combination and rapid T2*-mapping on offline and real-time BOLD sensitivity}, journal = {NeuroImage}, volume = {238},