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

PDF is exporting empty files #1

Open
sevenmp opened this issue Sep 20, 2022 · 3 comments
Open

PDF is exporting empty files #1

sevenmp opened this issue Sep 20, 2022 · 3 comments

Comments

@sevenmp
Copy link

sevenmp commented Sep 20, 2022

Hi team,

Whenever I try opening the pdf with the result of the ECG I always get an empty file. Im running Android 11 on a oneplus8 pro.

Additionally how can I convert the csv to a plot of the ecg?

@the-3d6
Copy link
Contributor

the-3d6 commented Sep 22, 2022

PDF file is valid only if more than 1 minute of data was recorded, was that the case in your testing? Also, if you try to open it before recording was stopped, it may be not properly saved.
Does "snapshot" work?

There are two csv files created per record, "uecg_dat" where 2nd column is raw readings - you can plot them with any tool that can plot time series - you'll see ECG there. Data rate is 122 Hz. First column is timestamp - but it's a timestamp when a data packet was received, so several points may have the same timestamp, it can be used for general timing reference but not for XY plotting.
Second file is "uecg_log" with various additional data recorded (RR intervals, BPM, RMSSD, steps, accelerometer data - its first line has names for each column)

@sevenmp
Copy link
Author

sevenmp commented Sep 23, 2022

Tried opening PDF after the recording was stopped. Every time I try the pdf has 0 bytes.
Snapshot does work but it is not enough to show my Cardiologist. Question: when I press the snapshot does it give you the previous 60s? or 30s before + 30s after the mark?

Can you recommend any tool I can use to plot this as I am unable to get there?

@astartav
Copy link

Hi, @sevenmp, let's debug:

1. Saved PDFs are empty

Tried opening PDF after the recording was stopped. Every time I try the pdf has 0 bytes.

We have just tested pdf saving on a couple more phones (Android 11, 9) and it worked, except for two conditions:

  • if the app version was old: this doesn't look like your issue, as in this case it doesn't create pdfs at all
  • if the recording time was less than 1 min: then it looked like you describe, created empty pdf files

I'm attaching a picture of my test on Android 11. I've marked two sets of recordings with colors:

  • green are a successful recording of 3 minutes 06 seconds (from 16-25-31 to 16-28-37), it created a pdf of 305 kB
  • blue files are a short recording of 11 seconds (from 16-28-49 to 16-29-00), it created an empty pdf of 0 bytes

android_11_uecg_export_pdf_csv

For the pdf to be created in the folder, you should:

  • press "start recording"
  • record over 1 minute length
  • press "stop recording" after that
  • now you should see a pdf with data in the folder

Could you record for a couple or more minutes and check if it still happens? If it doesn't behave similarly to my screenshot and produce pdf on recordings of several minutes, please send the screenshot of the recording files in your folder.

2. Snapshots

Snapshot does work but it is not enough to show my Cardiologist.

It's nice to see you using uECG for your healthcare! We should try and make lengthy pdf recordings work for sure, as the pdf would provide the best format for the cardiologist to see. Here's my recording from the screenshot, as an example, so you could see what these pdfs look like:

record_2022-Sep-23-16-28-37.pdf

Hope you can soon see your own!

Question: when I press the snapshot does it give you the previous 60s? or 30s before + 30s after the mark?

When you press snapshot, the last 60 seconds that passed before the mark (previous 60s) are recorded.

3. A way to visualize raw data recordings from the csv files

Can you recommend any tool I can use to plot this as I am unable to get there?

This is a good question. Usually people just work with raw data in a custom way (process and analyze the data using, for example, usual excel tables and building graphs they need), but it would be very convenient to find tools and write a tutorial on how to work with the data, how to visualize it. We will think on how to do that and write about it when we do.

But for now, let's make the pdfs work first!

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

3 participants