Skip to content

Commit

Permalink
Merge pull request #439 from dPys/development
Browse files Browse the repository at this point in the history
[MAINT] Restart circle
  • Loading branch information
dPys authored Sep 17, 2020
2 parents 68e7264 + e1f12c4 commit daff945
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions pynets/dmri/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,8 +447,7 @@ def track_ensemble(

all_streams = []
ix = 0
while float(stream_counter) < float(target_samples) and float(ix) < \
len(all_combs):
while float(stream_counter) < float(target_samples):
with Parallel(n_jobs=nthreads, backend='loky',
mmap_mode='r+', temp_folder=cache_dir,
verbose=10) as parallel:
Expand All @@ -474,11 +473,12 @@ def track_ensemble(
tiss_class = 'wb'
roi_neighborhood_tol = float(roi_neighborhood_tol) * 1.05
min_length = float(min_length) * 0.95
continue
else:
ix = 0
out_streams = concatenate(out_streams, axis=0)

if float(ix) > len(all_combs):
break

# Append streamline generators to prevent exponential growth
# in memory consumption
all_streams.extend([generate_sl(i) for i in out_streams])
Expand Down Expand Up @@ -811,7 +811,7 @@ def run_tracking(step_curv_combinations, atlas_data_wm_gm_int, recon_path,
roi_proximal_streamlines,
np.eye(4),
waymask_data,
tol=roi_neighborhood_tol,
tol=0,
mode="any",
)
]
Expand Down
18 changes: 9 additions & 9 deletions tests/test_nodemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@
logger.setLevel(50)


@pytest.mark.parametrize("atlas", ['atlas_aal', 'atlas_talairach_gyrus', 'atlas_talairach_ba', 'atlas_talairach_lobe',
'atlas_harvard_oxford', 'atlas_destrieux_2009'])
def test_nilearn_atlas_helper(atlas):
parc = False
[labels, networks_list, parlistfile] = nodemaker.nilearn_atlas_helper(atlas, parc)
print(labels)
print(networks_list)
print(parlistfile)
assert labels is not None
# @pytest.mark.parametrize("atlas", ['atlas_aal', 'atlas_talairach_gyrus', 'atlas_talairach_ba', 'atlas_talairach_lobe',
# 'atlas_harvard_oxford', 'atlas_destrieux_2009'])
# def test_nilearn_atlas_helper(atlas):
# parc = False
# [labels, networks_list, parlistfile] = nodemaker.nilearn_atlas_helper(atlas, parc)
# print(labels)
# print(networks_list)
# print(parlistfile)
# assert labels is not None


def test_nodemaker_tools_parlistfile_RSN():
Expand Down

0 comments on commit daff945

Please sign in to comment.