From 97df140ad297db16c411e062bcfcbea6ce03802f Mon Sep 17 00:00:00 2001 From: Bryan Steinbach Date: Sat, 25 Sep 2010 16:57:29 -0700 Subject: [PATCH] updated readme --- week3/readme | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 week3/readme diff --git a/week3/readme b/week3/readme new file mode 100644 index 0000000..cc0942d --- /dev/null +++ b/week3/readme @@ -0,0 +1,26 @@ + +AY250 HW3 +Author: Bryan Steinbach + +Dependencies: Python 2.6.4, numpy 1.4.1, scipy 0.8.0b1, matplotlib 0.99.3 + + +Problem 1: + I did not attend class on Monday, so no partner, and no reverse engineering portion to the exercise. However, I'm delighted to learn of the SimpleXMLRPCServer / xmlrpclib, because one of the instruments I use is controlled by a homegrown XML RPC library written by collaborators. It had no error propagation of exceptions back to the client, and fun surprises like an assumption that messages will be less than 500 characters. They'd even written their own JSON parser, which had one bizarre bug that caused algorithms to run for twice as long as if they were run directly. Looking forward to discarding a couple thousand lines of buggy code with the xmlrpc library. + +Abstractions for handling images and marshalling are in image.py +client and server in client.py and server.py +output data in problem1/client_data and problem1/server_data + +Problem 2: + +Strategy: + * Extract left channel from stereo + * Compute power spectrum for whole timestream + * Find and fit to peak frequencies + * Discard peaks too far from a properly tuned note + * Sort peaks by ascending frequency + * Pick fundamentals to be peaks which can't be explained as harmonics of a lower note + +Detected notes are in text files in problem2/output +The program does not detect both notes in file 2 that are there according to Chris. There appears to be some chorus, probably amplitude modulation based, which creates dim tones adjacent to the main tones and causes some pitch confusion. There are a lot of ways this could be corrected; if it's amplitude modulation, the left right channels might be quadrature, so they could be combined to eliminate the chorus. The program also does not use amplitude information intelligently, and the results are sensitive to the amplitude threshold used in peak discrimination. -- 2.11.4.GIT