Skip to content

Commit 0c85181

Browse files
committed
typo sweep
1 parent 86185a2 commit 0c85181

File tree

17 files changed

+33
-38
lines changed

17 files changed

+33
-38
lines changed

fooof/analysis/error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def compute_pointwise_error_fg(fg, plot_errors=True, return_errors=False, **plt_
102102

103103

104104
def compute_pointwise_error(model, data):
105-
"""Calculate pointwise error between original data and a model fit of that data.
105+
"""Calculate point-wise error between original data and a model fit of that data.
106106
107107
Parameters
108108
----------

fooof/bands/bands.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""A data oject for managing band definitions."""
1+
"""A data object for managing band definitions."""
22

33
from collections import OrderedDict
44

@@ -60,7 +60,7 @@ def __len__(self):
6060
return self.n_bands
6161

6262
def __iter__(self):
63-
"""Define iteratation as stepping across each band."""
63+
"""Define iteration as stepping across each band."""
6464

6565
for label, band_definition in self.bands.items():
6666
yield (label, band_definition)

fooof/core/info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def get_ap_indices(aperiodic_mode):
7070
Returns
7171
-------
7272
indices : dict
73-
Mapping of the column labels and indices for the aperiodc parameters.
73+
Mapping of the column labels and indices for the aperiodic parameters.
7474
"""
7575

7676
if aperiodic_mode == 'fixed':

fooof/core/io.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def load_json(file_name, file_path):
198198

199199

200200
def load_jsonlines(file_name, file_path):
201-
"""Load a jsonlines file, yielding data line by line.
201+
"""Load a json-lines file, yielding data line by line.
202202
203203
Parameters
204204
----------

fooof/core/modutils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def docs_append_to_section(docstring, section, add):
7979
8080
Parameters
8181
----------
82-
ds : str
82+
docstring : str
8383
Docstring to update.
8484
section : str
8585
Name of the section within the docstring to add to.

fooof/core/reports.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
REPORT_FONT = {'family': 'monospace',
1717
'weight': 'normal',
1818
'size': 16}
19+
SAVE_FORMAT = 'pdf'
1920

2021
###################################################################################################
2122
###################################################################################################
@@ -61,7 +62,7 @@ def save_report_fm(fm, file_name, file_path=None, plt_log=False):
6162
ax2.set_yticks([])
6263

6364
# Save out the report
64-
plt.savefig(fpath(file_path, fname(file_name, 'pdf')))
65+
plt.savefig(fpath(file_path, fname(file_name, SAVE_FORMAT)))
6566
plt.close()
6667

6768

@@ -104,5 +105,5 @@ def save_report_fg(fg, file_name, file_path=None):
104105
plot_fg_peak_cens(fg, ax3)
105106

106107
# Save out the report
107-
plt.savefig(fpath(file_path, fname(file_name, 'pdf')))
108+
plt.savefig(fpath(file_path, fname(file_name, SAVE_FORMAT)))
108109
plt.close()

fooof/core/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def check_inds(inds):
210210
This function works only on indices defined for 1 dimension.
211211
"""
212212

213-
# Typcasting: if a single int, convert to an array
213+
# Typecasting: if a single int, convert to an array
214214
if isinstance(inds, int):
215215
inds = np.array([inds])
216216
# Typecasting: if a list or range, convert to an array

fooof/objs/fit.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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]

fooof/objs/group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def _check_width_limits(self):
557557
"""Check and warn about bandwidth limits / frequency resolution interaction."""
558558

559559
# Only check & warn on first power spectrum
560-
# This is to avoid spamming stdout for every spectrum in the group
560+
# This is to avoid spamming standard output for every spectrum in the group
561561
if self.power_spectra[0, 0] == self.power_spectrum[0]:
562562
super()._check_width_limits()
563563

fooof/objs/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def combine_fooofs(fooofs):
138138
--------
139139
Combine FOOOF objects together (where `fm1`, `fm2` & `fm3` are assumed to be defined and fit):
140140
141-
>>> fg = combine_fooofs([fm1, fm2, f3]) # doctest:+SKIP
141+
>>> fg = combine_fooofs([fm1, fm2, fm3]) # doctest:+SKIP
142142
143143
Combine FOOOFGroup objects together (where `fg1` & `fg2` are assumed to be defined and fit):
144144

0 commit comments

Comments
 (0)