I have a text file of coordinate data and I want to find the distance moved within a particular zone from that data. How would I go about that?
Here is a small sample of the data...
Time X Y Z
============ ===== ===== =====
000:00:00.05 8.50 10.00 6.50
000:00:00.10 4.00 10.00 6.50
000:00:00.15 8.50 10.00 6.50
000:00:00.20 3.50 10.00 6.50
000:00:00.25 3.50 10.00 6.50
000:00:00.30 3.00 10.00 6.50
000:00:00.35 3.00 10.00 6.50
000:00:00.40 3.00 10.00 6.50
000:00:00.45 3.50 10.00 0.00
000:00:00.50 4.50 10.50 0.00
000:00:00.55 4.50 10.50 0.00
000:00:00.60 4.50 10.50 0.00
000:00:00.65 4.50 10.50 0.00
000:00:00.70 4.50 10.50 0.00
000:00:00.75 4.50 10.50 0.00
000:00:00.80 4.50 10.50 0.00
000:00:00.85 4.50 10.50 0.00
000:00:00.90 5.00 10.50 0.00
000:00:00.95 5.50 10.50 0.00
000:00:01.00 5.50 10.00 0.00
000:00:01.05 5.50 10.50 0.00
000:00:01.10 5.50 10.00 0.00
000:00:01.15 5.50 10.00 0.00
000:00:01.20 5.50 10.00 0.00
000:00:01.25 5.50 10.00 0.00
000:00:01.30 6.00 10.00 0.00
000:00:01.35 6.00 10.00 0.00
000:00:01.40 6.50 10.00 0.00
000:00:01.45 6.50 9.50 0.00
000:00:01.50 6.50 9.50 0.00
000:00:01.55 6.00 9.50 0.00
000:00:01.60 6.00 9.50 0.00
000:00:01.65 7.00 9.00 0.00
000:00:01.70 7.00 9.00 0.00
000:00:01.75 7.00 9.00 0.00
000:00:01.80 7.00 9.00 0.00
000:00:01.85 7.00 9.00 0.00
000:00:01.90 7.50 9.00 0.00
000:00:01.95 8.00 9.00 0.00
000:00:02.00 8.50 9.00 0.00
000:00:02.05 8.50 9.00 0.00
000:00:02.10 8.50 9.00 0.00
000:00:02.15 8.50 9.00 0.00
000:00:02.20 8.50 9.00 0.00
000:00:02.25 8.50 9.00 0.00
000:00:02.30 9.00 9.00 0.00
000:00:02.35 9.50 9.00 0.00
000:00:02.40 9.50 8.50 0.00
000:00:02.45 9.50 8.00 0.00
000:00:02.50 10.00 7.50 0.00
000:00:02.55 10.00 8.00 0.00
000:00:02.60 10.50 8.00 0.00
000:00:02.65 10.50 8.00 0.00
000:00:02.70 11.00 8.00 0.00
000:00:02.75 11.50 8.00 0.00
000:00:02.80 11.50 8.00 0.00
000:00:02.85 12.00 8.00 0.00
000:00:02.90 12.00 8.00 0.00
000:00:02.95 12.00 8.00 0.00
000:00:03.00 12.00 8.00 0.00
000:00:03.05 12.00 8.00 0.00
000:00:03.10 12.00 8.00 0.00
000:00:03.15 12.00 8.00 0.00
000:00:03.20 12.00 8.00 0.00
000:00:03.25 12.00 8.00 0.00
000:00:03.30 12.00 8.00 0.00
000:00:03.35 12.00 8.00 0.00
000:00:03.40 12.00 8.00 0.00
000:00:03.45 12.00 8.00 0.00
000:00:03.50 12.00 8.00 0.00
000:00:03.55 12.00 8.00 0.00
000:00:03.60 12.00 8.00 0.00
000:00:03.65 12.00 8.00 0.00
000:00:03.70 12.00 8.00 0.00
000:00:03.75 12.00 8.50 0.00
000:00:03.80 12.00 8.50 0.00
000:00:03.85 12.00 8.50 0.00
000:00:03.90 12.00 9.00 0.00
000:00:03.95 12.00 9.00 0.00
000:00:04.00 12.00 9.00 0.00
Basically, I have a 17 X 17 inch box and would like to measure the movement within the box. I would like to measure the center zone (maybe a 4 x 4 inch square) as well as the residual area zone. Each X and Y coordinate marks the 1 inch or 1//2 mark. You can ignore any Z coordinates.
Also, If I wanted to bin the movement by a selection of time (like 1 minute or so many seconds) how would I do that?
Here I fixed the time column to show it in second.milliseconds...
time x y z
1 0.05 8.50 10.00 6.50
2 0.10 4.00 10.00 6.50
3 0.15 8.50 10.00 6.50
4 0.20 3.50 10.00 6.50
5 0.25 3.50 10.00 6.50
6 0.30 3.00 10.00 6.50
7 0.35 3.00 10.00 6.50
8 0.40 3.00 10.00 6.50
9 0.45 3.50 10.00 0.00
10 0.50 4.50 10.50 0.00
11 0.55 4.50 10.50 0.00
12 0.60 4.50 10.50 0.00
13 0.65 4.50 10.50 0.00
14 0.70 4.50 10.50 0.00
15 0.75 4.50 10.50 0.00
16 0.80 4.50 10.50 0.00
17 0.85 4.50 10.50 0.00
18 0.90 5.00 10.50 0.00
19 0.95 5.50 10.50 0.00
20 1.00 5.50 10.00 0.00
21 1.05 5.50 10.50 0.00
22 1.10 5.50 10.00 0.00
23 1.15 5.50 10.00 0.00
24 1.20 5.50 10.00 0.00
25 1.25 5.50 10.00 0.00
26 1.30 6.00 10.00 0.00
27 1.35 6.00 10.00 0.00
28 1.40 6.50 10.00 0.00
29 1.45 6.50 9.50 0.00
30 1.50 6.50 9.50 0.00
31 1.55 6.00 9.50 0.00
32 1.60 6.00 9.50 0.00
33 1.65 7.00 9.00 0.00
34 1.70 7.00 9.00 0.00
35 1.75 7.00 9.00 0.00
36 1.80 7.00 9.00 0.00
37 1.85 7.00 9.00 0.00
38 1.90 7.50 9.00 0.00
39 1.95 8.00 9.00 0.00
40 2.00 8.50 9.00 0.00
41 2.05 8.50 9.00 0.00
42 2.10 8.50 9.00 0.00
43 2.15 8.50 9.00 0.00
44 2.20 8.50 9.00 0.00
45 2.25 8.50 9.00 0.00
46 2.30 9.00 9.00 0.00
47 2.35 9.50 9.00 0.00
48 2.40 9.50 8.50 0.00
49 2.45 9.50 8.00 0.00
50 2.50 10.00 7.50 0.00
51 2.55 10.00 8.00 0.00
52 2.60 10.50 8.00 0.00
53 2.65 10.50 8.00 0.00
54 2.70 11.00 8.00 0.00
55 2.75 11.50 8.00 0.00
56 2.80 11.50 8.00 0.00
57 2.85 12.00 8.00 0.00
58 2.90 12.00 8.00 0.00
59 2.95 12.00 8.00 0.00
60 3.00 12.00 8.00 0.00
61 3.05 12.00 8.00 0.00
62 3.10 12.00 8.00 0.00
63 3.15 12.00 8.00 0.00
64 3.20 12.00 8.00 0.00
65 3.25 12.00 8.00 0.00
66 3.30 12.00 8.00 0.00
67 3.35 12.00 8.00 0.00
68 3.40 12.00 8.00 0.00
69 3.45 12.00 8.00 0.00
70 3.50 12.00 8.00 0.00
71 3.55 12.00 8.00 0.00
72 3.60 12.00 8.00 0.00
73 3.65 12.00 8.00 0.00
74 3.70 12.00 8.00 0.00
75 3.75 12.00 8.50 0.00
76 3.80 12.00 8.50 0.00
77 3.85 12.00 8.50 0.00
78 3.90 12.00 9.00 0.00
79 3.95 12.00 9.00 0.00
80 4.00 12.00 9.00 0.00
Edit: For the binning per zone part, I want to find the number in which the line segment between start and end points is bisected by the region boundary
Edit (added filter parameters):
Ambulatory Trigger: The minimum number of ambulatory counts since the last stereotypic episode necessary for the current ambulatory movement to be considered an Ambulatory Episode.
Box Size: A user-defined square whose width is measured in beams. The animal must move outside of this box before a movement can be considered ambulatory. Each beam is a 1 inch distance apart. So for maximum distance the "box size" would be a 1 inch square.
Resting Delay: If the subject stays inside the box (see Box Size above) for longer than the resting delay, the movement becomes stereotypic.