@@ -305,7 +305,7 @@ def add_data(self, freqs, power_spectrum, freq_range=None, clear_results=True):
305305 """
306306
307307 # If any data is already present, then clear previous data
308- # Also clear results, is results are present, unless indicated not to
308+ # Also clear results, if present, unless indicated not to
309309 # This is to ensure object consistency of all data & results
310310 self ._reset_data_results (clear_freqs = self .has_data ,
311311 clear_spectrum = self .has_data ,
@@ -860,7 +860,7 @@ def _fit_peaks(self, flat_iter):
860860 guess_std = compute_gauss_std (fwhm )
861861
862862 except ValueError :
863- # This procedure can fail (extremely rarely), if both le & ri ind's end up as None
863+ # This procedure can fail (very rarely), if both left & right inds end up as None
864864 # In this case, default the guess to the average of the peak width limits
865865 guess_std = np .mean (self .peak_width_limits )
866866
@@ -1036,21 +1036,21 @@ def _drop_peak_overlap(self, guess):
10361036 Notes
10371037 -----
10381038 For any gaussians with an overlap that crosses the threshold,
1039- the lowest height guess guassian is dropped.
1039+ the lowest height guess Gaussian is dropped.
10401040 """
10411041
1042- # Sort the peak guesses by increasing frequency, so adjacenent peaks can
1043- # be compared from right to left.
1042+ # Sort the peak guesses by increasing frequency
1043+ # This is so adjacent peaks can be compared from right to left
10441044 guess = sorted (guess , key = lambda x : float (x [0 ]))
10451045
10461046 # Calculate standard deviation bounds for checking amount of overlap
1047- # The bounds are the gaussian frequncy +/- gaussian standard deviation
1047+ # The bounds are the gaussian frequency +/- gaussian standard deviation
10481048 bounds = [[peak [0 ] - peak [2 ] * self ._gauss_overlap_thresh ,
10491049 peak [0 ] + peak [2 ] * self ._gauss_overlap_thresh ] for peak in guess ]
10501050
10511051 # Loop through peak bounds, comparing current bound to that of next peak
10521052 # If the left peak's upper bound extends pass the right peaks lower bound,
1053- # Then drop the guassian with the lower height.
1053+ # then drop the Gaussian with the lower height
10541054 drop_inds = []
10551055 for ind , b_0 in enumerate (bounds [:- 1 ]):
10561056 b_1 = bounds [ind + 1 ]
0 commit comments