Changelog#
The current changelog contains information on NeuroCAPs versions 0.19.0 and above. For changes in earlier versions (< 0.19.0), please refer to the Changelog Archive.
Note: The versions listed in this file have been or will be deployed to PyPI.
[Versioning]#
0.minor.patch.postN
.minor : Introduces new features and may include potential breaking changes. Any breaking changes will be explicitly noted in the changelog (e.g., new functions or parameters, changes in parameter defaults, or function names).
.patch : Contains fixes for identified bugs and may include modifications or added parameters for improvements/enhancements. All fixes and modifications are backwards compatible.
.postN : Consists of documentation changes or metadata-related updates, such as modifications to type hints.
[0.23.8.post1] - 2025-03-20#
๐ Documentation#
Adds additional documentation clarity and emphasis.
[0.23.8.post0] - 2025-03-20#
๐ Documentation#
Fixes improper documentation rendering in IDEโs
Streamlines documentation
[0.23.8] - 2025-03-17#
๐ Fixes#
Added all to neurocaps.typing module so that the star import only restricts to public types.
[0.23.7] - 2025-03-16#
๐ Fixes#
Fixes an incorrect return typehint for a
CAP.caps2corrfunction.Add optional type hint for certain parameter.
[0.23.6] - 2025-03-16#
๐ New/Added#
Add type hints to all internal classes; minor code cleaning.
Use new types for subject timeseries and parcellations throughout docs.
โป Changed#
Change some internal parameters for the private
_Dataclass such asscrub_lim->out_percent,fd->fd_thresh, andshift->tr_shift. Done for clarity.
[0.23.5] - 2025-03-13#
๐ Fixes#
Updated type hints for class methods that return self from
NonetoSelf.
[0.23.4] - 2025-03-13#
Primarily some internal refactoring and API docs updates:
Some refactoring to reduce some code complexity.
Internal code for public classes only use private attributes to separate it from public properties. Exception for private getter classes that are inherited public classes.
โป Changed#
Internal function changed from
_create_regionstocompute_region_means.Internal
CAP._raise_errorfunction changed slightly to accept attribute names, which are preceded by the underscore instead of properties. Done so that their is a separation between the internal private attributes and public properties.Property change from
region_capstoregion_meansand now includes โRegionsโ key. For backward compatibility, the oldregion_capsbehavior is still available.
๐ Documentation#
Name change from โneurocapsโ to โNeuroCAPsโ in documentation only. Package name to remain โneurocapsโ for compliance with PEP 8.
Additional documentation fixes to enhance clarity.
[0.23.3] - 2025-03-08#
โจ Enhancement#
Improved error handling for custom parcel approaches. The structure of the subkeys are validated to prevent errors due to incorrect structure down the pipeline.
[0.23.2] - 2025-03-06#
โป Changed#
Minor improvements to str call for clarity.
Added optional dependencies for benchmarking and cleaned repeating optional dependencies.
Created separate static internal function for computing cosine similarity between the 1D region mask and high/low amplitude of the CAP vector.
[0.23.1] - 2025-02-27#
โป Changed#
Minor improvements in how run IDs are intersected to prevent errors in rare cases.
Update confound names in test datasets to thier modern counterparts in fMRIPrep.
๐ Fixes#
Added pytest-cov and pre-commit as optional dependencies
Fix case in version 0.23.0 when
confound_namesis None butn_acompcor_separateis specified, which resulted in the no acompcor components being included for nuisance regression.Also, add warning is no cosine regressors are included in
confound_namesbut the following is detected:n_acompcor_separatespecifiedโa_comp_corโ or โt_comp_corโ included in
confound_names
[0.23.0] - 2025-02-25#
Updates pertain to
TimeseriesExtractor
๐ New/Added#
Added a new key to
fd_thresholdfor optional cubic spline interpolation of censored volumes not at the beginning or end of the timeseries and is only done after nuisance regression and parcellation. By default, interpolation is not done and must explicitly be set to True.
โป Changed#
Default for
confounds_nameschanged from None to"basic". The"basic"option now performs the same functionality asconfound_names=Nonedid in previous versions.Ordering of some
self.signal_clean_infoparameters changed.
๐ Fixes#
Raises ValueError when
use_confounds=Falsebutfd_threshold,n_acompcor_separate, or ``dummy_scans = {โautoโ: True} is specified. IMPORTANT:Fixed issue that occured only when
n_acompcor_separateis None (default), which resulted in all acompcor regressors are selected from the confounds metadata due to list slicing issue[0:None]. Not an issue whenn_acompcor_separateis not None or the preproccesing pipeline directory did not have a confounds json file. FIX: The confounds metadata is only retrieved whenn_acompcor_separateis not None.Overall improved error handling.
[0.22.2] - 2025-02-21#
๐ New/Added#
Added new โexceptionsโ module containing the
BIDSQueryError.
๐ Documentation#
BIDSQueryErrornow documented.Updated doc strings to redirect to documentation about directory structure/entities.
[0.22.1.post0] - 2025-02-19#
๐ Documentation#
Add clarifying information to doc strings about the entities/file naming structure.
[0.22.1] - 2025-02-18#
โป Changed#
More efficient computation of transition probability
[0.22.0.post0] - 2025-02-17#
๐ Documentation#
Add clarifying information to docs.
[0.22.0] - 2025-02-17#
โป Changed#
Change in internal logic for condition to not add plus one to the duration scan index (
scans = range(start, end + 1)->scans = range(start, end)) to reduce potential condition spillover in certain task designs such as rapid events.
๐ Documentation#
Remove version change directives under 0.19.0 to clean up docs.
[0.21.8] - 2025-02-13#
๐ New/Added#
CAPandTimeseriesExtractorclasses now have defined string dunder methods that return specific metadata.
[0.21.7] - 2025-02-11#
๐ Fixes#
Fixed documentation rendering issues in VSCode.
๐ Documentation#
Cleaned documentation in some functions.
[0.21.6] - 2025-02-06#
๐ Fixes#
CAP.outer_productsproperty now no longer returns None when it is not None.
[0.21.5] - 2025-01-27#
๐ New/Added#
Added new
progress_barparameter toCAP.calculate_metrics,CAP.caps2niftis,CAP.caps2surf,CAP.get_caps, andTimeseriesExtractor.get_boldto display tqdm progress bars.
๐ Documentation#
Cleans version change/version added directives and references for versions under 0.19.0 to clean up documentation.
Additional minor documentation cleaning.
[0.21.4] - 2025-01-24#
๐ Fixes#
Fix issue in โcountsโ computation in
CAP.calculate_metricsfor case where no TRs are assigned to a specific label/CAP. Instead of โcountsโ being 0 in this case, it would be a 1. Issue did not affect the other metrics (โtemporal fractionโ, โpersistenceโ, etc), which would correctly be 0 in such cases.
[0.21.3] - 2025-01-17#
๐ Fixes#
Added ipywidgets in optional dependencies for a better experience with the โopenneuro_demoโ Jupyter notebook.
[0.21.2] - 2025-01-14#
๐ Fixes#
Fixes warning about ignoring mandatory keys in
fd_thresholdanddummy_scans.Also adds check to ensure that the โoutlier_percentageโ key is a float between 0 and 1.
Setuptools version pinned to 64.0 or greater.
[0.21.1] - 2025-01-10#
๐ Fixes#
Better type validation for
fd_thresholdanddummy_scans.
๐ Documentation#
Slightly clearer documentation on the criteria used for
fd_threshold.
[0.21.0] - 2025-01-02#
๐ New/Added#
Added a new parameter,
slice_time_refinTimeseriesExtractor.get_boldto allow onset to be subtracted byslice_time_ref * trif desired.
[0.20.0] - 2024-12-31#
๐ New/Added#
Added new log message specifying the condition being extracted if
conditionis not None.Added a new parameter,
condition_tr_shiftinTimeseriesExtractor.get_boldto allow a shift in the the starting and ending scan in TR units for a condition.
[0.19.4] - 2024-12-24#
๐ Documentation#
Links are fixed in the documentation.
๐ Fixes#
Fix indexing error for
visualize_boldifparcel_approach["Custom"]["nodes"]is a NumPy array instead of list.
โป Changed#
Internally, the verbose parameter is set to 0 for nilearnโs
fetch_atlas_aalandfetch_atlas_schaefer. and the behavior is stated in the documentation. Cosine similarity in this case is assignednp.nanWhen creating โregionsโ for the โCustomโ parcel approach, both a list and range can be accepted. Previously, only lists were accepted.
List method:
parcel_approach["Custom"]["regions"] = {
"Primary Visual": {"lh": [0], "rh": [180]},
"Early Visual": {"lh": [1, 2, 3], "rh": [181, 182, 183]},
"Dorsal Stream Visual": {"lh": list(range(4, 10)), "rh": list(range(184, 190))},
"Ventral Stream Visual": {"lh": list(range(10, 17)), "rh": list(range(190, 197))},
"MT+ Complex": {"lh": list(range(17, 26)), "rh": list(range(197, 206))},
"SomaSens Motor": {"lh": list(range(26, 31)), "rh": list(range(206, 211))},
"ParaCentral MidCing": {"lh": list(range(31, 40)), "rh": list(range(211, 220))},
"Premotor": {"lh": list(range(40, 47)), "rh": list(range(220, 227))},
"Posterior Opercular": {"lh": list(range(47, 52)), "rh": list(range(227, 232))},
"Early Auditory": {"lh": list(range(52, 59)), "rh": list(range(232, 239))},
"Auditory Association": {"lh": list(range(59, 67)), "rh": list(range(239, 247))},
"Insula FrontalOperc": {"lh": list(range(67, 79)), "rh": list(range(247, 259))},
"Medial Temporal": {"lh": list(range(79, 87)), "rh": list(range(259, 267))},
"Lateral Temporal": {"lh": list(range(87, 95)), "rh": list(range(267, 275))},
"TPO": {"lh": list(range(95, 100)), "rh": list(range(275, 280))},
"Superior Parietal": {"lh": list(range(100, 110)), "rh": list(range(280, 290))},
"Inferior Parietal": {"lh": list(range(110, 120)), "rh": list(range(290, 300))},
"Posterior Cingulate": {"lh": list(range(120, 133)), "rh": list(range(300, 313))},
"AntCing MedPFC": {"lh": list(range(133, 149)), "rh": list(range(313, 329))},
"OrbPolaFrontal": {"lh": list(range(149, 158)), "rh": list(range(329, 338))},
"Inferior Frontal": {"lh": list(range(158, 167)), "rh": list(range(338, 347))},
"Dorsolateral Prefrontal": {"lh": list(range(167, 180)), "rh": list(range(347, 360))},
"Subcortical Regions": {"lh": list(range(360, 393)), "rh": list(range(393, 426))},
}
List and range method:
parcel_approach["Custom"]["regions"] = {
"Primary Visual": {"lh": [0], "rh": [180]},
"Early Visual": {"lh": [1, 2, 3], "rh": [181, 182, 183]},
"Dorsal Stream Visual": {"lh": range(4, 10), "rh": range(184, 190)},
"Ventral Stream Visual": {"lh": range(10, 17), "rh": range(190, 197)},
"MT+ Complex": {"lh": range(17, 26), "rh": range(197, 206)},
"SomaSens Motor": {"lh": range(26, 31), "rh": range(206, 211)},
"ParaCentral MidCing": {"lh": range(31, 40), "rh": range(211, 220)},
"Premotor": {"lh": range(40, 47), "rh": range(220, 227)},
"Posterior Opercular": {"lh": range(47, 52), "rh": range(227, 232)},
"Early Auditory": {"lh": range(52, 59), "rh": range(232, 239)},
"Auditory Association": {"lh": range(59, 67), "rh": range(239, 247)},
"Insula FrontalOperc": {"lh": range(67, 79), "rh": range(247, 259)},
"Medial Temporal": {"lh": range(79, 87), "rh": range(259, 267)},
"Lateral Temporal": {"lh": range(87, 95), "rh": range(267, 275)},
"TPO": {"lh": range(95, 100), "rh": range(275, 280)},
"Superior Parietal": {"lh": range(100, 110), "rh": range(280, 290)},
"Inferior Parietal": {"lh": range(110, 120), "rh": range(290, 300)},
"Posterior Cingulate": {"lh": range(120, 133), "rh": range(300, 313)},
"AntCing MedPFC": {"lh": range(133, 149), "rh": range(313, 329)},
"OrbPolaFrontal": {"lh": range(149, 158), "rh": range(329, 338)},
"Inferior Frontal": {"lh": range(158, 167), "rh": range(338, 347)},
"Dorsolateral Prefrontal": {"lh": range(167, 180), "rh": range(347, 360)},
"Subcortical Regions": {"lh": range(360, 393), "rh": range(393, 426)},
}
[0.19.3.post0] - 2024-12-10#
๐ Documentation#
Additional documentation for
standardizefunction.
[0.19.3] - 2024-12-08#
๐ New/Added#
Method chaining for several methods in the
CAPandTimeseriesExtractorclass.
[0.19.2] - 2024-12-06#
๐ Fixes#
Add type hints to properties.
Improve accuracy of type hints for the properties.
Fixes type hints for certain parameters that included numpy.ndarray.
Replaces any returns that implies a plot object is returned and replaces with None for clarity.
Raise type error when
self.subject_tableinCAPis set but is not a dictionary.
[0.19.1] - 2024-11-30#
Primarily to ensure all the latest distributions have the correct documentation links.
Includes some internal code changes that wonโt change results.
TODO for future version is to support Python 3.13.
[0.19.0] - 2024-11-28#
Cleaning some of the API, specifically parameter names and properties, no defaults have been changed in this update.
๐ New/Added#
suffix_filenameadded toCAP.caps2plot,CAP.caps2surf,CAP.caps2radar, andtransition_matrix. This addition was done to allow thesuffix_titleparameter in each of the previously listed methods to only be responsible for the title of the plots. The suffix filename will also be appended to the end of the default filename.CAPclass now has acluster_scoresproperty to consolodate theinertia,davies_bouldin,silhouette, and โvariance_ratioโ scores into a property instead of separate properties. Consequently, theinertia,davies_bouldin,silhouette, and โvariance_ratioโ have been removed.
The structure of this property is:
{
"Cluster_Selection_Method": str, # e.g., "elbow", "davies_bouldin", "silhouette", or "variance_ratio"
"Scores": {
"GroupName": {
2: float, # Score for 2 clusters
3: float, # Score for 3 clusters
4: float, # Score for 4 clusters
},
}
}
โป Changed#
Any instance of
file_namein a parameter name has been changed to the more conventional parameter namefilename. For instance,suffix_file_namenow becomessuffix_filenameandfile_namesbecomesfilenames. This change effects the following functions:merge_dicts,standardize,change_dtypes,CAP.calculate_metrics,CAP.caps2niftis,TimeseriesExtractor.timeseries_to_pickle, andTimeseriesExtractor.visualize_bold.Warning logged whenever file name parameter is used but
output_diris not specified.
๐ Documentation#
Fix doc parameter error for
CAP.caps2niftisthat usedsuffix_titleinstead ofsuffix_file_name, which is nowsuffix_filename.In documentation, version labels restricted to changes or additions make from 0.18.0 and above for less clutter.