Administrator approval is now required for registering new accounts. If you are registering a new account, and are external to the University, please ask the repository owner to contact ServiceLine to request your account be approved. Repository owners must include the newly registered email address, and specific repository in the request for approval.

Commit 748c6cda authored by Ed Rogers's avatar Ed Rogers
Browse files

Choose next sound based on current bounds

parent 0540cc2f
......@@ -47,9 +47,14 @@ class HearingTest:
def play_next_sound(self):
# TODO select tone based on results
volume = random.random()
freq = random.choice(self.freqs)
# TODO allow tone outside lims with low prob?
choices = []
for i, freq in enumerate(self.freqs):
choices.extend([(freq, v) for v in
np.arange(self.lower_bounds[i], self.upper_bounds[i], self.get_block_size())])
freq, volume = random.choice(choices), volume)
played_time = time.time()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment