From 65f7f43f65b38f5edefb0efb8e7a38bb910d4ea0 Mon Sep 17 00:00:00 2001 From: Samuel St-Jean <3030760+samuelstjean@users.noreply.github.com> Date: Sat, 20 May 2023 18:11:57 +0200 Subject: [PATCH] tag v0.7 --- CHANGELOG.md | 4 ++-- docs/conf.py | 6 +++--- example/README.md | 6 +++--- nlsam/smoothing.py | 4 ++-- pyproject.toml | 6 ++---- scripts/nlsam_denoising | 4 ++-- 6 files changed, 14 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a75fc79..66faceb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [0.7] Development version +## [0.7] - 2023-05-20 - **Breaking changes in the command line parser** - The previously required options __N__ and __angular_block_size__ are now optional. @@ -24,7 +24,7 @@ - New online documentation available at http://nlsam.readthedocs.io/ for the current (and future) versions. - The dictionary learning part of the algorithm now respects **--cores** instead of ignoring it and always using all available processors. - joblib is now used for parallel processing. - - For now it means we lose the frozen executable until they fix it. + - The frozen executable is now using dask and performs a bit slower than the normal version until joblib.loky is fixed to work with pyinstaller. - Binary wheels are now available for all platforms instead. - A new option to estimate automatically the noise distribution (sigma and N) is now available by passing **auto** to both N and **--noise_est**. - This option is also the new default now. diff --git a/docs/conf.py b/docs/conf.py index d728cbd..6f29f24 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -51,7 +51,7 @@ # General information about the project. project = 'NLSAM' -copyright = '2020, Samuel St-Jean' +copyright = '2023, Samuel St-Jean' author = 'Samuel St-Jean' # The version info for the project you're documenting, acts as replacement for @@ -59,9 +59,9 @@ # built documents. # # The short X.Y version. -version = '0.6.1' +version = '0.7' # The full version, including alpha/beta/rc tags. -release = '0.6.1' +release = '0.7' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. diff --git a/example/README.md b/example/README.md index 76fadc6..0c9f232 100644 --- a/example/README.md +++ b/example/README.md @@ -47,8 +47,8 @@ There are 4 required command line inputs (their order is important) and a switch + The input dataset (dwi.nii.gz) + The output dataset (dwi_nlsam.nii.gz) -+ The b-values file for our input dataset (bvals) -+ The b-vectors file for our input dataset (bvecs) ++ The bvalues file for our input dataset (bvals) ++ The bvectors file for our input dataset (bvecs) + -m or --mask mask.nii.gz for the brain mask The bvals/bvecs files are needed for identifying the angular neighbors and we need to choose how many we want to denoise at once (the default is now 5). @@ -56,7 +56,7 @@ The bvals/bvecs files are needed for identifying the angular neighbors and we ne Using a larger number could mean more blurring if we mix q-space points which are too far part. For a multishell acquisition, only the direction (as opposed to the norm) -of the b-vector is taken into account, so you can freely mix dwi from different +of the bvector is taken into account, so you can freely mix dwi from different shells to favor picking radial decay in the denoising. There is also a new option called **--split_shell** to process each shell by itself separately and **--split_b0s** to process the b0s separately in each block. diff --git a/nlsam/smoothing.py b/nlsam/smoothing.py index f2b3b2e..72f956f 100644 --- a/nlsam/smoothing.py +++ b/nlsam/smoothing.py @@ -23,7 +23,7 @@ def sh_smooth(data, bvals, bvecs, sh_order=4, b0_threshold=1.0, similarity_thres sh_order : int, default 8 Order of the spherical harmonics to fit. similarity_threshold : int, default 50 - All b-values such that |b_1 - b_2| < similarity_threshold + All bvalues such that |b_1 - b_2| < similarity_threshold will be considered as identical for smoothing purpose. Must be lower than 200. regul : float, default 0.006 @@ -56,7 +56,7 @@ def sh_smooth(data, bvals, bvecs, sh_order=4, b0_threshold=1.0, similarity_thres idx = np.abs(unique_bval - bvals) < similarity_threshold rounded_bvals[idx] = unique_bval - # process each b-value separately + # process each bvalue separately for unique_bval in np.unique(rounded_bvals): idx = rounded_bvals == unique_bval diff --git a/pyproject.toml b/pyproject.toml index 99830dc..d669382 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,10 +9,8 @@ build-backend = "setuptools.build_meta" [project] name = "nlsam" -version = '0.6.1' -authors = [ - {name = "Samuel St-Jean"}, -] +version = '0.7' +authors = [{name = "Samuel St-Jean"}] description='Implementation of "Non Local Spatial and Angular Matching : Enabling higher spatial resolution diffusion MRI datasets through adaptive denoising"' readme = "README.md" requires-python = ">=3.7" diff --git a/scripts/nlsam_denoising b/scripts/nlsam_denoising index f06aac6..badc9ff 100755 --- a/scripts/nlsam_denoising +++ b/scripts/nlsam_denoising @@ -86,14 +86,14 @@ def buildArgsParser(): 'This is now a required input to prevent sampling (and reconstructing) background noise instead of the data.') optionals.add_argument('--b0_threshold', metavar='int', default=10, type=int, - help='Lowest b-value to be considered as a b0. Default 10') + help='Lowest bvalue to be considered as a b0. Default 10') optionals.add_argument('--split_b0s', action='store_true', help='If set and multiple b0s are present, they are split amongst the ' 'training data.') optionals.add_argument('--split_shell', action='store_true', - help='If set, each shell/b-value is processed separately by itself.') + help='If set, each shell/bvalue is processed separately by itself.') optionals.add_argument('--bval_threshold', metavar='int', default=25, type=int, help='Any bvalue within += bval_threshold of each others will be considered on the same shell (e.g. b=990 and b=1000 are on the same shell). Default 25')