Skip to content

Commit

Permalink
[DOC] Move notebooks from docs to examples (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo authored Nov 12, 2019
1 parent 8e565f6 commit e3bffbc
Show file tree
Hide file tree
Showing 8 changed files with 671 additions and 660 deletions.
Binary file modified docs/_static/b01_simulated_fluctuations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/b02_model_fits.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/b03_component_timeseries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/b04_echo_timeseries.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/b05_component_model_fits.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
641 changes: 0 additions & 641 deletions docs/_static/plot_metric_simulations.ipynb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# Generate plots for optimal combination workflow\n",
"# Generate tedana walkthrough figures\n",
"\n",
"This notebook generates figures used in tedana's detailed workflow documentation.\n",
"\n",
"What was run:\n",
"\n",
Expand All @@ -20,7 +22,7 @@
" ${dset_dir}/sub-001_task-checkerboard_echo-7_bold.nii.gz \\\n",
" ${dset_dir}/sub-001_task-checkerboard_echo-8_bold.nii.gz \\\n",
" -e 9.58 21.95 34.32 46.69 59.06 71.43 83.8 96.17 --debug \\\n",
" --tedpca kundu --gscontrol t1c --seed 1 --png --verbose \\\n",
" --tedpca kundu --gscontrol t1c --seed 1 --verbose \\\n",
" --out-dir /Users/tsalo/Documents/tsalo/tedana-comparison/sandbox/e8-checkerboard-example\n",
"```"
]
Expand Down Expand Up @@ -62,6 +64,7 @@
"# Load data\n",
"DATA_DIR = '/Users/tsalo/Documents/me-dsets/logans_dset/sub-001/func/'\n",
"TED_DIR = '/Users/tsalo/Documents/tsalo/tedana-comparison/sandbox/e8-checkerboard-example/'\n",
"OUT_DIR = '../docs/_static/'\n",
"FILES = ['sub-001_task-checkerboard_echo-1_bold.nii.gz',\n",
" 'sub-001_task-checkerboard_echo-2_bold.nii.gz',\n",
" 'sub-001_task-checkerboard_echo-3_bold.nii.gz',\n",
Expand Down Expand Up @@ -115,7 +118,7 @@
"n_trs = data[0].shape[0]\n",
"\n",
"# Component table\n",
"df = pd.read_csv(op.join(TED_DIR, 'comp_table_ica.txt'),\n",
"df = pd.read_csv(op.join(TED_DIR, 'comp_table_ica.tsv'),\n",
" sep='\\t', index_col='component')\n",
"\n",
"pal = sns.color_palette('cubehelix', n_echoes)"
Expand Down Expand Up @@ -190,7 +193,7 @@
"axes[-1].set_xlabel('Time', fontsize=16)\n",
"axes[-1].set_xlim(0, len(ts[i_echo])-1)\n",
"fig.tight_layout()\n",
"fig.savefig('a01_echo_timeseries.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a01_echo_timeseries.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -230,7 +233,7 @@
"ax.set_xlim(0, 100)\n",
"ax.set_ylim(0, 16000)\n",
"fig.tight_layout()\n",
"fig.savefig('a02_echo_value_distributions.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a02_echo_value_distributions.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -271,7 +274,7 @@
"plotting.plot_stat_map(adaptive_mask_file, vmax=10, alpha=1,\n",
" draw_cross=False, colorbar=True,\n",
" annotate=False, bg_img=None, figure=fig, axes=ax)\n",
"fig.savefig('a03_adaptive_mask.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a03_adaptive_mask.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -312,7 +315,7 @@
"ax.tick_params(axis='both', which='major', labelsize=14)\n",
"\n",
"fig.tight_layout()\n",
"fig.savefig('a04_echo_log_value_distributions.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a04_echo_log_value_distributions.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -386,7 +389,7 @@
" bbox=dict(fc=\"white\", ec=\"black\", lw=1))\n",
"\n",
"fig.tight_layout()\n",
"fig.savefig('a05_loglinear_regression.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a05_loglinear_regression.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -435,7 +438,7 @@
" bbox=dict(fc=\"white\", ec=\"black\", lw=1))\n",
"\n",
"fig.tight_layout()\n",
"fig.savefig('a06_monoexponential_decay_model.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a06_monoexponential_decay_model.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -481,7 +484,7 @@
"legend = ax.legend(frameon=True, fontsize=16)\n",
"\n",
"fig.tight_layout()\n",
"fig.savefig('a07_monoexponential_decay_model_with_t2.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a07_monoexponential_decay_model_with_t2.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -514,7 +517,7 @@
"ax.set_xlabel('Echo Time (ms)', fontsize=16)\n",
"ax.tick_params(axis='both', which='major', labelsize=14)\n",
"fig.tight_layout()\n",
"fig.savefig('a08_optimal_combination_echo_weights.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a08_optimal_combination_echo_weights.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -564,7 +567,7 @@
"legend = ax.legend(frameon=True, fontsize=16)\n",
"\n",
"fig.tight_layout()\n",
"fig.savefig('a09_optimal_combination_value_distributions.png', dpi=400)\n"
"fig.savefig(op.join(OUT_DIR, 'a09_optimal_combination_value_distributions.png'), dpi=400)\n"
]
},
{
Expand Down Expand Up @@ -606,7 +609,7 @@
"axes[-1].set_xlim(0, len(ts[i_echo])-1)\n",
"ax.tick_params(axis='both', which='major', labelsize=14)\n",
"fig.tight_layout()\n",
"fig.savefig('a10_optimal_combination_timeseries.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a10_optimal_combination_timeseries.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -657,7 +660,7 @@
"axes[1].tick_params(axis='both', which='major', labelsize=12)\n",
"axes[2].tick_params(axis='both', which='major', labelsize=12)\n",
"fig.tight_layout()\n",
"fig.savefig('a11_pca_component_timeseries.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a11_pca_component_timeseries.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -693,7 +696,7 @@
"ax.set_xticks([])\n",
"ax.set_xlabel('Time', fontsize=16)\n",
"ax.tick_params(axis='both', which='major', labelsize=14)\n",
"fig.savefig('a12_pca_reduced_data.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a12_pca_reduced_data.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -751,7 +754,7 @@
"axes[1].tick_params(axis='both', which='major', labelsize=12)\n",
"axes[2].tick_params(axis='both', which='major', labelsize=12)\n",
"fig.tight_layout()\n",
"fig.savefig('a13_ica_component_timeseries.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a13_ica_component_timeseries.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -824,7 +827,7 @@
" legend = ax.legend(frameon=True, fontsize=14, ncol=3)\n",
" ax.set_title('ICA Component {}'.format(comp), fontsize=16)\n",
" fig.tight_layout()\n",
" fig.savefig('a14_te_dependence_models_component_{}.png'.format(i), dpi=400)"
" fig.savefig(op.join(OUT_DIR, 'a14_te_dependence_models_component_{}.png').format(i), dpi=400)"
]
},
{
Expand Down Expand Up @@ -878,7 +881,7 @@
"axes[2].tick_params(axis='both', which='major', labelsize=12)\n",
"fig.tight_layout()\n",
"\n",
"fig.savefig('a15_denoised_data_timeseries.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a15_denoised_data_timeseries.png'), dpi=400)"
]
},
{
Expand Down Expand Up @@ -927,7 +930,7 @@
"axes[0].tick_params(axis='both', which='major', labelsize=12)\n",
"axes[1].tick_params(axis='both', which='major', labelsize=12)\n",
"fig.tight_layout()\n",
"fig.savefig('a16_t1c_denoised_data_timeseries.png', dpi=400)"
"fig.savefig(op.join(OUT_DIR, 'a16_t1c_denoised_data_timeseries.png'), dpi=400)"
]
}
],
Expand Down
649 changes: 649 additions & 0 deletions examples/plot_metric_simulations.ipynb

Large diffs are not rendered by default.

0 comments on commit e3bffbc

Please sign in to comment.