annotate src/Modules/Features/ModuleGaussians_test.py @ 1:bc394a985042

- Fixed the python SWIG wrappers - Added stub test for the Gaussian features, and test data - Fixed build errors
author tomwalters
date Mon, 15 Feb 2010 20:37:26 +0000
parents
children e91769e84be1
rev   line source
tomwalters@1 1 #!/usr/bin/env python
tomwalters@1 2 # encoding: utf-8
tomwalters@1 3 #
tomwalters@1 4 # AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@1 5 # http://www.acousticscale.org/AIMC
tomwalters@1 6 #
tomwalters@1 7 # This program is free software: you can redistribute it and/or modify
tomwalters@1 8 # it under the terms of the GNU General Public License as published by
tomwalters@1 9 # the Free Software Foundation, either version 3 of the License, or
tomwalters@1 10 # (at your option) any later version.
tomwalters@1 11 #
tomwalters@1 12 # This program is distributed in the hope that it will be useful,
tomwalters@1 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
tomwalters@1 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
tomwalters@1 15 # GNU General Public License for more details.
tomwalters@1 16 #
tomwalters@1 17 # You should have received a copy of the GNU General Public License
tomwalters@1 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
tomwalters@1 19 """
tomwalters@1 20 ModuleGaussians_test.py
tomwalters@1 21
tomwalters@1 22 Created by Thomas Walters on 2010-02-15.
tomwalters@1 23 Copyright 2010 Thomas Walters <tom@acousticscale.org>
tomwalters@1 24 Test for the Gaussians module. Runs a number of pre-computed SAI profiles
tomwalters@1 25 through the module, and tests them against the equivalent output from the
tomwalters@1 26 MATLAB rubber_GMM code.
tomwalters@1 27 """
tomwalters@1 28
tomwalters@1 29 import aimc
tomwalters@1 30 import matplotlib
tomwalters@1 31 import pylab
tomwalters@1 32 import scipy
tomwalters@1 33
tomwalters@1 34 def main():
tomwalters@1 35 data_file = "src/Modules/Features/testdata/aa153.0p108.1s100.0t+000itd.mat"
tomwalters@1 36 data = scipy.io.loadmat(data_file)
tomwalters@1 37
tomwalters@1 38 given_profiles = data["Templates"]
tomwalters@1 39 matlab_features = data["feature"]
tomwalters@1 40
tomwalters@1 41
tomwalters@1 42
tomwalters@1 43 pass
tomwalters@1 44
tomwalters@1 45
tomwalters@1 46 if __name__ == '__main__':
tomwalters@1 47 main()