Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples gallery #47

Closed
wants to merge 82 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
c02e845
Docstrings for storing HRFs in snirf
jccutler Sep 6, 2024
9f35b95
fix in datasets.get_colin27_segmentation which stumbled over subdirec…
emiddell Sep 8, 2024
9957956
temporarily disable image reco in docs
emiddell Sep 8, 2024
a9c46fe
fix in datasets.get_colin27_segmentation
emiddell Sep 8, 2024
9b22feb
validated example_plots & photogrammetry, minof updated docu, added C…
avolu Sep 8, 2024
2549e90
Update Makefile
avolu Sep 8, 2024
fbbdefa
Update Makefile
avolu Sep 8, 2024
7dfb316
Update README.md
avolu Sep 8, 2024
3faa142
enable image_reco example with updated flags for chosing dataset, hea…
emiddell Sep 8, 2024
c5a7853
minor fixes
avolu Sep 8, 2024
75f1d4e
add cedalion/vis/__init__.py
emiddell Sep 8, 2024
d189185
added a few example "Initial Contributors". to be completed after rel…
avolu Sep 8, 2024
456fe2f
switch imagereco example to colin27
emiddell Sep 8, 2024
da8288a
add more datasets and some more guidance to test_installation.ipynb
emiddell Sep 8, 2024
7945f1d
Update photogrammetric_optode_coregistration.ipynb
avolu Sep 8, 2024
ad9ebfc
minor fixes
avolu Sep 8, 2024
46840ed
Update contributing_code.md
avolu Sep 8, 2024
c6ea209
Update contributing_code.md
avolu Sep 8, 2024
d329731
use derived surfaces from new colin27 segmentation in 10-10 example
emiddell Sep 8, 2024
124fae0
Colin27 reference
jccutler Sep 9, 2024
073651b
Merge branch 'main' into josef
jccutler Sep 9, 2024
3b94974
Create head_models.ipynb
avolu Sep 9, 2024
e1e9ad5
Docstrings relevant to Glm basis functions
jccutler Sep 9, 2024
c5accd6
Docstrings for glm fingertapping
jccutler Sep 9, 2024
f8adcd7
Docstrings relevant to viz. examples notebook
jccutler Sep 9, 2024
b0847f4
added recording container overview with indexing documentation
avolu Sep 9, 2024
212443f
Update recording.ipynb
avolu Sep 9, 2024
3211bc7
Update recording.ipynb
avolu Sep 9, 2024
784064e
Update recording.ipynb
avolu Sep 9, 2024
5eefe1e
progress on matching the scaling with qt-nirs
lauracarlton Sep 9, 2024
c4d1172
updates to use simple_scalp_plot
lauracarlton Sep 9, 2024
6a9346b
add doc_strings to quality functions
lauracarlton Sep 9, 2024
abd30f0
bugfix in OptodeSelector
emiddell Sep 9, 2024
46bdeeb
replaced scalp plot implementation
emiddell Sep 9, 2024
7e67764
normalization factor in psp and better cardiac extraction at lower sa…
emiddell Sep 9, 2024
abaaacf
updates to motion correction example notebook
lauracarlton Sep 9, 2024
3cbdf39
add contributors to synthetic_hrf.py
lauracarlton Sep 9, 2024
d44bc56
adapt scalp plots in notebooks
emiddell Sep 9, 2024
8df71da
Merge branch 'main' into psp_eike
emiddell Sep 9, 2024
f54f41d
Merge remote-tracking branch 'origin/PSP-fix' into psp_eike
emiddell Sep 9, 2024
09720df
Merge remote-tracking branch 'origin/josef' into main
emiddell Sep 9, 2024
fb8d5a7
Recording docstrings
jccutler Sep 10, 2024
7338781
Merge branch 'main' into josef
jccutler Sep 10, 2024
4320aff
Misc. docstrings
jccutler Sep 10, 2024
a325786
Merge pull request #40 from ibs-lab/josef
emiddell Sep 10, 2024
ba911f2
Update finger_tapping_lda_classification.ipynb
avolu Sep 10, 2024
a0462a4
Rename example notebooks and update in makefile for better order on d…
avolu Sep 10, 2024
03323ab
add missing voxels_from_segmentation function
harmening Sep 10, 2024
cbc4947
Update Makefile
avolu Sep 10, 2024
739382b
Update Makefile
avolu Sep 10, 2024
277295d
Update Makefile
avolu Sep 10, 2024
8b5960b
Update Makefile
avolu Sep 10, 2024
361b262
Update Makefile
avolu Sep 10, 2024
593ee7a
Update 50_finger_tapping_lda_classification.ipynb
avolu Sep 10, 2024
c30c986
Updated fingertapping notebook
avolu Sep 11, 2024
bb0ee10
added limitations note to notebook
avolu Sep 11, 2024
0e7ca34
bug fix to _psp_alternate so window times are compatible
lauracarlton Sep 11, 2024
fca1ac0
more sensible parameters in glm basis functions example
emiddell Sep 11, 2024
31803e0
intro notebooks for dataclasses, crs and head model
emiddell Sep 11, 2024
42b469a
Merge remote-tracking branch 'origin/psp_eike' into psp_eike_integration
emiddell Sep 11, 2024
47520d2
fix inverted logic in id_motion_refine
emiddell Sep 11, 2024
7ef84f2
use units for splineSG parameter
emiddell Sep 11, 2024
4d472e3
fix counting of motion artifacts
emiddell Sep 12, 2024
43142b4
add units to frame_size
emiddell Sep 12, 2024
3ae79f5
add visualization to head model example
emiddell Sep 12, 2024
a52c6a3
add WIP to title of motion and artefacts correction example
emiddell Sep 12, 2024
66514ce
Revert "add WIP to title of motion and artefacts correction example"
emiddell Sep 12, 2024
d9b9227
add WIP to motion artefact example notebook
emiddell Sep 12, 2024
1e5d56e
Merge branch 'psp_eike_integration2' into main
emiddell Sep 12, 2024
e9670e7
Update 21_data_quality_and_pruning.ipynb
avolu Sep 12, 2024
4a30e76
add missing voxels_from_segmentation function
harmening Sep 10, 2024
135c0ca
fix typo
emiddell Sep 14, 2024
fc3e209
add voxel class
harmening Sep 14, 2024
972ff25
Merge remote-tracking branch 'origin/hm-bugfix' into main
emiddell Sep 14, 2024
731ad5a
add Voxels to cdc.__init__
emiddell Sep 14, 2024
d7e9f82
Created examples gallery
jccutler Sep 23, 2024
76bf3a6
Enabled collapsible subcategories in sidebar
jccutler Sep 23, 2024
8abfcb1
Broken thumbnail bugfix
jccutler Sep 23, 2024
233a8e7
Remove temp images
jccutler Sep 23, 2024
0ef5f76
Synthetic artifacts first commit
jccutler Oct 4, 2024
11a8769
Scale spike by duration
jccutler Oct 4, 2024
0845d7a
Move artifact generation into dedicated functions
jccutler Oct 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ src/cedalion/_version.py

# rendered example notebooks
docs/examples/*.ipynb
docs/examples/*/*.ipynb

# API documentation from sphinx-apidoc
docs/api/*
Expand Down
9 changes: 9 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Intelligent Biomedical Sensing (IBS) Lab"
- family-names: "Cedalion Developers"
title: "Cedalion Python Toolbox"
version: 1.0.0
date-released: 2024-09-08
url: "https://github.com/ibs-lab/cedalion"
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ well as several [example notebooks](https://doc.ibs.tu-berlin.de/cedalion/doc/de
that illustrate the functionality of the toolbox.
For discussions and help you can visit the [cedalion forum on openfnirs.org](https://openfnirs.org/community/cedalion/)


## Development environment

To create a conda environment with the necessary dependencies run:
Expand Down Expand Up @@ -51,3 +52,7 @@ and then build the environment with the --solver=libmamba
```
$ conda env create -n cedalion -f environment_dev.yml --solver=libmamba
```

## How to cite Cedalion
A paper for the toolbox is currently in the making. If you use this toolbox for a publication in the meantime, please cite us using GitHub's "Cite this repository" feature in the "About" section. If you want to contact us or learn more about the IBS-Lab please go to https://www.ibs-lab.com/

Binary file added docs/_static/IBS_Logo_sm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 1 addition & 3 deletions docs/community/contributing_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ This section is WIP.
Here you will find information on how to interface your own developments with cedalion to facilitate contributing it to the toolbox to make it available to the broader community.
In the meantime, you can find a small introduction to how to contribute code to cedalion below:

```{toctree}
contributing_code/contributing_code.md
```
[Getting Started with Contributing Code](https://doc.ibs.tu-berlin.de/cedalion/doc/dev/getting_started/contributing_code/contributing_code.html)
2 changes: 1 addition & 1 deletion docs/community/contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This section is WIP. You will find more information and detailed stats here soon.

Cedalion is an open source project driven by the [IBS-Lab](https://ibs-lab.com/) with the aim to encourage continuous use, contribution and improvement from the whole community to make it last. Therefore, code credit is important to us.
Cedalion is an open source project driven by the [IBS-Lab](https://ibs-lab.com/) with the aim to encourage continuous use, contribution and improvement from the whole community to make it last. Therefore, it is important to us establish a transparent system of crediting contributors.


## Code Credit
Expand Down
4 changes: 2 additions & 2 deletions docs/community/toolboxes.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ This section is WIP.

A part of the core set of Cedalion's scientific fNIRS processing functionality is based on the matlab toolboxes [Homer2/3](https://github.com/BUNPC/Homer3) and [AtlasViewer](https://github.com/BUNPC/AtlasViewer) from which we have adopted methods into the python ecosystem.

## Current toolboxes cedalion interfaces with:
## Current toolboxes cedalion interfaces with
- [Monte Carlo Xtreme](http://mcx.space/), for Monte-Carlo-based photon simulation
- [NIRFASTer](https://github.com/nirfaster/NIRFASTer), for FEM-based photon simulation

## Planned future toolboxes:
## Planned future toolboxes
- [MNE](https://mne.tools/stable/index.html), for state of the art EEG/MEG processing functionality
- [NeuroKit](https://github.com/neuropsychology/NeuroKit), for Neurophysiological Signal Processing
- [...?](https://openfnirs.org/software/)
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,8 @@

# -- sphinx_autodoc_typehints -------------------------------------------------
always_use_bars_union = True

# -- Nbsphinx gallery ----------------------------------------------------------------
nbsphinx_thumbnails = {
'examples/*/*': '_static/IBS_Logo_sm.png',
}
62 changes: 62 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Examples
========

