Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the load_data method of the database readers #11

Merged
merged 5 commits into from
Aug 21, 2023
Merged

Conversation

wenh06
Copy link
Collaborator

@wenh06 wenh06 commented Aug 20, 2023

An optional argument return_fs is added to the method load_data, by setting which to be True, the returned valued of load_data has signature

Tuple[np.ndarray, Real]

and the elements of the tuple are

data : numpy.ndarray
    The ECG data loaded from the record,
    with given `units` and `data_format`.
data_fs : numbers.Real, optional
    Sampling frequency of the output signal.

The default value for return_fs is False, so that the default behaviour of load_data is unchanged.

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #11 (9207284) into master (8a5c9bf) will increase coverage by 0.03%.
The diff coverage is 98.11%.

@@            Coverage Diff             @@
##           master      #11      +/-   ##
==========================================
+ Coverage   92.97%   93.01%   +0.03%     
==========================================
  Files         136      136              
  Lines       18115    18155      +40     
==========================================
+ Hits        16843    16887      +44     
+ Misses       1272     1268       -4     
Files Changed Coverage Δ
torch_ecg/databases/base.py 89.54% <90.00%> (-0.06%) ⬇️
torch_ecg/databases/cpsc_databases/cpsc2018.py 96.29% <100.00%> (+0.06%) ⬆️
torch_ecg/databases/cpsc_databases/cpsc2019.py 96.85% <100.00%> (+0.06%) ⬆️
torch_ecg/databases/cpsc_databases/cpsc2020.py 98.05% <100.00%> (+0.03%) ⬆️
torch_ecg/databases/nsrr_databases/shhs.py 92.51% <100.00%> (+0.02%) ⬆️
torch_ecg/databases/other_databases/cachet_cadb.py 89.32% <100.00%> (+0.15%) ⬆️
torch_ecg/databases/other_databases/sph.py 88.12% <100.00%> (+0.10%) ⬆️
...rch_ecg/databases/physionet_databases/apnea_ecg.py 94.89% <100.00%> (ø)
...orch_ecg/databases/physionet_databases/cinc2018.py 93.33% <100.00%> (+0.22%) ⬆️
...orch_ecg/databases/physionet_databases/cinc2020.py 92.83% <100.00%> (+0.04%) ⬆️
... and 2 more

... and 1 file with indirect coverage changes

@wenh06 wenh06 merged commit 1136f80 into master Aug 21, 2023
15 checks passed
@wenh06 wenh06 deleted the update_load_data branch August 21, 2023 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant