question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

scale_sections function bug

See original GitHub issue

Dear HeartPy team,

I am a maker. I am designing a PPG wearable device for real-time HRV analysis, data collecting and visualization.

When developing the PC application, I integrated your library. When working on preprocessing for rolling data, I find that “scale_sections” function issue may analysis failed randomly.

Let me share what I’ve found:

output = np.empty(len(data)) // length of output array is the same as length of data array.

so if data_end is not equal to length of data. Then some data at the end of output numpy array will not be assigned. They will be random value. If one of them is nan, then the process fuction will crash.

To fix this: just change return np.array(output) -> return np.array(output[0:data_start])

Let me know if I described the issue clearly. Feel free to let me know your thoughts.

Best, Lauren

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
paulvangentcomcommented, Mar 15, 2020

@Lauren-ED209 @adamhub

If either of you needs help with pcb design or embedded C for the arduino projects I can lend a hand as well.

1reaction
adamhubcommented, Mar 14, 2020

Hey @Lauren-ED209 I am making a wearable PPG device too and came across this issue. I fixed it by fixing my import to avoid float rounding issues by just using integers when making my CSV via numpy. Would love to hear more about your project. I ended up with the MAX30102 sensor and am about to try it with the Nano RF board from Emakefun. It contains a NRF24L01 radio rather than wifi, which suites my purposes better.

@paulvangentcom KILLER work. Thank you so much!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Radial Gauge Animation Bad Values - General Questions ...
So animation bug? Tested in Firefox and Chrome. ... function radialGauge(widget) { // Chart Values var min = 65; ... ScaleSection(); section.setFrom(min);
Read more >
BUGS functions - Ncl
BUGS functions. Function. Usage. Definition. Complementary cloglog(p)<-a+b*x log[−log(1 − p)] = a + bx log log y<-cloglog(p) y = log[−log(1 − p)].
Read more >
Version 4 | Zephyr Scale Server/Data Center Documentation
In this new setting, you can hide Zephyr Scale sections from the Issue View ... Improvements and bug fixes were made to the...
Read more >
BUGS tutorial (by example)
Now, let's show how to simulate it using BUGS. Our example is modelled with two assigments (step is BUGS step function, ie, returns...
Read more >
JSOC_Documentation - JSOC/Stanford
This is the developer and design manual for JSOC. Previous documentation has been integrated into this and it should always be up to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found