ihrke / pypillometry

pupillometry with python
MIT License
27 stars 12 forks source link

implement deconvolution? #8

Open hauselin opened 4 years ago

hauselin commented 4 years ago

Hi Matthias, I found your package via your recent paper (Mittner, 2020, JOSS). Great work! I'm wondering if you have plans to incorporate deconvolution? Pupil data are often deconvolved and it'd be nice if we could model the characteristic impulse response (e.g., Erlang gamma function)... Thanks again from the great work!

https://nideconv.readthedocs.io/en/latest/index.html https://github.com/tknapen/FIRDeconvolution

ihrke commented 4 years ago

Hi Hause,

thanks for the suggestion! I think that a similar functionality is already implemented. Check these pages:

https://ihrke.github.io/pypillometry/html/docs/modeling.html https://ihrke.github.io/pypillometry/html/docs/symp_talk_uit2019.html

The implementation is in the estimate_response() function of the PupilData object: https://ihrke.github.io/pypillometry/html/docs/api.html#pypillometry.pupildata.PupilData.estimate_response and associated functions.

I will definitely check out the packages you linked to, thanks for sharing the links!

hauselin commented 4 years ago

Thanks for pointing me to the estimate_response() method and the relevant sections of your documentation! The second link you sent seems to have more than what I was looking for; I think you've already implemented a lot of the stuff I linked to.

I should have looked harder in your documentation before opening an issue (sorry about that!). Maybe you could add the term "deconvolution" in the pupil response function section—I guess I couldn't find it initially because I was looking too specifically and hard for the term "deconvolution", which is another term people also use when they say they want to model the response function.

The tonic/phasic and baseline extraction algorithms look super interesting too. Great package and documentation and I really appreciate your effort.

Also, just a minor typo in the documentation—I think you mean peaks/troughs instead of throughs :)

ihrke commented 4 years ago

Those are good points, thanks! I will leave the issue open until I have resolved that.