Skip to content

Commit 5259843

Browse files
committedNov 18, 2024·
Fix Readme & Doc example
- Fix formatting of some examples - Minor demo.ipynb clean
1 parent 355afba commit 5259843

File tree

7 files changed

+36
-32
lines changed

7 files changed

+36
-32
lines changed
 

‎CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ noted in the changelog (i.e new functions or parameters, changes in parameter de
1616
improvements/enhancements. Fixes and modifications will be backwards compatible.
1717
- *.postN* : Consists of only metadata-related changes, such as updates to type hints or doc strings/documentation.
1818

19+
## [0.18.6] - 2024-11-18
20+
- Minor code cleaning
21+
### 📖 Documentation
22+
- Readme example fix
23+
1924
## [0.18.5] - 2024-11-16
2025
## ♻ Changed
2126
- Updated Dependencies:

‎README.md

+12-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# neurocaps
22
[![Latest Version](https://img.shields.io/pypi/v/neurocaps.svg)](https://pypi.python.org/pypi/neurocaps/)
33
[![Python Versions](https://img.shields.io/pypi/pyversions/neurocaps.svg)](https://pypi.python.org/pypi/neurocaps/)
4-
[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.11642615-teal)](https://doi.org/10.5281/zenodo.14174119)
4+
[![DOI](https://img.shields.io/badge/DOI-10.5281%2Fzenodo.11642615-teal)](https://doi.org/10.5281/zenodo.14178104)
55
[![Github Repository](https://img.shields.io/badge/Source%20Code-neurocaps-purple)](https://github.com/donishadsmith/neurocaps)
66
[![Test Status](https://github.com/donishadsmith/neurocaps/actions/workflows/testing.yaml/badge.svg)](https://github.com/donishadsmith/neurocaps/actions/workflows/testing.yaml)
77
[![codecov](https://codecov.io/github/donishadsmith/neurocaps/graph/badge.svg?token=WS2V7I16WF)](https://codecov.io/github/donishadsmith/neurocaps)
@@ -119,7 +119,7 @@ from neurocaps.extraction import TimeseriesExtractor
119119
from neurocaps.analysis import CAP
120120

121121
# Set specific confounds for nuisance regression
122-
confounds = ['Cosine*', 'Rot*']
122+
confounds = ["Cosine*", "aComp*", "Rot*"]
123123

124124
# Set parcellation
125125
parcel_approach = {"Schaefer": {"n_rois": 100, "yeo_networks": 7, "resolution_mm": 2}}
@@ -131,18 +131,17 @@ extractor = TimeseriesExtractor(parcel_approach=parcel_approach,
131131
detrend=True,
132132
low_pass=0.15,
133133
high_pass=0.01,
134-
confound_names=confounds,
135-
n_acompcor_separate=2)
134+
confound_names=confounds)
136135

137136
bids_dir = "tests/ds000031_R1.0.4_ses001-022/ds000031_R1.0.4"
138137

139138
# If there are multiple pipelines in the derivatives folder, you can specify a specific pipeline
140-
pipeline_name = fmriprep_1.0.0/fmriprep
139+
pipeline_name = "fmriprep_1.0.0/fmriprep"
141140

142141
# Extract timeseries for subjects in the BIDS directory
143142
extractor.get_bold(bids_dir=bids_dir,
144143
task="rest",
145-
session='002',
144+
session="002",
146145
pipeline_name=pipeline_name
147146
verbose=True,
148147
flush=True)
@@ -277,16 +276,15 @@ radialaxis={"showline": True,
277276
"tickvals": [0.1,"","",0.4, "","", 0.6]}
278277

279278
legend = {"yanchor": "top",
280-
"y": 0.99,
281-
"x": 0.99,
282-
"title_font_family": "Times New Roman",
283-
"font": {"size": 12, "color": "black"}}
279+
"y": 0.99,
280+
"x": 0.99,
281+
"title_font_family": "Times New Roman",
282+
"font": {"size": 12, "color": "black"}}
284283

285-
colors = {"High Amplitude": "black", "Low Amplitude": "orange"}
284+
colors = {"High Amplitude": "black", "Low Amplitude": "orange"}git c
286285

287-
288-
kwargs = {"radialaxis": radial, "fill": "toself", "legend": legend,
289-
"color_discrete_map": colors, "height": 400, "width": 600}
286+
kwargs = {"radialaxis": radial, "fill": "toself", "legend": legend, "color_discrete_map": colors,
287+
"height": 400, "width": 600}
290288

291289
cap_analysis.caps2radar(output_dir=output_dir, **kwargs)
292290
```

‎demo.ipynb

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
{
1414
"cell_type": "code",
15-
"execution_count": 1,
15+
"execution_count": null,
1616
"metadata": {},
1717
"outputs": [
1818
{
@@ -103,7 +103,7 @@
103103
"# combination per session. `TimeseriesExtractor.get_bold().clear()`` can be used to clear the cache. Use `n_cores` to\n",
104104
"# speed up extraction\n",
105105
"extractor.get_bold(bids_dir=bids_dir,\n",
106-
" session='002', \n",
106+
" session=\"002\", \n",
107107
" runs=\"001\",\n",
108108
" task=\"rest\", \n",
109109
" pipeline_name=pipeline_name, \n",

‎docs/examples/analysis.rst

+11-11
Original file line numberDiff line numberDiff line change
@@ -181,19 +181,19 @@ Plotting CAPs to Radar
181181
.. code-block:: python
182182
183183
radialaxis={"showline": True,
184-
"linewidth": 2,
185-
"linecolor": "rgba(0, 0, 0, 0.25)",
186-
"gridcolor": "rgba(0, 0, 0, 0.25)",
187-
"ticks": "outside" ,
188-
"tickfont": {"size": 14, "color": "black"},
189-
"range": [0,0.6],
190-
"tickvals": [0.1,"","",0.4, "","", 0.6]}
184+
"linewidth": 2,
185+
"linecolor": "rgba(0, 0, 0, 0.25)",
186+
"gridcolor": "rgba(0, 0, 0, 0.25)",
187+
"ticks": "outside" ,
188+
"tickfont": {"size": 14, "color": "black"},
189+
"range": [0,0.6],
190+
"tickvals": [0.1,"","",0.4, "","", 0.6]}
191191
192192
legend = {"yanchor": "top",
193-
"y": 0.99,
194-
"x": 0.99,
195-
"title_font_family": "Times New Roman",
196-
"font": {"size": 12, "color": "black"}}
193+
"y": 0.99,
194+
"x": 0.99,
195+
"title_font_family": "Times New Roman",
196+
"font": {"size": 12, "color": "black"}}
197197
198198
colors = {"High Amplitude": "red", "Low Amplitude": "blue"}
199199

‎docs/examples/extraction.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Extracting Timeseries
2121
2222
confounds=["Cosine*", "aComp*", "Rot*"]
2323
24-
parcel_approach = {"Schaefer": {"n_rois": 100, "yeo_networks": 7}}
24+
parcel_approach = {"Schaefer": {"n_rois": 100, "yeo_networks": 7, "resolution_mm": 2}}
2525
2626
extractor = TimeseriesExtractor(parcel_approach=parcel_approach,
2727
standardize="zscore_sample",
@@ -35,8 +35,9 @@ Extracting Timeseries
3535
3636
# Can use the `n_cores` parameter for multiprocessing
3737
pipeline_name = "fmriprep_1.0.0/fmriprep"
38+
3839
extractor.get_bold(bids_dir=bids_dir,
39-
session='002',
40+
session="002",
4041
task="rest",
4142
pipeline_name=pipeline_name,
4243
tr=1.2)

‎docs/introduction.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
:alt: Python Versions
1010

1111
.. image:: https://img.shields.io/badge/DOI-10.5281%2Fzenodo.11642615-teal
12-
:target: https://doi.org/10.5281/zenodo.14174119
12+
:target: https://doi.org/10.5281/zenodo.14178104
1313
:alt: DOI
1414

1515
.. image:: https://img.shields.io/badge/Source%20Code-neurocaps-purple
@@ -39,7 +39,7 @@ Citing
3939
------
4040
::
4141

42-
Smith, D. (2024). neurocaps. Zenodo. https://doi.org/10.5281/zenodo.14174119
42+
Smith, D. (2024). neurocaps. Zenodo. https://doi.org/10.5281/zenodo.14178104
4343

4444
Usage
4545
-----

‎neurocaps/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
__all__=["analysis", "extraction"]
44

55
# Version in single place
6-
__version__ = "0.18.5"
6+
__version__ = "0.18.6"

0 commit comments

Comments
 (0)
Please sign in to comment.