NeuroKit icon indicating copy to clipboard operation
NeuroKit copied to clipboard

Flexible for int8 and float64

Open DominiqueMakowski opened this issue 2 years ago • 5 comments

ecg_peaks() can handle with int8 format ("uncleaned"), but ecg_delineate() cannot, and seems to accept only float64 (such as returned by ecg_clean()). However, with float64 datasets it quickly runs into memory issues.

Is this something that we can / want to fix?

Discussed in https://github.com/neuropsychology/NeuroKit/discussions/516

Originally posted by J4NPM August 30, 2021 Hi everyone,

I am having issues when dealing with large ECG datasets in neurokit2. ecg_peaks() can handle with int8 format ("uncleaned"), but ecg_delineate() cannot, and seems to accept only float64 (such as returned by ecg_clean()). However, with float64 datasets it quickly runs into memory issues. I also tried running ecg_delineate() on single heartbeats (such as the epochs returned by ecg_segment() or manually selecting small segments of data) and that also raised errors. How to handle large datasets? Is there a way to work entirely with int8 datasets? Is there a way to use ecg_delineate() on a single beat?

Thanks for any help!

DominiqueMakowski avatar Aug 29 '21 23:08 DominiqueMakowski

This is probably due to the later step of sanitizing the columns in epochs_create (the int8 signal is detected as an object and then rendered as a string)

https://github.com/neuropsychology/NeuroKit/blob/abfd08db61d9d9142d796fd2efac149e8f4636e7/neurokit2/epochs/epochs_create.py#L162-L176

Even though this can be easily fixed/avoided, indeed I'm not sure if we may encounter more problems down the pipeline if int formats are accommodated 🤔

zen-juen avatar Aug 30 '21 03:08 zen-juen

@Tam-Pham ?

DominiqueMakowski avatar Sep 02 '21 01:09 DominiqueMakowski

@Tam-Pham ping

DominiqueMakowski avatar Sep 12 '21 23:09 DominiqueMakowski

This issue has been automatically marked as inactive because it has not had recent activity. It will eventually be closed if no further activity occurs.

stale[bot] avatar Mar 12 '22 11:03 stale[bot]

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] avatar Sep 20 '22 19:09 stale[bot]