Skip to content

Commit

Permalink
Merge pull request dipy#3320 from jhlegarreta/MiscDocImprovements2
Browse files Browse the repository at this point in the history
DOC: Miscellaneous documentation improvements (part 2)
  • Loading branch information
skoudoro authored Aug 20, 2024
2 parents 5e074dd + f64317c commit 754b5e7
Show file tree
Hide file tree
Showing 20 changed files with 136 additions and 127 deletions.
19 changes: 10 additions & 9 deletions dipy/align/streamlinear.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def __init__(self, matopt, xopt, fopt, matopt_history, funcs, iterations):
Parameters
----------
matrix : array,
matopt : array,
4x4 affine matrix which transforms the moving to the static
streamlines
Expand All @@ -592,7 +592,7 @@ def __init__(self, matopt, xopt, fopt, matopt_history, funcs, iterations):
fopt : float,
final value of the metric
matrix_history : array
matopt_history : array
All transformation matrices created during the optimization
funcs : int,
Expand Down Expand Up @@ -1057,7 +1057,9 @@ def slr_with_qbx(
Parameters
----------
static : Streamlines
moving : Streamlines
Fixed or reference set of streamlines.
moving : streamlines
Moving streamlines.
x0 : str, optional.
rigid, similarity or affine transformation model (default affine)
Expand All @@ -1076,20 +1078,19 @@ def slr_with_qbx(
If True, logs information about optimization. Default: False
greater_than : int, optional
Keep streamlines that have length greater than
this value (default 50)
Keep streamlines that have length greater than this value.
less_than : int, optional
Keep streamlines have length less than this value (default 250)
Keep streamlines have length less than this value.
qbx_thr : variable int
Thresholds for QuickBundlesX (default [40, 30, 20, 15])
Thresholds for QuickBundlesX.
nb_pts : int, optional
Number of points for discretizing each streamline (default 20)
Number of points for discretizing each streamline.
progressive : boolean, optional
(default True)
True to enable progressive registration.
rng : np.random.Generator
If None creates random generator in function.
Expand Down
8 changes: 5 additions & 3 deletions dipy/data/fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -2261,7 +2261,7 @@ def read_bundles_2_subjects(
bundles : array-like
E.g., ['af.left', 'cst.right', 'cc_1']. See all the available bundles
in the ``exp_bundles_maps/bundles_2_subjects`` directory of your
``$HOME/.dipy`` folder.
``DIPY_HOME`` of ``$HOME/.dipy`` folder.
Returns
-------
Expand Down Expand Up @@ -2618,7 +2618,8 @@ def fetch_hcp(
profile_name : string, optional
The name of the AWS profile used for access. Default: "hcp"
path : string, optional
Path to save files into. Default: '~/.dipy'
Path to save files into. Defaults to the value of the ``DIPY_HOME``
environment variable is set; otherwise, defaults to ``$HOME/.dipy``.
study : string, optional
Which HCP study to grab. Default: 'HCP_1200'
aws_access_key_id : string, optional
Expand Down Expand Up @@ -2838,7 +2839,8 @@ def fetch_hbn(subjects, *, path=None, include_afq=False):
For example: ["NDARAA948VFH", "NDAREK918EC2"].
path : string, optional
Path to save files into. Default: '~/.dipy'
Path to save files into. Defaults to the value of the ``DIPY_HOME``
environment variable is set; otherwise, defaults to ``$HOME/.dipy``.
include_afq : bool, optional
Whether to include pyAFQ derivatives. Default: False
Expand Down
1 change: 0 additions & 1 deletion dipy/denoise/gibbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import multiprocessing as mp

import numpy as np
import scipy
import scipy.fft

from dipy.testing.decorators import warning_for_keywords
Expand Down
2 changes: 1 addition & 1 deletion dipy/denoise/shift_twist_convolution.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def convolve(odfs_sh, kernel, sh_order_max, *, test_mode=False, num_threads=None
Number of threads to be used for OpenMP parallelization. If None
(default) the value of OMP_NUM_THREADS environment variable is used
if it is set, otherwise all available threads are used. If < 0 the
maximal number of threads minus |num_threads + 1| is used (enter -1 to
maximal number of threads minus $|num_threads + 1|$ is used (enter -1 to
use as many threads as possible). 0 raises an error.
normalize : boolean
Apply max-normalization to the output such that its value range matches
Expand Down
24 changes: 12 additions & 12 deletions dipy/reconst/csdeconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ def auto_response(
until="1.4",
)
def response_from_mask(gtab, data, mask):
"""Computation of single-shell single-tissue (ssst) response
function from a given mask.
"""Computation of single-shell single-tissue (ssst) response function from a
given mask.
Parameters
----------
Expand Down Expand Up @@ -679,7 +679,7 @@ def csdeconv(dwsignal, X, B_reg, tau=0.1, convergence=50, P=None):
solve $Qf_n = z$ using Cholesky decomposition
We'd like to thanks Donald Tournier for his help with describing and
We would like to thank Donald Tournier for his help with describing and
implementing this algorithm.
References
Expand Down Expand Up @@ -753,19 +753,19 @@ def odf_deconv(odf_sh, R, B_reg, lambda_=1.0, tau=0.1, r2_term=False):
Parameters
----------
odf_sh : ndarray (``(sh_order_max + 1)*(sh_order_max + 2)/2``,)
ndarray of SH coefficients for the ODF spherical function to be
deconvolved
ndarray of SH coefficients for the ODF spherical function to be
deconvolved
R : ndarray (``(sh_order_max + 1)(sh_order_max + 2)/2``,
``(sh_order_max + 1)(sh_order_max + 2)/2``)
SDT matrix in SH basis
``(sh_order_max + 1)(sh_order_max + 2)/2``)
SDT matrix in SH basis
B_reg : ndarray (``(sh_order_max + 1)(sh_order_max + 2)/2``,
``(sh_order_max + 1)(sh_order_max + 2)/2``)
SH basis matrix used for deconvolution
``(sh_order_max + 1)(sh_order_max + 2)/2``)
SH basis matrix used for deconvolution
lambda_ : float
lambda parameter in minimization equation (default 1.0)
lambda parameter in minimization equation (default 1.0)
tau : float
threshold (``tau *max(fODF)``) controlling the amplitude below
which the corresponding fODF is assumed to be zero.
threshold (``tau *max(fODF)``) controlling the amplitude below
which the corresponding fODF is assumed to be zero.
r2_term : bool
True if ODF is computed from model that uses the $r^2$ term in the
integral. Recall that Tuch's ODF (used in Q-ball Imaging [1]_) and
Expand Down
56 changes: 23 additions & 33 deletions dipy/reconst/cti.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def split_cti_params(cti_params):
Parameters
----------
params: numpy.ndarray (..., 48)
cti_params: numpy.ndarray (..., 48)
All parameters estimated from the correlation tensor model.
Parameters are ordered as follows:
Expand Down Expand Up @@ -141,14 +141,14 @@ def cti_prediction(cti_params, gtab1, gtab2, S0=1):
Parameters
----------
cti_params: numpy.ndarray (..., 48)
All parameters estimated from the correlation tensor model.
Parameters are ordered as follows:
All parameters estimated from the correlation tensor model.
Parameters are ordered as follows:
1. Three diffusion tensor's eigenvalues
2. Three lines of the eigenvector matrix each containing the
first, second and third coordinates of the eigenvector
3. Fifteen elements of the kurtosis tensor
4. Twenty-One elements of the covariance tensor
1. Three diffusion tensor's eigenvalues
2. Three lines of the eigenvector matrix each containing the
first, second and third coordinates of the eigenvector
3. Fifteen elements of the kurtosis tensor
4. Twenty-One elements of the covariance tensor
gtab1: dipy.core.gradients.GradientTable
A GradientTable class instance for first DDE diffusion epoch
Expand Down Expand Up @@ -279,14 +279,14 @@ def predict(self, cti_params, S0=1):
Parameters
----------
cti_params: numpy.ndarray (..., 48)
All parameters estimated from the correlation tensor model.
Parameters are ordered as follows:
All parameters estimated from the correlation tensor model.
Parameters are ordered as follows:
1. Three diffusion tensor's eigenvalues
2. Three lines of the eigenvector matrix each containing the
first, second and third coordinates of the eigenvector
3. Fifteen elements of the kurtosis tensor
4. Twenty-One elements of the covariance tensor
1. Three diffusion tensor's eigenvalues
2. Three lines of the eigenvector matrix each containing the
first, second and third coordinates of the eigenvector
3. Fifteen elements of the kurtosis tensor
4. Twenty-One elements of the covariance tensor
gtab1: dipy.core.gradients.GradientTable
A GradientTable class instance for first DDE diffusion epoch
Expand Down Expand Up @@ -342,16 +342,6 @@ def predict(self, gtab1, gtab2, S0=1):
Parameters
----------
params: numpy.ndarray (...,43)
All parameters estimated from the correlation tensor model.
Parameters are ordered as follows:
1. Three diffusion tensor's eigenvalues
2. Three lines of the eigenvector matrix each containing the
first, second and third coordinates of the eigenvector
3. Fifteen elements of the kurtosis tensor
4. Twenty-One elements of the covariance tensor
gtab1: dipy.core.gradients.GradientTable
A GradientTable class instance for first DDE diffusion epoch
gtab2: dipy.core.gradients.GradientTable
Expand Down Expand Up @@ -569,14 +559,14 @@ def ls_fit_cti(
Returns
-------
cti_params : array (48)
All parameters estimated from the diffusion kurtosis model for all N
voxels. Parameters are ordered as follows:
1) Three diffusion tensor eigenvalues.
2) Three blocks of three elements, containing the first second and
third coordinates of the diffusion tensor eigenvectors.
3) Fifteen elements of the kurtosis tensor.
4) Twenty One elements of the covariance tensor.
All parameters estimated from the diffusion kurtosis model for all N
voxels. Parameters are ordered as follows:
1) Three diffusion tensor eigenvalues.
2) Three blocks of three elements, containing the first second and
third coordinates of the diffusion tensor eigenvectors.
3) Fifteen elements of the kurtosis tensor.
4) Twenty One elements of the covariance tensor.
"""
A = design_matrix
Expand Down
Loading

0 comments on commit 754b5e7

Please sign in to comment.