easy-electrophysiology / load-heka-python

Load HEKA .dat files into python
MIT License
6 stars 2 forks source link

Why not support leak currents? #27

Open LeMuellerGuy opened 9 months ago

LeMuellerGuy commented 9 months ago

Hi everyone,

first of all I want to thank you for the easy to use package. The one thing that I (from the view of my current project) don't understand, is the lack of support for leak currents. As far as I understand the HEKA Patchmaster manual, the data is stored leak substracted anyway so it should at least be possible to retrieve them from the file. I modified the code to be able to do that but I assume that there is a good reason as to why that is not ideal. Is it because of previous file versions?

easy-electrophysiology commented 9 months ago

Hi @LeMuellerGuy, that's great to hear you are finding the package useful.

There isn't a strong reason why leak currents are not supported by default, past the fact it slightly complicated testing during the initial development. In general the strategy was to limit the scope of the package at the start and gradually expand it's scope when the need arose, to allow testing across all of the versions to proceed manageably. As such this would be a good time to add support for leak currents! Would you be interested in opening a PR with what you have so far or alternatively pasting some code snippets here? Thanks!

easy-electrophysiology commented 8 months ago

Hey @LeMuellerGuy, coincidentally another user also had the same question and some changes have been made to support leak files; it is working now for their test file. This add supports for leak channels and slightly reorganises the syntax for get_series_data(). Whereas previously the first argumnet was "Im" or "Vm", now the data retrieval is strictly based on channel index. So a call would be like:

get_series_data(self, group_idx, series_idx, channel_idx

It would be great if you could pull the post recent version of main and check it works on your data, cheers!

easy-electrophysiology commented 1 week ago

Hi @LeMuellerGuy do you think you will get a chance to test this?