-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: Add sphere registration to fit workflow, check for precomputed #370
Conversation
Hello @effigies! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2023-10-02 18:08:57 UTC |
ada4a7d
to
53cb30c
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## next #370 +/- ##
==========================================
- Coverage 59.13% 58.44% -0.70%
==========================================
Files 26 26
Lines 1845 1860 +15
Branches 235 238 +3
==========================================
- Hits 1091 1087 -4
- Misses 698 716 +18
- Partials 56 57 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
@mgxd I believe this is ready for review if you've got time. |
The current failure relates to passing BIDS filenames to Path2BIDS. We expect |
88de3d3
to
3b5b230
Compare
This is passing. Codecov is complaining about coverage because coverage is bad. |
needed_anat_surfs = ["white", "pial", "midthickness"] | ||
needed_metrics = ["thickness", "sulc"] | ||
needed_spheres = ["sphere_reg", "sphere"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like a good time for sets
needed_anat_surfs = ["white", "pial", "midthickness"] | |
needed_metrics = ["thickness", "sulc"] | |
needed_spheres = ["sphere_reg", "sphere"] | |
needed_anat_surfs = {"white", "pial", "midthickness"} | |
needed_metrics = {"thickness", "sulc"} | |
needed_spheres = {"sphere_reg", "sphere"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sets can vary in order with each interpreter's initial hash seed, so I'd worry about this causing some node to consider its inputs changed. The n is so small here that I think efficiency is not a significant concern.
surfs = [surf for surf in needed_anat_surfs if surf not in found_surfs] | ||
spheres = [sphere for sphere in needed_spheres if sphere not in found_surfs] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then we should just be able to do
surfs = [surf for surf in needed_anat_surfs if surf not in found_surfs] | |
spheres = [sphere for sphere in needed_spheres if sphere not in found_surfs] | |
surfs = list(needed_anat_surfs - found_surfs.keys()) | |
spheres = list(needed_spheres - found_surfs.keys()) |
]), | ||
]) | ||
# fmt:on | ||
metrics = [metric for metric in needed_metrics if metric not in found_surfs] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
metrics = [metric for metric in needed_metrics if metric not in found_surfs] | |
metrics = list(needed_metrics - found_surfs.keys()) |
@mgxd It would be nice to depend on this. Is your previous suggestion blocking? |
No, it is not blocking |
Not much to say. Moved some of the surface conversion into first-order fit, even though they are easy to calculate post hoc because they are needed if msmsulc is used. Initially tried to make some of it conditional, but it made it annoying to construct the complement after the fact. A few extra surfaces in the anatomical derivatives are not our biggest problems, space-wise.