![]() |
#1
|
|||
|
|||
Another question ("Flagger???")
If I wanted to be able to "flag" (something like an event marker) a point (in time) in the data/output, how would I do that? I currently have no script for this nor do I know where to begin to look in the help menu. Basically, (if you've seen my previous thread) if there are objects on the wall, and I need to be able to determine when I get to each object (in the course of my scanning of the wall) how would I mark that so I could see that in the data?
If that's clear, then ignore what's next, but essentially, if I'm going from point A to point B to point C etc. is there a way to "flag" a point in the data for when I get to point A, B, C, etc. Like if someone were holding a clicker or an event marker. I hope that's clear. Thank you for the help. |
#2
|
|||
|
|||
Is your data output a text file? If so, you can mark the special event by writing some description to the file when it occurs.
|
#3
|
|||
|
|||
I'm not sure if it's a text file. Here's a sample line of what I've got:
head_data = str(Subnum) + '\t' + str(HEADAP) + '\t' +str(HEADLAT) + '\t' +str(HEADVERT) + '\t' +str(HEADYAW) + '\t' +str(HEADPITCH) + '\t' +str(HEADROLL) +'\n' tracking_data.write(head_data) I don't know what kind of file that saves into. I think it might be the default file with vizard. But I need somehow to be able to indicate where in the data the user reaches each "landmark." So again if you were traveling from A to B to C to D. I'd need to mark off when they get to B and then C and then D and so on. |
#4
|
|||
|
|||
Vizard does not perform any automatic file saving. You are probably creating a file somewhere in your script and writing data to it. If you want to flag an event then you can do something like this:
Code:
tracking_data.write('*** FLAG: reached A\n') |
#5
|
|||
|
|||
What will this let me do? I don't really follow--how do I flag the data with this? Press a button? Hook an event marker up? Etc?
I think I'm just creating a text file and then writing the data from Vizard to the text file. That being said, will this "flag" work in that? What I need to be able to do is for someone to be able to press a button, hit a key, or something that will "mark" that exact point in the data. So if I'm collecting data at 30Hz per second and I have "X" pts of data, I want to know how I could "flag/mark/identify" when I reach a certain point in the maze. So if I reach checkpoint 1 after 6 seconds, I want to be able to indicate that on the data in the text file. (But like if I could press a button on an event marker and have that somehow indicate in the data when I press that button on the event marker.) (In this case, I'd need to hook up the event marker to the computer, get Vizard to recognize it, and then somehow utilize the pressing of the button on the event marker to "flag" a specific data point/point in time). Sorry for all of the confusion, but I really appreciate the help. I'm very stuck. |
#6
|
|||
|
|||
Based on the code you posted previously, your script will create some text file that contains a bunch of tab delimited numbers. By executing the line of code I mentioned, when the user reaches some point or when you press a button your text file will look something like this:
Code:
1 1.1 6.2 0.8 1.8 7.8 3.4 1 1.1 6.2 0.8 1.8 7.8 3.4 1 1.1 6.2 0.8 1.8 7.8 3.4 1 1.1 6.2 0.8 1.8 7.8 3.4 *** Reached point A 1 1.1 6.2 0.8 1.8 7.8 3.4 1 1.1 6.2 0.8 1.8 7.8 3.4 1 1.1 6.2 0.8 1.8 7.8 3.4 *** Reached point B 1 1.1 6.2 0.8 1.8 7.8 3.4 1 1.1 6.2 0.8 1.8 7.8 3.4 1 1.1 6.2 0.8 1.8 7.8 3.4 . . . Code:
def WriteFlag(): tracking_data.write('*** Reached point A\n') vizact.onkeydown(' ',WriteFlag) |
#7
|
|||
|
|||
Thank you so much. That really helps. Sorry for any confusion.
|
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|