PIA-Group / BioSPPy

Biosignal Processing in Python
Other
573 stars 274 forks source link

BVP: Allow d1 and d2 parameters to be configured #6

Closed ball-hayden closed 8 years ago

ball-hayden commented 8 years ago

I'm struggling a little bit to understand what's going on, so it may be that I'm barking up the wrong tree.

I'm using data from physionet.org, and have found that find any onsets in bvp data I have to adjust d2_th (https://github.com/PIA-Group/BioSPPy/blob/master/biosppy/signals/bvp.py#L128).

Should I be needing to do this? I am using a significantly lower sample rate (125Hz), so perhaps it could be related to that?

Thanks for the great library!

capcarr commented 8 years ago

Hi @ball-hayden, Indeed, those parameters are dependent on the sample rate, and should be passed as input arguments. I'll look into changing the code, unless you want to submit a Pull Request?

ball-hayden commented 8 years ago

I'm happy to have a quick look at a PR.

Should they be input arguments, or should they be calculated from the supplied sample rate (like size and wrange are)? If so, would 0.15 * sample_frequency make sense?

Thanks for your prompt reply.

capcarr commented 8 years ago

I think they should be calculated from the sample rate, as is done with 'sm_size', but probably have all those parameters adjustable as input arguments.

ball-hayden commented 8 years ago

Thank you for your help with this - much appreciated!