Tagging Events for Later Analysis

23 views
Skip to first unread message

robbiei...@gmail.com

unread,
Apr 9, 2019, 1:09:14 PM4/9/19
to stimfit
Hi everyone,

Is there a way to tag the selected events for later sorting? I ask because we would like to separately tag compound currents so that we can include them for frequency analysis but not for measures of amplitude.

Thanks,
Robbie

Christoph Schmidt-Hieber

unread,
Apr 9, 2019, 4:41:41 PM4/9/19
to sti...@googlegroups.com
Hi,

Yes that should be possible, but will likely involve some scripting.

Could you tell us step by step what you want to do?

Christoph
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "stimfit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stimfit+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

robbiei...@gmail.com

unread,
Apr 9, 2019, 9:30:24 PM4/9/19
to stimfit
Ideally, it would be something like:

1. Scroll through traces to manually confirm accuracy of event detection
2. Locate a compound current with multiple detected events
3. Tag those events as a special group named "compound event" or something similar
4. Extract all selected events
5. Performing a batch analysis now has an additional column called "group ID" where that new information would be displayed

If doing it from the trace window requires too much work, maybe an alternative could be:

1. Scroll through traces and select all events regardless of whether they're compound events
2. Extract all selected events 
3. Scroll through detected events via the spreadsheet window and tag them with a group ID (possibly group A, B,C, etc)
4. Performing a batch analysis would output an additional column with the group ID

Let me know if any of this sounds feasible. I would imagine that it could be done through the python shell, I'm just not sure how to go about it.

Thanks,
Robbie


On Tuesday, April 9, 2019 at 3:41:41 PM UTC-5, Christoph Schmidt-Hieber wrote:
Hi,

Yes that should be possible, but will likely involve some scripting.

Could you tell us step by step what you want to do?

Christoph


> On 9 Apr 2019, at 19:09, robbiei...@gmail.com wrote:
>
> Hi everyone,
>
> Is there a way to tag the selected events for later sorting? I ask because we would like to separately tag compound currents so that we can include them for frequency analysis but not for measures of amplitude.
>
> Thanks,
> Robbie
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "stimfit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sti...@googlegroups.com.

Christoph Schmidt-Hieber

unread,
Apr 10, 2019, 5:13:23 AM4/10/19
to sti...@googlegroups.com
At this point there is no direct straightforward solution to your problem.

Here’s a workaround:
1. Scroll through traces and select all events regardless of whether they're compound events
2. Extract all selected events
3. Go through the extracted events by navigating through the traces with the right cursor key
4. Whenever you see a compound event, press ’S’ to select the trace.
5. Once you’re done selecting all compound events, create a new table that shows you, for each event, whether the event was selected or not:

>>> iselected = stf.get_selected_indices()
>>> stf.show_table({'Event no {0:05d}'.format(nt+1): int(nt in iselected) for nt in range(stf.get_size_channel())}, "Event type")

6. Combine the two tables into a single table in a spreadsheet program.

Is that helpful at all?

Some notes:
a) The tables will be alphabetically sorted using the first column, even if you sort your dictionary otherwise. That’s why you need to format the event number using “05d” (5 digit integer with leading 0). If you have more than 99999 events you’ll have to adjust the number of digits accordingly.
b) Event counting in the table will be starting with “1” to be consistent with the event table that is produced upon event extraction (nt+1). You may want to double check that your selected events in the table are correctly labelled when you first run the script (i.e. make sure they are not offset by 1).
> To unsubscribe from this group and stop receiving emails from it, send an email to stimfit+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages