setting annotations within a detector

2 views
Skip to first unread message

Scott Brandes

unread,
Apr 11, 2007, 10:40:07 AM4/11/07
to xbat-...@googlegroups.com

Hello,

I've written a detector that is able to detect and classify events, and I would like to be able to display the classification along with the event location when the log file is displayed.  I am using XBAT DEVEL (SVN 483) and Matlab 7.0.1.  I see that within "event(i).annotation.value" there is room for both "code" and "value".  When trying to set those values, I've been unable to get either strings or integers to display on each event when viewing a log, even when selecting to view "simple" annotations.  Instead, all I see displayed is the event number.  Do you have any suggestions for how to go about doing this?  Also, how do I go about keeping the event numbers from being displayed?

Thank you, 

--Scott Brandes

Harold Figueroa

unread,
Apr 11, 2007, 2:45:58 PM4/11/07
to xbat-...@googlegroups.com, xbat-...@googlegroups.com
Hello Scott,

In order to add annotations (classification labels for example) you want to use the 'event.tags' and 'event.notes', these are under development, but the 'tags' are what is currently being displayed in the browser interface in the way that ' annotation.value.code' used to be.

You can set the tags of a given events by using 'set_tags(event, {'tag1', tag2', 'tag3'})'. As you can see tags are a collection of strings stored in a cell array, these strings should not have spaces!

In the case of a single tag, that tag is used as a label in the browser (what you would like to see), when multiple tags are used you can designate one to be the label by adding an asterisk '*' prefix '*this-tag-is-the-label'.

The tags are editable from the 'Event' palette. When editing tags, you should write a space-separated sequence of tags into the edit control, these strings are then parsed into a collection of tags.

You might also be interested in setting the 'event.score' which is should simply be a number between 0 and 1, to indicate the quality of the event from the point of view of your detector.

Hope this helps, let me know,

Harold

Scott Brandes

unread,
Apr 11, 2007, 6:25:56 PM4/11/07
to xbat-...@googlegroups.com

Thanks for your help Harold.  I think I'm getting close, but I have 2 questions:

1)  What is the difference between these 2 lines:

set_tags(event, {'tag1', 'tag2'});

event.tags = {'tag1', 'tag2'}; 

I am only able to get this to work when I use the second way.

2)  I get the first tag to display when checking the "On" box in the "Active" tab, but not when I scan and save to a log.  Only the event numbers are displayed.  However, when I load the Log file into the workspace, I see that all of the tags are properly assigned for each event.  What am I doing wrong?

Thank you, 

Scott

Harold Figueroa

unread,
Apr 11, 2007, 10:28:40 PM4/11/07
to xbat-...@googlegroups.com
Hello again,

On 4/11/07, Scott Brandes <tsbr...@gmail.com> wrote:

Thanks for your help Harold.  I think I'm getting close, but I have 2 questions:

1)  What is the difference between these 2 lines:

set_tags(event, {'tag1', 'tag2'});

event.tags = {'tag1', 'tag2'}; 


currently none, however we may want to change the way tag storage is implemented so you really want to use the 'set'. are you finding a bug in the code? does the 'set' set?

I am only able to get this to work when I use the second way.

2)  I get the first tag to display when checking the "On" box in the "Active" tab, but not when I scan and save to a log.  Only the event numbers are displayed.  However, when I load the Log file into the workspace, I see that all of the tags are properly assigned for each event.  What am I doing wrong?


What about the 'Event' palette? what does this palette say are the tags when you select an event?

remember that if there are multiple 'tags' you must prefix one with an asterisk to mark is as the desired 'label'

hope this helps,

Harold

 

Scott Brandes

unread,
Apr 12, 2007, 11:07:18 AM4/12/07
to xbat-...@googlegroups.com
Thanks again Harold.   I think I might have found a bug; I'm not able to get "set" to set.  I can send you a simple detector to run if you would like.  Other than that, I think I've gotten this to work.  I'm not sure why I had the trouble I mentioned in #2, but I've gotten past that problem now.  Thanks.

--Scott

Harold Figueroa

unread,
Apr 12, 2007, 5:15:35 PM4/12/07
to xbat-...@googlegroups.com
Send me the code, and I'll look at it. I will also test 'set' independently here.

Harold
Reply all
Reply to author
Forward
0 new messages