.. contents::
:local:

Getting Started and IO
----------------------

.. nbgallery::
:glob:

examples/getting_started_io/*

Signal Quality
-----------------------

.. nbgallery::
:glob:

examples/signal_quality/*

Modeling
-----------------------

.. nbgallery::
:glob:

examples/modeling/*

Head Models and Image Reconstruction
-------------------------------------

.. nbgallery::
:glob:

examples/head_models/*

Machine Learning and Data Driven Methods
----------------------------------------

.. nbgallery::
:glob:

examples/machine_learning/*

Data Augmentation
-----------------------

.. nbgallery::
:caption: Coming soon
:glob:

examples/data_augmentation/*

Plots & Visualization
-----------------------

.. nbgallery::
:glob:

examples/plots_visualization/*
37 changes: 19 additions & 18 deletions docs/examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
EXAMPLE_NOTEBOOKS = xarray_datastructs_fnirs.ipynb \
finger_tapping_lda_classification.ipynb \
scalp_coupling_index.ipynb \
1010_system.ipynb \
image_reconstruction.ipynb \
store_hrfs_in_snirf_file.ipynb \
recording.ipynb \
glm_basis_functions.ipynb \
glm_illustrative_example.ipynb \
glm_fingertapping_example.ipynb

#photogrammetric_optode_coregistration.ipynb \
#pruning_and_motion_artifacts.ipynb \
EXAMPLE_NOTEBOOKS = getting_started_io/00_test_installation.ipynb \
getting_started_io/10_xarray_datastructs_fnirs.ipynb \
getting_started_io/11_recording_container.ipynb \
getting_started_io/13_data_structures_intro.ipynb \
getting_started_io/34_store_hrfs_in_snirf_file.ipynb \
plots_visualization/12_plots_example.ipynb \
machine_learning/50_finger_tapping_lda_classification.ipynb \
modeling/31_glm_basis_functions.ipynb \
modeling/32_glm_fingertapping_example.ipynb \
modeling/33_glm_illustrative_example.ipynb \
signal_quality/20_scalp_coupling_index.ipynb \
signal_quality/21_data_quality_and_pruning.ipynb \
signal_quality/22_motion_artefacts_and_correction.ipynb \
head_models/40_image_reconstruction.ipynb \
head_models/41_photogrammetric_optode_coregistration.ipynb \
head_models/42_1010_system.ipynb \
head_models/43_crs_and_headmodel.ipynb

.PHONY: notebooks

notebooks: $(EXAMPLE_NOTEBOOKS)

$(EXAMPLE_NOTEBOOKS) : %.ipynb : ../../examples/%.ipynb
$(EXAMPLE_NOTEBOOKS): %.ipynb : ../../examples/%.ipynb
jupyter nbconvert --ExecutePreprocessor.store_widget_state=True --to notebook \
--execute --output-dir=. $^

clean:
rm -f $(EXAMPLE_NOTEBOOKS)
--execute --output-dir=$(dir $@) $<
9 changes: 0 additions & 9 deletions docs/examples/index.md

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/recording/ndarray.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 added docs/img/recording/rec_container_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# Cedalion

![cedalion graphical abstract](/docs/img/cedalion_frontpage.png)
![cedalion graphical abstract](img/cedalion_frontpage.png)

A python-based framework for the data driven analysis of multimodal fNIRS and DOT in naturalistic environments. Developed by the Intelligent Biomedical Sensing (IBS) Lab with and for the community.

```{toctree}
:maxdepth: 1
:caption: Contents
:titlesonly:

rationale.md
getting_started/index.md
data_structures/index.md
examples/index.md
examples
community/index.md
API <api/modules.rst>
references.rst
Expand All @@ -21,7 +20,7 @@ LICENSE.md

## Special Thanks
We cordially thank our friends and long-term collaborators at the BOAS Lab for their contributions and support in starting this project.
![special thanks](/docs/img/special_thanks.png)
![special thanks](img/special_thanks.png)

## Version
This documentation was built from commit {{commit_hash}}.
14 changes: 14 additions & 0 deletions docs/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -186,3 +186,17 @@ @misc{Luke2021
year = {2021},
url = {https://github.com/rob-luke/BIDS-NIRS-Tapping}
}

@article{Holmes1998,
title={Enhancement of MR Images Using Registration for Signal Averaging},
author={Holmes, Colin J. and Hoge, Rick and Collins, Louis and Woods, Roger and Toga, Arthur W. and Evans, Alan C.},
journal={Journal of Computer Assisted Tomography},
volume={22},
number={2},
pages={324--333},
year={1998},
month={March},
publisher={Lippincott Williams \& Wilkins},
url={https://journals.lww.com/jcat/abstract/1998/03000/enhancement_of_mr_images_using_registration_for.32.aspx},
doi={10.1097/00004728-199803000-00032}
}
Loading
Loading