Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Cubic Spline Interpolation Question

Hello,

I am having some challenges implementing the cubic spline program (Mathot). 

 Can you look at the figure at the end of the attached PDF? It is a plotting of one of our participant's data with the script applied. It looks as if it is partially working. At the right side of the figure from approximately 3000-4000 on the horizontal axis it seems to have interpolated the blink missing data beautifully. However on the left of the figure it seems to have detected a blink that is not there and made an interpolation that is of course not accurate. We think it has something to do with the 0 values at the bottom of the y-axis. Would you be able to help us solve this problem?


Kindly, 

John

Comments

  • edited October 2020

    Hi @saitawa ,

    The problem appears to be with the blink-detection algorithm, which seems to be implemented in a custom Python libary called based_noise_blinks_detection() . I don't know how this library works exactly, but based on its behavior, I think it detects the onset and offset of a blink based on the presence of a sudden velocity spike in the pupil-size signal. This makes sense, in and of itself. However, there should be additional criteria for this to work properly, such as that a blink cannot be too short or too long, and that during a blink the data should actually be missing. I suspect that neither of these criteria have been implemented.

    You can take a sneak peak at my own implementation, although this is also just my hacky, good-enough solution!

    — Sebastiaan

Sign In or Register to comment.