Skip to content

docs(freesurfer): backfill missing docstrings across the module - #687

Open
AgarwalNilay wants to merge 2 commits into
gallantlab:mainfrom
evi-hendrikx:docs/freesurfer-docstrings
Open

docs(freesurfer): backfill missing docstrings across the module#687
AgarwalNilay wants to merge 2 commits into
gallantlab:mainfrom
evi-hendrikx:docs/freesurfer-docstrings

Conversation

@AgarwalNilay

Copy link
Copy Markdown
Contributor

Adds docstrings (Parameters/Returns) to previously undocumented functions and methods, and Returns sections to functions

Adds numpy-style docstrings (Parameters/Returns) to previously
undocumented functions and methods, and Returns sections to functions
that already had Parameters but no Returns.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@AgarwalNilay
AgarwalNilay force-pushed the docs/freesurfer-docstrings branch from 5aa2622 to 430020c Compare August 21, 2026 01:50
Comment thread cortex/freesurfer.py
Comment on lines 55 to 56
elif type == "slim":
return os.path.join(base, "surf", hemi+".{name}_slim.obj")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should raise a ValueError if none of these match.

Comment thread cortex/freesurfer.py
If `type` is "patch", a per-vertex flag array (1 for interior
vertices, -1 for boundary/edge vertices, 0 for vertices not in the
patch). Otherwise, the curvature values for this surface/hemisphere,
as returned by `get_curv`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annotate the arguments

Comment thread cortex/freesurfer.py Outdated
Returns
-------
None
Writes `fname` as a side effect; has no return value.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this one line

…hs error handling

Adds missing Parameters/Returns sections to several helper functions
(_remove_disconnected_polys, _move_disconnect_points_to_zero,
make_fiducial, write_surf, get_surf, _move_labels, _parse_labels,
_read_sphere_reg). Also fixes get_paths to raise ValueError on an
unrecognized `type` instead of returning it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

2 participants