Latency measures

Hi Francois,

Recently I have adapted the processes: process_extract_max and process_extract_values to define the latency edges using the mid-range of the local peak. In the process process_extract_values I used this to reshape the pre-selected time-window(e.g: 300-600ms), so the mean could be computed in a less biased time-frame. This worked well for computing the mean amplitude. I used the process_extract_max to compute onset and offset of the amplitude wave also using the mid-range, but including nearest-neighbour interpolation to define the precise time-points. I couldn’t manage to include these processes well into separate options in the GUI of Brainstorm’s “extract values” menu. Also, I’m new to matlab, so my code is not really elegant and probably inefficient. But maybe you can fix this if you consider that it is worth to include these measures as an alternative to purely eye-balled time-windows. I thought it might be good alternative to areal measures (e.g. fractional peak), because it keeps a linear treatment of the wave. I compared the measures with DTW differences and it seems to work fairly well. Although it wasn’t a formal comparison, the onset and offset measures I managed to obtained were close to fractional peak precision. However, I only managed to make the code work at a single electrode level.

If you think this might be interesting for Brainstorm I’ve attached the files with the adapted code. I imagine you’re quite busy, so this is probably a nuisance, but maybe it might be useful for someone in the future. For process_extract_max, changes are from line 109 to 163. For process_extract_values, changes are from line 592 to 656.

Hoping you might find this interesting or useful. All best wishes,

Simon

Hi Simon,

Thank you for the suggestion!
Unfortunately I think I don’t know enough about ERP analysis to understand exactly what you are describing here, and I don’t have much time right now to explore the literature and your code.
I’ll get back to this thread and your code if someone else asks me for something similar (I’m sure it will happen at some point).

Thanks
Francois

Fracois, thanks for the reply. I hope this might be useful for someone eventually, and maybe at some point someone with more skill and experience than me might be able to improve it.

All best,

Simon