Skip to content

Commit

Permalink
update the init of the fs attribute for base data readers
Browse files Browse the repository at this point in the history
  • Loading branch information
wenh06 committed Aug 16, 2023
1 parent 7138668 commit 8a5c9bf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
11 changes: 11 additions & 0 deletions docs/source/_static/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
span.caption-text {
color: #cc4878;
}

svg {
width: 80%;
}

.math {
text-align: left;
}
.eqno {
float: right;
}
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def setup(app):
True,
)
app.add_transform(AutoStructify)
app.add_css_file("css/custom.css")


latex_documents = [
Expand Down
13 changes: 6 additions & 7 deletions torch_ecg/databases/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,8 +457,8 @@ def __init__(
)
# `self.fs` for those with single signal source, e.g. ECG,
# for those with multiple signal sources like PSG,
# self.fs is default to the frequency of ECG if ECG applicable
self.fs = None
# `self.fs` is default to the frequency of ECG if ECG applicable
self.fs = kwargs.get("fs", None)
self._all_records = None
self._version = None
self._url_compressed = None
Expand Down Expand Up @@ -961,7 +961,7 @@ def __init__(
verbose=verbose,
**kwargs,
)
self.fs = None
self.fs = kwargs.get("fs", None)
self._all_records = None
self.file_opened = None

Expand Down Expand Up @@ -1137,8 +1137,7 @@ def __init__(
verbose=verbose,
**kwargs,
)

self.fs = None
self.fs = kwargs.get("fs", None)
self._all_records = None

self.kwargs = kwargs
Expand Down Expand Up @@ -1267,7 +1266,7 @@ def format_database_docstring(self, indent: Optional[str] = None) -> str:
NOTE
----
An environment variable ``DB_BIB_LOOKUP`` can be set to
`True` to enable the lookup of the bib entries.
``True`` to enable the lookup of the bib entries.
"""
if indent is None:
Expand Down Expand Up @@ -1428,7 +1427,7 @@ def plot_hypnogram(
-------
fig : matplotlib.figure.Figure
Figure object.
ax : matplotlib.axes._subplots.AxesSubplot
ax : matplotlib.axes.Axes
Axes object.
"""
Expand Down

0 comments on commit 8a5c9bf

Please sign in to comment.