AllenInstitute/ipfx

extract_electrde_0 should check pipette resistance before

Closed this issue · 2 comments

Describe the use case that is addressed by this feature.
Table 1 of the Electrophysiology white paper states that the the size of the electrode is first determined before getting the baseline current of the EXTPINBATH sweep, and it also states that glass electrodes were used with a resistance of 3 to 7 MOhms. The extract_electrode_0 function in qc_feature_extractor.py is just looking for the last sweep with the name EXTPINBATH and then extracting electrode_0 from that sweep without first checking the resistance of the electrode/pipette.

Describe the solution you'd like
The extract_electrode_0 function should first check the resistance of the electrode with measure_input_resistance in qc_features.py, and then only extract the electrode_0 value if the resistance is less than the maximum allowable resistance (white paper states 7 MOhms, but we would use anything under 7.5 MOhms to allow a little wiggle room).

Describe alternatives you've considered
Any alternative solutions or features you've considered.

Additional context
Add any other information about the feature request here.

Do you want to work on this issue?
I have a fix ready and will create a pull request referencing this issue

@ru57y34nn
Could you please clarify what problem are you trying to solve with this issue? I am a bit concerned about changing QC extraction/evaluation criteria without a broader discussion. Have you talked to @gouwens about this?
I left some comments on your PR.

closing per @ru57y34nn since it requires MIES implementation