BlueBrain/eFEL

Detection of AHP minimum in eFel

AurelienJaquier opened this issue · 12 comments

Mickael wants to compute the AP width on a given trace, but the results are bad because of the way eFel computes the min_AHP_indices. The min_AHP_indices are computed as the first local minimum after each peak. The problem with Mickael's trace is that the peak is very broad and has several local minima (and maxima).

I tried to replace the min_AHP_indices by the minimum value after each peak, and it gives the expected value for the AP width on this particular trace.

@wvangeit do you know if there is a reason we take the first minimum for min_AHP_indices? Should I replace it with an overall minimum after each peak, or should I create new min_AHP_indices_2 and AP_width_2 features to solve mickael's problem ?

Mickael's trace:
test_mickael_trace

Does AP_width really use the AP_min_indices? Mickael (what's his github username?), mentioned that AP_width is being calculated between the places where the trace crosses the threshold.

Yes, but it calculates the places where the trace crosses the threshold in the range going from peak to min_AHP_indices. So if the min_AHP_indices is (wrongly) calculated to be before the threshold crossing, then the AP_width gives bad results.

ah ok, yeah, that makes sense. Well, imo the existing definition makes sense. I think in general it's not a good idea to go to the minimal value between peaks since this minimum might be below the AHP.
I also wouldn't start using the _2 features, since it will be confusing.
Maybe we just need a specific feature for this case (i.e. a calcium spike). Maybe something like minima_between_thresholds and width_between_thresholds or so?

Hi! Sorry, I asked directly to Aurelien and I did not create an issue. @AurelienJaquier , I think the new min_ahp_indices you created might introduce some issues with real spikes (some AHP can be biphasic). So I guess it's better to create an new feature ("dendritic_AP_width" ?) that is computed differently from AP_width.

Just be careful with the name 'dendritic AP' though. It could also be a bAP, but we don't need this feature for a normal bAP.

We don't really compute the bAP width in the existing optimisation. And, from what I understand, this new way of computing AP_width should work for bAP to (because they don't present a clear AHP).

Yes, but eFEL is open source. It's not just for us :-)

True! Sorry! :)

But if you want I can test this new AP width on several traces (normal AP, bAP, dendritic AP) and see what it gives.
It might work for every cases.

@mzbili The latest version of efel has the new feature AP_width_between_threshold to compute the AP width bounded by the true minimum between peaks, not the local minimum like min_AHP_indices. If you want to restrict the minimum after the last peak to be before stim_end, you'll have to set strict_stiminterval to True

Thanks!

I'll close this issue. Do not hesitate to reopen it if you have problems with the new features @mzbili