Skip to content

Commit 2e048be

Browse files
committed
merge dev into parcel-voxel-information
2 parents e6d8ae4 + 6d9ab79 commit 2e048be

File tree

121 files changed

+8599
-5732
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+8599
-5732
lines changed

.github/workflows/run_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
10+
os: [ubuntu-latest, macos-14, macos-latest, windows-latest]
1111
runs-on: ${{ matrix.os }}
1212
defaults:
1313
run:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ src/cedalion/_version.py
169169
docs/examples/*.ipynb
170170
docs/examples/*/*.ipynb
171171

172+
# example plots
173+
examples/*/*.png
174+
examples/*/*.gif
175+
172176
# API documentation from sphinx-apidoc
173177
docs/api/*
174178
_autosummary*/

docs/CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,28 @@
55
### Added
66
- An example notebook for ICA source extraction was added, by [Jacqueline Behrendt](https://github.com/jackybehrendt12).
77
([#112](https://github.com/ibs-lab/cedalion/pull/112))
8+
- Added `TwoSurfaceHeadmodel.scale_to_headsize` and `TwoSurfaceHeadmodel.scale_to_landmarks` to adjust the head model's size to the head circumferences or digitized landmarks, respectively. By [Eike Middell](https://github.com/emiddell).
9+
- The factory method `cedalion.dot.get_standard_headmodel` to construct the `TwoSurfaceHeadModel` of the standard Colin27 and ICBM-152 heads was added, by [Eike Middell](https://github.com/emiddell).
10+
- Added `cedalion.xrutils.dot_dataarray_csr` for matrix products between `xr.DataArray`
11+
and `scipy.sparse` arrays, by [Eike Middell](https://github.com/emiddell).
812
### Changed
13+
- Refactored `cedalion.plots` into `cedalion.vis` and its subpackages. This cleans up the code structure and should help with discovering existing functions. The package `cedalion.vis.blocks` emphasizes building blocks for larger visualizations. Please refer to `examples/plots_visualization/12_plots_example.ipynb` to get an overview. Importing `cedalion.plots` will throw a deprecation warning to trigger adoption. By [Eike Middell](https://github.com/emiddell).
14+
- Renamed `LabeledPointCloud` to `LabeledPoints`.
15+
- Split up the `.nirs` submodule into `.nirs.cw`, `.nirs.fd` and `.nirs.td`.
16+
- Merged the submodules `cedalion.datasets` and `cedalion.data`. All functions to
17+
access example datasets are now available under `cedalion.data`.
18+
- The fiducial landmarks of the standard Colin27 and ICBM-152 heads changed. Using the landmark builder 10-10 coordinates were calculated for both heads. These are now
19+
available when head models are created with `get_standard_headmodel`. The example
20+
notebook `48_headmodel_landmarks_verification.ipynb` documents the origin of all
21+
landmarksand quantitatively compares the output of the LandmarkBuilder to published
22+
coordinates. By [Eike Middell](https://github.com/emiddell).
23+
- Added the parameter `mode` to `TwoSurfaceHeadModel.align_and_snap_to_scalp` to switch
24+
between constrained affine transformations (translation, rotation, isotropic scaling)
25+
and unconstrained affine transformations (also anisotropic scaling, shearing and reflection). The default behaviour from `align_and_snap_to_scalp` was changed from
26+
constrained to unconstrained affine transformations.
27+
- The image reconstruction methods were refactored to offer more regularization methods
28+
(including spatial basis functions) as well as direct and indirect reconstructions and to provide a simpler interface to the user. All functions are now located under `cedalion.dot`. By [Laura Carlton](https://github.com/lauracarlton), [Alexander von Lühmann](https://github.com/avolu) and [Eike Middell](https://github.com/emiddell). ([#130](https://github.com/ibs-lab/cedalion/pull/86))
29+
- For the Colin27 and ICBM-152 heads the label for the coordinate reference system was changed from `'aligned'` to `'mni'`.
930
- The ninja HD and UHD cap coordinates were changed from a right-handed to a left-handed
1031
coordinate system, by [Nils Harmening](https://github.com/harmening). ([#110](https://github.com/ibs-lab/cedalion/pull/110))
1132
- Changed the names of several motion correction algorithms from `motion_correct.motion_correct_X`
@@ -34,7 +55,7 @@ All dependencies have been updated to recent versions. Please rebuild the enviro
3455
- Spatial and measurement noise regularization options in image reconstruction, by [David Boas](https://github.com/dboas). ([#86](https://github.com/ibs-lab/cedalion/pull/86))
3556
- Improved import of optode and electrode coordinates, by [Nils Harmening](https://github.com/harmening). ([#95](https://github.com/ibs-lab/cedalion/pull/95))
3657
- The interfaces for the fluence and sensitivity computations were changed to allow out-of-core computations, by [Eike Middell](https://github.com/emiddell).
37-
- Precomputed sensitivities for all example datasets, including the ninjaCap whole head probe, are availabe in cedalion.datasets, by [Eike Middell](https://github.com/emiddell).
58+
- Precomputed sensitivities for all example datasets, including the ninjaCap whole head probe, are availabe in cedalion.data, by [Eike Middell](https://github.com/emiddell).
3859

3960
- Make all example notebooks run on Google Colab integration, by [Josef Cutler](https://github.com/jccutler). ([#96](https://github.com/ibs-lab/cedalion/pull/96))
4061

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@
8484
autodoc_type_aliases = {
8585
"NDTimeSeries" : "cdt.NDTimeSeries",
8686
"cdt.NDTimeSeries" : "cdt.NDTimeSeries",
87-
"LabeledPointCloud" : "cdt.LabeledPointCloud",
88-
"cdt.LabeledPointCloud" : "cdt.LabeledPointCloud",
87+
"LabeledPoints" : "cdt.LabeledPoints",
88+
"cdt.LabeledPoints" : "cdt.LabeledPoints",
8989
"cedalion.Quantity" : "Quantity",
9090
"pint.Quantity" : "Quantity",
9191
"Quantity" : "Quantity",

docs/data_io/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ I/O
4343
cedalion.io.forward_model
4444
cedalion.io.photogrammetry
4545
cedalion.io.probe_geometry
46-
cedalion.datasets
46+
cedalion.data
4747

4848

4949
Examples

docs/dot/index.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Diffuse optical tomography
2+
==========================
3+
4+
.. py:currentmodule:: cedalion.dot
5+
6+
7+
.. autosummary::
8+
:toctree: _autosummary_dot
9+
:recursive:
10+
11+
cedalion.geometry
12+
13+
cedalion.dot
14+
15+
16+
Examples
17+
--------
18+
19+
.. nbgallery::
20+
:glob:
21+
22+
../examples/head_models/*

docs/examples/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ EXAMPLE_NOTEBOOKS = getting_started_io/00_test_installation.ipynb \
2424
head_models/44_head_models.ipynb \
2525
head_models/45_parcel_sensitivity.ipynb \
2626
head_models/46_precompute_fluence.ipynb \
27+
head_models/48_headmodel_landmarks_verification.ipynb \
2728
augmentation/61_synthetic_artifacts_example.ipynb \
2829
augmentation/62_synthetic_hrfs_example.ipynb \
2930
physio/71_ampd_heartbeat.ipynb

docs/getting_started/contributing_code/contributing_code.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ It is smart to make yourself aware of five resources and concepts that build the
1717
# get example finger tapping dataset
1818
import cedalion
1919
import cedalion.nirs
20-
import cedalion.datasets as datasets
20+
import cedalion.data
2121
import xarray as xr
2222

23-
snirf_element = datasets.get_fingertapping()
23+
snirf_element = cedalion.data.get_fingertapping()
2424
amp = snirf_element[0].data[0]
2525
geo = snirf_element[0].geo3d
26-
od = cedalion.nirs.int2od(amp)
26+
od = cedalion.nirs.cw.int2od(amp)
2727
dpf = xr.DataArray([6, 6], dims="wavelength", coords={"wavelength" : amp.wavelength})
28-
conc = cedalion.nirs.beer_lambert(amp, geo, dpf)
28+
conc = cedalion.nirs.cw.beer_lambert(amp, geo, dpf)
2929
meas_list = snirf_element[0].measurement_lists[0]
3030

3131
data = xr.Dataset(
@@ -153,7 +153,7 @@ Widely used general functionality is part of the files on the top level (e.g. ni
153153
| **data** | Look up tables and other small datasets often required for ecexuting functions. |
154154
| **dataclasses** | Dataclass definitions that are used in Cedalion. Example: in xrschemas.py you can find that we work with xarray objects (see more detail in the next section). For time series data these have to have at least two dimensions: "time" and "channel". |
155155
| **geometry** | Functions for geometric manipulations, e.g. for optode registration, building landmarks on a 3D head, head segmentation, etc. |
156-
| **imagereco** | Functions for DOT image reconstruction |
156+
| **dot** | Functions for DOT image reconstruction |
157157
| **io** | Functions for reading and writing data to and from Cedalion. This includes for instance fnirs data in snirf format, probe geometries or reading anatomies (e.g. segmentation masks). |
158158
| **models** | Functions for data modelling, for instance the General Linear Model (GLM).|
159159
| **sigdecomp** | Functions for signal decomposition methods that are not part of a standard python distribution, e.g. advanced ICA methods.|

docs/image_reco/index.rst

Lines changed: 0 additions & 25 deletions
This file was deleted.

docs/index.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Cedalion
22

3-
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.
3+
A python-based framework for the data-driven analysis of multimodal fNIRS and DOT in
4+
naturalistic environments. Developed by the Intelligent Biomedical Sensing (IBS) Lab
5+
with and for the community.
46

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

7-
You can find the [github repository for the cedalion toolbox here](https://github.com/ibs-lab/cedalion).
9+
You can find the
10+
[github repository for the cedalion toolbox here](https://github.com/ibs-lab/cedalion).
811

912
```{toctree}
1013
:maxdepth: 1
@@ -25,7 +28,7 @@ community/index.md
2528
data_io/index
2629
sigproc/index
2730
machine_learning/index
28-
image_reco/index
31+
dot/index
2932
physio/index
3033
plot_vis/index
3134
synth/index

0 commit comments

Comments
 (0)