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

[ENH] Add resample nb points + dps #244

Conversation

arnaudbore
Copy link
Collaborator

@arnaudbore arnaudbore commented Sep 25, 2024

Description

Add resampling with nb points and skip check header compatible when only tractograms.

Have you

  • Added a description of the content of this PR above
  • Followed proper commit message formatting
  • Added data and a script to test this PR
  • Made sure that PEP8 issues are resolved
  • Tested the code yourself right before pushing
  • Added unit tests to test the code you implemented

@pep8speaks
Copy link

pep8speaks commented Sep 25, 2024

Hello @arnaudbore, Thank you for updating !

Line 637:1: W293 blank line contains whitespace
Line 638:80: E501 line too long (84 > 79 characters)
Line 640:80: E501 line too long (87 > 79 characters)

Line 77:80: E501 line too long (105 > 79 characters)
Line 78:80: E501 line too long (88 > 79 characters)

Comment last updated at 2024-09-27 16:09:03 UTC

@arnaudbore arnaudbore changed the title [ENH] Add resample nb points [ENH] Add resample nb points + dps Sep 26, 2024
Copy link
Collaborator

@EmmaRenauld EmmaRenauld left a comment

Choose a reason for hiding this comment

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

Last small comments, then I'll merge!

@@ -641,11 +675,10 @@ def _process_one_streamline_group(
The Euclidean length of each streamline
"""
tractograms = self.groups_config[group]['files']

if self.step_size and self.compress:
raise ValueError(
Copy link
Collaborator

Choose a reason for hiding this comment

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

nb_points is not checked. But now, you check that in the __init__, so we can remove the check here.

'kept.')

for dps_key in self.dps_keys:
logging.debug(" Include dps \"{}\" in the HDF5.".format(dps_key))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe a check that the dps_key exists in the tractogram? Else, error, or else, warning?

@EmmaRenauld EmmaRenauld merged commit 3ebc194 into scil-vital:master Sep 27, 2024
2 checks passed
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.

3 participants