Skip to content

Commit

Permalink
Add comments, update todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander James Wallar committed Feb 10, 2014
1 parent 1b5d51b commit 01569a3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docs/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,9 @@ Things to do
- Create a "tree" based database lookup for identifying sounds so multiple
sounds can represent the same "class"

- Remember, you are breaking up the sounds into sound classes because it
provides a larger search space for the sound recognition and is more
resiliant to changes in the sound. The reference data for each sound in
the sound class is averaged and that is used for the initial guess this
assumes that a chicken will always be as loud as a chicken.

11 changes: 11 additions & 0 deletions locaudio/localization.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,16 @@ def get_node_distance_lists(r_ref, l_ref, node_events, locations):


def associate_node_events(r_ref, l_ref, node_events, locations):
"""
Checks with node events correspond to which peaks so we can optimize
the reference distance and the reference sound pressure level. If we
know the node event association, we can partition the problem into
multiple sets of node events for multiple peaks. Then using this
partitioning, we can optimize different values or r_ref and l_ref for
different sound occurences
"""

distance_lists = get_node_distance_lists(
r_ref, l_ref,
Expand All @@ -424,6 +434,7 @@ def associate_node_events(r_ref, l_ref, node_events, locations):

for location_index, distance_list in enumerate(distance_lists):
for node_index, distance in enumerate(distance_list):

if distance < DISTANCE_THRESHOLD:
if not location_index in association_dict.keys():
association_dict[locations[location_index]] = list()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_server_sound_triangulation(self):
print "\n=== Server Sound Triangulation === :: {0}\n".format(pos_list)


def test_server_class_triangulation(self):
def test_server_sound_class_triangulation(self):
pos_list = loc.get_class_locations(test_sound_class)

print "\n=== Server Class Triangulation === :: {0}\n".format(pos_list)
Expand Down

0 comments on commit 01569a3

Please sign in to comment.