Mercurial > hg > btrack
diff modules-and-plug-ins/python-module/btrack_python_module.cpp @ 52:45231107c9d6
Reformatted comments, removed the OnsetDetectionFunction constructor with no arguments, removed a number of unused variables and made changes to the python module to fix some casting problems and removed some unused variables there also. Still getting the same results, so no overall changes to the algorithm.
author | Adam Stark <adamstark@users.noreply.github.com> |
---|---|
date | Wed, 22 Jan 2014 01:13:45 +0000 |
parents | 68d01fea1e8d |
children | a31841af2bbc |
line wrap: on
line diff
--- a/modules-and-plug-ins/python-module/btrack_python_module.cpp Tue Jan 21 10:24:33 2014 +0000 +++ b/modules-and-plug-ins/python-module/btrack_python_module.cpp Wed Jan 22 01:13:45 2014 +0000 @@ -28,11 +28,11 @@ double* data = (double*) PyArray_DATA(arr1); // get array size - int signal_length = PyArray_Size((PyObject*)arr1); + long signal_length = PyArray_Size((PyObject*)arr1); //int k = (int) theSize; // get data type - char type = PyArray_DESCR(arr1)->type; + //char type = PyArray_DESCR(arr1)->type; ////////// BEGIN PROCESS /////////////////// int hsize = 512; @@ -128,11 +128,11 @@ double* data = (double*) PyArray_DATA(arr1); // get array size - int signal_length = PyArray_Size((PyObject*)arr1); + long signal_length = PyArray_Size((PyObject*)arr1); //int k = (int) theSize; // get data type - char type = PyArray_DESCR(arr1)->type; + //char type = PyArray_DESCR(arr1)->type; ////////// BEGIN PROCESS /////////////////// int hsize = 512; @@ -252,11 +252,11 @@ double* data = (double*) PyArray_DATA(arr1); // get array size - int numframes = PyArray_Size((PyObject*)arr1); + long numframes = PyArray_Size((PyObject*)arr1); //int k = (int) theSize; // get data type - char type = PyArray_DESCR(arr1)->type; + //char type = PyArray_DESCR(arr1)->type; ////////// BEGIN PROCESS /////////////////// int hsize = 512; @@ -275,7 +275,7 @@ /////////////////////////////////////////// //////// Begin Processing Loop //////////// - for (int i=0;i < numframes;i++) + for (long i=0;i < numframes;i++) { df_val = (float) (data[i] + 0.0001);