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

Huge memory requirements in ECG artifact removal #12

Open
tsieger opened this issue Mar 8, 2021 · 2 comments
Open

Huge memory requirements in ECG artifact removal #12

tsieger opened this issue Mar 8, 2021 · 2 comments
Assignees

Comments

@tsieger
Copy link

tsieger commented Mar 8, 2021

ECG artifact removal does not scale with BSTD signal length. It is quadratic in signal length.
For long signals (hours and more), the code does not finish in several hours or simply crashes by requesting too much memory:

...running cross-correlation on 8104 segments...
...ecg template 1 generated...
Error using bsxfun
Out of memory. Type "help memory" for your options.
Error in corr>corrPearson (line 297)
    x = bsxfun(@minus,x,sum(x,1)/n);  % Remove mean
Error in corr (line 212)
        coef = corrFun(rows,tail,x,y);
Error in perceive_ecg (line 49)
r = corr(corrdata,ecg.proc.template1').^2;
Error in perceive (line 521)
                            d.ecg{e} = perceive_ecg(raw(e,:));
@neumann-wj
Copy link
Contributor

Interesting, I would not have believed anyone would record/stream for hours. That must cause a huge battery drain for the patients? Would you be able to share such a file, so I can try to improve performance?

@neumann-wj
Copy link
Contributor

It would probably make sense to include ECG processing into the options. Run ECG, but also whether the original signal should be replaced by cleaned data could be an option there.

@neumann-wj neumann-wj self-assigned this Apr 8, 2021
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

No branches or pull requests

2 participants