Skip to content
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

Add fwDTI #931

Merged
merged 29 commits into from
Dec 28, 2022
Merged

Add fwDTI #931

merged 29 commits into from
Dec 28, 2022

Conversation

arokem
Copy link
Collaborator

@arokem arokem commented Dec 6, 2022

No description provided.

@as_img
def fwdti(brain_mask, data, gtab):
"""
full path to a nifti file containing parameters
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This docstring needs to be edited.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We just need a description, not the parameter section for this function

@arokem
Copy link
Collaborator Author

arokem commented Dec 13, 2022

Remaining work:

  • Create an example that uses fwDTI and see that it works as expected.
  • Make sure documentation is up to spec.

@arokem arokem changed the title WIP: First few steps towards incorporating fwdti. First few steps towards incorporating fwdti. Dec 14, 2022
@arokem arokem changed the title First few steps towards incorporating fwdti. Add fwDTI Dec 14, 2022
@arokem
Copy link
Collaborator Author

arokem commented Dec 14, 2022

I think this is mostly done. Any ideas on where to add this to existing testing? I am thinking of adding it to the list of already calculated scalars in test_api.test_AFQ_data_waypoint. It would make that test a little longer, but maybe it seems the most straightforward approach.

@arokem
Copy link
Collaborator Author

arokem commented Dec 19, 2022

New test errors might be related to the new release of numpy that happened yesterday.

@arokem
Copy link
Collaborator Author

arokem commented Dec 20, 2022

It looks like all that remains here is the OR example: https://github.com/yeatmanlab/pyAFQ/actions/runs/3741923319/jobs/6352177395#step:5:1817, which also seems broken on master. It's puzzling, because it works locally for me. We might be into similar issues to what we are seeing with the SLR tests, where we don't actually have control over the randomness generated by probabilistic tracking. I think I'm going to try deterministic tracking here and see whether that works.

@arokem
Copy link
Collaborator Author

arokem commented Dec 22, 2022

Looks like using the HBN data sorted out the OR example issues! I wonder if it would sort out our SLR woes as well...

I still need to figure out how to embed the montage image in the example webpage. I might do that tomorrow.

@36000
Copy link
Collaborator

36000 commented Dec 22, 2022

When this is done, let me know so I can rebase #937 on top of this, and see if it works then. I think SLR works there now, I just need the OR example changes.


if len(aus.SegmentedSFT.fromfile(
my_afq.export("clean_bundles")["NDARAA948VFH"]).get_bundle(
"L_OR").streamlines) > 1:
montages = my_afq.montage("L_OR", (1, 1), "Axial")
my_afq.combine_bundle("L_OR")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@36000 : why is combine_bundle called here? At this point, the image has presumably already been created.

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a smoke test for that function. It's the only place it is called. It could probably be moved into it's own, more comprehensive test using example streamlines but it would not be trivial, as it is attached and enmeshed with the GroupAFQ object.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'd rather not include this test here. I think that the examples should primarily serve as guidance for users getting acquainted with the software. Admittedly, we need to do some work in some of the other examples, to move them in that direction.

@arokem
Copy link
Collaborator Author

arokem commented Dec 23, 2022

I think this is done now. @36000 : when you get a chance, could you please take a look? If it looks OK to you, go ahead and merge, so that you can rebase #937 on top of this.

@36000 36000 merged commit 19fe6cd into yeatmanlab:master Dec 28, 2022
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