Skip to content

Commit

Permalink
Merge pull request #236 from jhlegarreta/FixFloatingPointFormatting2
Browse files Browse the repository at this point in the history
STYLE: Fix registration process id string floating point formatting
  • Loading branch information
jhlegarreta authored Jul 6, 2024
2 parents 364c501 + fb680ec commit 8064245
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ nibabel>=3.0.0
numpy>=1.20.0,<1.21.0;python_version=="3.8"
numpy>=1.21.0;python_version>="3.9"
pandas<2.1.0
pillow<10.4.0
scipy>=1.4.0,<1.11.0;python_version=="3.8"
scipy>=1.5.0;python_version=="3.9"
scipy>=1.9.0;python_version>="3.10"
Expand Down
4 changes: 2 additions & 2 deletions whitematteranalysis/congeal_multisubject.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def congeal_multisubject_inner_loop(mean, subject, initial_transform, mode, sigm
# Set up registration objects and parameters that are specific to affine vs nonrigid
if mode == "Affine" or mode == "Rigid":
register = wma.register_two_subjects.RegisterTractography()
register.process_id_string = f"_subject_{subject_idx:05d}_iteration_{iteration_count:05d}_sigma_{sigma:03d}"
register.process_id_string = f"_subject_{subject_idx:05d}_iteration_{iteration_count:05d}_sigma_{int(sigma):03d}"
if mode == "Rigid":
register.mode = [1, 1, 0, 0]
# Make sure the initial iterations are performed with Cobyla.
Expand All @@ -488,7 +488,7 @@ def congeal_multisubject_inner_loop(mean, subject, initial_transform, mode, sigm
register = wma.register_two_subjects_nonrigid_bsplines.RegisterTractographyNonrigid()
register.nonrigid_grid_resolution = grid_resolution
register.initialize_nonrigid_grid()
register.process_id_string = f"_subject_{subject_idx:05d}_iteration_{iteration_count:05d}_sigma_{sigma:03d}_grid_{grid_resolution:03d}"
register.process_id_string = f"_subject_{subject_idx:05d}_iteration_{iteration_count:05d}_sigma_{int(sigma):03d}_grid_{int(grid_resolution):03d}"

else:
print("ERROR: Unknown registration mode")
Expand Down

0 comments on commit 8064245

Please sign in to comment.