dmri-commit 2.3.0__tar.gz → 2.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. {dmri_commit-2.3.0/dmri_commit.egg-info → dmri_commit-2.3.1}/PKG-INFO +1 -1
  2. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/core.pyx +5 -6
  3. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/trk2dictionary/trk2dictionary.pyx +2 -2
  4. {dmri_commit-2.3.0 → dmri_commit-2.3.1/dmri_commit.egg-info}/PKG-INFO +1 -1
  5. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/pyproject.toml +1 -1
  6. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/LICENSE +0 -0
  7. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/MANIFEST.in +0 -0
  8. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/README.md +0 -0
  9. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/__init__.py +0 -0
  10. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/models.py +0 -0
  11. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/operator/__init__.py +0 -0
  12. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/operator/operator.pyx +0 -0
  13. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/operator/operator_c.c +0 -0
  14. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/proximals.pyx +0 -0
  15. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/solvers.py +0 -0
  16. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/trk2dictionary/ProgressBar.h +0 -0
  17. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/trk2dictionary/Vector.h +0 -0
  18. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/commit/trk2dictionary/trk2dictionary_c.cpp +0 -0
  19. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/dmri_commit.egg-info/SOURCES.txt +0 -0
  20. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/dmri_commit.egg-info/dependency_links.txt +0 -0
  21. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/dmri_commit.egg-info/requires.txt +0 -0
  22. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/dmri_commit.egg-info/top_level.txt +0 -0
  23. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/setup.cfg +0 -0
  24. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/setup.py +0 -0
  25. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/setup_operator.py +0 -0
  26. {dmri_commit-2.3.0 → dmri_commit-2.3.1}/tests/test_demo.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dmri-commit
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: Convex Optimization Modeling for Microstructure Informed Tractography (COMMIT)
5
5
  Author-email: Alessandro Daducci <alessandro.daducci@univr.it>
6
6
  Maintainer-email: DICE lab <DICE_lab@strutture.univr.it>
@@ -986,6 +986,9 @@ cdef class Evaluation :
986
986
 
987
987
  # check if group_weights_extra is consistent with the number of groups
988
988
  if (regularisation['regIC'] == 'group_lasso' or regularisation['regIC'] == 'sparse_group_lasso') and 'group_weights_extra' in dictIC_params:
989
+ if type(dictIC_params['group_weights_extra']) not in [list, np.ndarray]:
990
+ logger.error('"group_weights_extra" must be a list or a numpy array')
991
+ dictIC_params['group_weights_extra'] = np.array(dictIC_params['group_weights_extra'], dtype=np.float64)
989
992
  if np.any(dictIC_params['group_weights_extra'] < 0):
990
993
  logger.error('All group weights must be non-negative')
991
994
  if dictIC_params['group_weights_extra'].size != dictIC_params['group_idx'].size:
@@ -1074,7 +1077,7 @@ cdef class Evaluation :
1074
1077
  logger.debug( f'Lambda used: {regularisation["lambdaIC"]}' )
1075
1078
  if regularisation['regIC'] == 'group_lasso' or regularisation['regIC'] == 'sparse_group_lasso':
1076
1079
  logger.debug( f'Number of groups: {len(dictIC_params["group_idx_kept"])}' )
1077
- if dictIC_params['group_weights_cardinality']==False and dictIC_params['group_weights_adaptive']==False and dictIC_params['group_weights_extra'] is None:
1080
+ if dictIC_params['group_weights_cardinality']==False and dictIC_params['group_weights_adaptive']==False and not ('group_weights_extra' in dictIC_params):
1078
1081
  logger.debug( 'Group weights are not considered (all ones)' )
1079
1082
  else:
1080
1083
  str_weights = 'Group weights computed using '
@@ -1595,14 +1598,10 @@ cdef class Evaluation :
1595
1598
  log_list = []
1596
1599
  ret_subinfo = logger.subinfo('results.pickle', indent_char='-', indent_lvl=2, with_progress=True)
1597
1600
  with ProgressBar(disable=self.verbose < 3, hide_on_exit=True, subinfo=ret_subinfo, log_list=log_list):
1598
- xic, xec, xiso = self.get_coeffs()
1599
- x = self.x
1600
- if self.get_config('doNormalizeKernels') :
1601
- x = x * np.hstack( (norm1*norm_fib,norm2,norm3) )
1602
1601
  with open( pjoin(RESULTS_path,'results.pickle'), 'wb+' ) as fid :
1603
1602
  self.CONFIG['optimization']['regularisation'].pop('omega', None)
1604
1603
  self.CONFIG['optimization']['regularisation'].pop('prox', None)
1605
- pickle.dump( [self.CONFIG, x, self.x], fid, protocol=2 )
1604
+ pickle.dump( [self.CONFIG, self.x, x], fid, protocol=2 )
1606
1605
 
1607
1606
  if save_est_dwi:
1608
1607
  log_list = []
@@ -324,14 +324,14 @@ cpdef run( filename_tractogram=None, path_out=None, filename_peaks=None, filenam
324
324
  log_list = []
325
325
  ret_subinfo = logger.subinfo(f'Clustering with threshold = {blur_clust_thr[0]}', indent_lvl=2, indent_char='-', with_progress=verbose>2)
326
326
  with ProgressBar(disable=verbose<3, hide_on_exit=True, subinfo=ret_subinfo, log_list=log_list):
327
- idx_centroids = run_clustering(tractogram_in=filename_tractogram, tractogram_out=filename_out,
327
+ idx_centroids, _ = run_clustering(tractogram_in=filename_tractogram, tractogram_out=filename_out,
328
328
  temp_folder=path_temp, atlas=blur_clust_groupby, clust_thr=blur_clust_thr[0],
329
329
  n_threads=n_threads, keep_temp_files=True, force=True, verbose=1, log_list=log_list)
330
330
  else:
331
331
  log_list = []
332
332
  ret_subinfo = logger.subinfo(f'Clustering with threshold = {blur_clust_thr[0]}', indent_lvl=2, indent_char='-', with_progress=verbose>2)
333
333
  with ProgressBar(disable=verbose<3, hide_on_exit=True, subinfo=ret_subinfo, log_list=log_list):
334
- idx_centroids = run_clustering(tractogram_in=filename_tractogram, tractogram_out=filename_out,
334
+ idx_centroids, _ = run_clustering(tractogram_in=filename_tractogram, tractogram_out=filename_out,
335
335
  temp_folder=path_temp, clust_thr=blur_clust_thr[0],
336
336
  keep_temp_files=True, force=True, verbose=1)
337
337
  filename_tractogram = filename_out
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dmri-commit
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: Convex Optimization Modeling for Microstructure Informed Tractography (COMMIT)
5
5
  Author-email: Alessandro Daducci <alessandro.daducci@univr.it>
6
6
  Maintainer-email: DICE lab <DICE_lab@strutture.univr.it>
@@ -8,7 +8,7 @@ build-backend = "setuptools.build_meta"
8
8
 
9
9
  [project]
10
10
  name = "dmri-commit"
11
- version = "2.3.0"
11
+ version = "2.3.1"
12
12
  dependencies = [
13
13
  "dmri-amico>=2.0.1",
14
14
  "dmri-dicelib>=1.1.0",
File without changes
File without changes
File without changes
File without changes
File without changes