Skip to content

Select input bold node#497

Merged
Gab-D-G merged 2 commits into
masterfrom
select_input_bold_node
May 25, 2026
Merged

Select input bold node#497
Gab-D-G merged 2 commits into
masterfrom
select_input_bold_node

Conversation

@Gab-D-G

@Gab-D-G Gab-D-G commented May 25, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes

    • Fixed power spectral density calculation to use updated time-series data, resulting in improved frequency resolution and accuracy of spectral analysis results.
  • Refactor

    • Optimized internal preprocessing workflow configuration for improved maintainability.

Review Change Stack

Gab-D-G added 2 commits May 25, 2026 14:06
…on the original number of frames pre-censoring, instead of post-censoring
@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1aa619d9-69c6-4ae6-ac74-f5a0cd3baf94

📥 Commits

Reviewing files that changed from the base of the PR and between a8b3c39 and 8afa7b4.

📒 Files selected for processing (4)
  • rabies/analysis_pkg/diagnosis_pkg/diagnosis_functions.py
  • rabies/confound_correction_pkg/main_wf.py
  • rabies/preprocess_pkg/bold_main_wf.py
  • rabies/preprocess_pkg/main_wf.py

📝 Walkthrough

Walkthrough

This PR refactors BOLD input selection across preprocessing workflows by standardizing field names to bold_file, consolidating dual selection nodes into a single select_input_bold_node, and updating all downstream references. A separate bug fix corrects PSD sample count calculation in diagnosis.

Changes

BOLD Input Selection and Field Naming Refactoring

Layer / File(s) Summary
Standardize BOLD field naming in bold_main_wf
rabies/preprocess_pkg/bold_main_wf.py
The BOLD input field is renamed from bold to bold_file across the workflow: inputnode interface, despiking connections, inho-correction source, motion estimation wiring, mask resampling, and native/common-space transform references. A docstring formatting adjustment is also included.
Consolidate BOLD selection in main_wf
rabies/preprocess_pkg/main_wf.py
Separate format_bold_node and input_bold_node are replaced with a single select_input_bold_node using match_iterables. The unused pathlib import is removed, input_bold is removed from outputnode, and all downstream nodes (bold_main_wf, bold_inho_cor_diagnosis, inho_cor_bold_main_wf, QC/datasink nodes) are rewired to reference the consolidated node.
Update confound correction workflow references
rabies/confound_correction_pkg/main_wf.py
The preprocessing workflow mapping is updated to reference the new main_wf.select_input_bold node path instead of the removed main_wf.input_bold when matching BOLD split outputs.
Fix PSD sample count calculation in diagnosis
rabies/analysis_pkg/diagnosis_pkg/diagnosis_functions.py
The plot_freqs function now calculates sample count N from the censoring-filled timeseries_ instead of the original timeseries, ensuring correct nperseg selection for Welch PSD computation.

Estimated Code Review Effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A rabbit hops through workflows new,
Bold files get their names made true,
Selection nodes consolidated,
PSD bugs eliminated,
Clean pipelines in every view! 🎯

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Select input bold node' clearly and specifically describes the main refactoring change across the PR: replacing separate formatting nodes with a single select_input_bold_node for BOLD input handling in the preprocessing workflow.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch select_input_bold_node

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Gab-D-G Gab-D-G merged commit bc81e84 into master May 25, 2026
3 checks passed
@Gab-D-G Gab-D-G deleted the select_input_bold_node branch May 25, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant