diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 7568093..6e4c340 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -40,9 +40,9 @@ $ python -m unittest Documentation ============= -Each new feature should be documented in the documentation. The documention is stored under the directory``docs/``. +Each new feature should be documented in the documentation. The documentation is stored under the directory``docs/``. -You can build the docmentation in HTML format locally using Sphinx:: +You can build the documentation in HTML format locally using Sphinx:: $ cd docs $ make html diff --git a/sigpy/__init__.py b/sigpy/__init__.py index a053a4f..66f093f 100644 --- a/sigpy/__init__.py +++ b/sigpy/__init__.py @@ -5,7 +5,7 @@ All functions, except wavelet transform, can run on both CPU and GPU. These functions are wrapped into higher level classes (Linop and Prox) -that can be used in conjuction with Alg to form an App. +that can be used in conjunction with Alg to form an App. """ from sigpy import ( diff --git a/sigpy/alg.py b/sigpy/alg.py index e1bd9aa..1e45d4a 100644 --- a/sigpy/alg.py +++ b/sigpy/alg.py @@ -387,7 +387,7 @@ def _update(self): util.axpy(self.x, -self.tau, self.AH(self.u)) backend.copyto(self.x, self.proxg(self.tau, self.x)) - # Update step-size if neccessary. + # Update step-size if necessary. if self.gamma_primal > 0 and self.gamma_dual == 0: with self.x_device: xp = self.x_device.xp @@ -425,7 +425,7 @@ class AltMin(Alg): Args: min1 (function): Function to minimize over variable 1. - min2 (function): Funciton to minimize over variable 2. + min2 (function): Function to minimize over variable 2. max_iter (int): Maximum number of iterations. """ diff --git a/sigpy/app.py b/sigpy/app.py index f2fe1ff..c971e7e 100644 --- a/sigpy/app.py +++ b/sigpy/app.py @@ -525,7 +525,7 @@ def objective(self): class L2ConstrainedMinimization(App): - r"""L2 contrained minimization application. + r"""L2 constrained minimization application. Solves for problem: diff --git a/sigpy/linop.py b/sigpy/linop.py index 98fa23a..b0ba370 100644 --- a/sigpy/linop.py +++ b/sigpy/linop.py @@ -264,7 +264,7 @@ def _adjoint_linop(self): class AllReduceAdjoint(Linop): - """All reduce adjoint operator. Equivalant to identity. + """All reduce adjoint operator. Equivalent to identity. Args: shape (tuple of ints): Input/output shape. @@ -460,7 +460,7 @@ class Hstack(Linop): Creates a Linop that splits the input, applies Linops independently, and sums outputs. - In matrix form, this is equivalant to given matrices {A1, ..., An}, + In matrix form, this is equivalent to given matrices {A1, ..., An}, returns [A1, ..., An]. Input and output devices must be the same. @@ -553,7 +553,7 @@ class Vstack(Linop): Creates a Linop that applies linops independently, and concatenates outputs. - In matrix form, this is equivalant to given matrices {A1, ..., An}, + In matrix form, this is equivalent to given matrices {A1, ..., An}, returns [A1.T, ..., An.T].T. Args: @@ -722,7 +722,7 @@ def _normal_linop(self): class Transpose(Linop): - """Tranpose input with the given axes. + """Transpose input with the given axes. Args: ishape (tuple of ints): Input shape. diff --git a/sigpy/mri/rf/multiband.py b/sigpy/mri/rf/multiband.py index dd6bd41..39c74c3 100644 --- a/sigpy/mri/rf/multiband.py +++ b/sigpy/mri/rf/multiband.py @@ -302,7 +302,7 @@ def dz_pins( """ kz_width = tb / sl_thick # 1/cm, width in k-space we must go - # calcualte number of subpulses (odd) + # calculate number of subpulses (odd) n_pulses = int(2 * np.floor(np.ceil(kz_width / (1 / sl_sep)) / 2)) # call SLR to get envelope rf_soft = slr.dzrf(n_pulses, tb, ptype, ftype, d1, d2) diff --git a/sigpy/mri/rf/optcont.py b/sigpy/mri/rf/optcont.py index c9dc7e6..67db5e0 100644 --- a/sigpy/mri/rf/optcont.py +++ b/sigpy/mri/rf/optcont.py @@ -94,7 +94,7 @@ def deriv(rf, x, g, auxa, auxb, af, bf): ar = ar * z br = br * z - # strip off the curent rf rotation from forward sim + # strip off the current rf rotation from forward sim c = xp.cos(xp.abs(rf[mm]) / 2) s = 1j * xp.exp(1j * xp.angle(rf[mm])) * xp.sin(xp.abs(rf[mm]) / 2) at = af * c + bf * xp.conj(s) diff --git a/sigpy/mri/rf/slr.py b/sigpy/mri/rf/slr.py index 147e040..eda63e0 100644 --- a/sigpy/mri/rf/slr.py +++ b/sigpy/mri/rf/slr.py @@ -602,7 +602,7 @@ def root_flip(b, d1, flip, tb, verbose=False): d1 (float): passband ripple level. flip (array): target flip angle. tb (int): pulse time bandwidth product. - verbose (bool): print feeback on iterations. + verbose (bool): print feedback on iterations. Returns: 2-element tuple containing diff --git a/sigpy/mri/rf/trajgrad.py b/sigpy/mri/rf/trajgrad.py index 0e3faa6..036b900 100755 --- a/sigpy/mri/rf/trajgrad.py +++ b/sigpy/mri/rf/trajgrad.py @@ -862,7 +862,7 @@ def sdotmax( # Given a k-space curve C (in [1/cm] units), maximum gradient amplitude # (in G/cm) and maximum slew-rate (in G/(cm*ms)). # This function calculates the upper bound for the time parametrization - # sdot (which is a non scaled max gradient constaint) as a function + # sdot (which is a non scaled max gradient constraint) as a function # of s. # # cs -- spline polynomial @@ -894,12 +894,12 @@ def sdotmax( return sdot, k - # Curve in arbitrary paramater space, cubic spline + # Curve in arbitrary parameter space, cubic spline num_p = c.shape[0] p = np.linspace(0, 1, num_p, endpoint=True) cp = interpolate.CubicSpline(p, c, axis=0) - # Integrate absolute value to find length and s(arc) vs p(paramater) + # Integrate absolute value to find length and s(arc) vs p(parameter) cp1_spline = cp.derivative() p_highres = np.linspace(0, 1, num_p * 10) cp1_highres = cp1_spline(p_highres) diff --git a/sigpy/mri/sim.py b/sigpy/mri/sim.py index 4a9b9d9..a9cda10 100644 --- a/sigpy/mri/sim.py +++ b/sigpy/mri/sim.py @@ -7,7 +7,7 @@ def birdcage_maps(shape, r=1.5, nzz=8, dtype=np.complex128): - """Simulates birdcage coil sensitivies. + """Simulates birdcage coil sensitivities. Args: shape (tuple of ints): sensitivity maps shape, diff --git a/sigpy/prox.py b/sigpy/prox.py index d80dd1f..bd75cb1 100644 --- a/sigpy/prox.py +++ b/sigpy/prox.py @@ -84,7 +84,7 @@ def _prox(self, alpha, input): class NoOp(Prox): - r"""Proximal operator for empty function. Equivalant to an identity function. + r"""Proximal operator for empty function. Equivalent to an identity function. Args: shape (tuple of ints): Input shape diff --git a/sigpy/thresh.py b/sigpy/thresh.py index 40ef0a6..c1feb4d 100644 --- a/sigpy/thresh.py +++ b/sigpy/thresh.py @@ -138,7 +138,7 @@ def linf_proj(eps, input, bias=None): def psd_proj(input): - """Projection onto postiive semi-definite matrices. + """Projection onto positive semi-definite matrices. Args: input (array): a two-dimensional matrix. diff --git a/sigpy/util.py b/sigpy/util.py index df9a5fa..415ddbe 100644 --- a/sigpy/util.py +++ b/sigpy/util.py @@ -92,7 +92,7 @@ def split(vec, oshapes): oshapes (list of tuple of ints): Output shapes. Returns: - list of arrays: Splitted outputs. + list of arrays: Split outputs. """ outputs = [] for oshape in oshapes: