Copyright (C) 2013 Siavash Ameli This source code is provided 'as-is', without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for NON-commercial purpose, to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this source code must not be misrepresented; you must not claim that you wrote the original source code. 2. You may modify or alter the source code at your own risk, provided that such modifications are extensively commented. Altered source versions must not be misrepresented as being the original source code. 3. If you use this source code in a non-commercial product, an acknowledgment in the product documentation would be appreciated. 4. This notice may not be removed or altered from any source distribution. Siavash Ameli Shadden Research Group University of California, Berkeley