Mercurial > hg > calciumsiganalyser
changeset 2:e26a8489c148
Release 2: the duration of the median filtering window has been added to the plugin setting parameters.
author | mathieub <mathieu.barthet@eecs.qmul.ac.uk> |
---|---|
date | Wed, 22 Jun 2011 14:34:06 +0100 |
parents | 26c75dbfe61c |
children | 57cb253812c7 |
files | CHANGELOG CalciumSignalAnalyser.cpp CalciumSignalAnalyser.h CalciumSignalAnalyser.o CalciumSignalAnalyser_plugins.cpp CalciumSignalAnalyser_plugins.o INSTALL.txt README.txt doc/CalciumSignalAnalyserVampPlugin-doc.pdf vamp-calcium-signal-analyser.dylib |
diffstat | 10 files changed, 128 insertions(+), 69 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/CHANGELOG Wed Jun 22 14:34:06 2011 +0100 @@ -0,0 +1,4 @@ + +Changes in the Calcium Signal Analyser Vamp plugin 2 since the previous release 1: + +- The duration of the median filtering window has been added to the plugin setting parameters.
--- a/CalciumSignalAnalyser.cpp Mon Jun 20 22:10:14 2011 +0100 +++ b/CalciumSignalAnalyser.cpp Wed Jun 22 14:34:06 2011 +0100 @@ -3,17 +3,22 @@ /* Calcium Signal Analyser Vamp Plugin - Description: Detects and characterises the transients in noisy signals. + Transient detection and characterisation for calcium signals. - Authors: Mathieu Barthet. - Based on the QM Vamp note onset detector plugin by Christian Landone, - Chris Duxbury, and Juan Pablo Bello. + Centre for Digital Music, Queen Mary University of London. + This file copyright 2010-2011 Mathieu Barthet and QMUL. - Version: 1 + Based on the QM Vamp note onset detector plugin by Christian + Landone, Chris Duxbury, and Juan Pablo Bello. - Centre for Digital Music, Queen Mary, University of London. - All rights reserved. - */ + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. See the file + COPYING included with this distribution for more information. + + Version: 2 +*/ #include "CalciumSignalAnalyser.h" @@ -38,6 +43,7 @@ time(0), m_sensitivity(50), m_delta(0.2), +m_mfwindur(10), processcounter(0) { #ifdef VERBOSE @@ -93,7 +99,7 @@ int CalciumSignalAnalyser::getPluginVersion() const { - return 1; + return 2; } string @@ -130,6 +136,17 @@ desc.unit = ""; list.push_back(desc); + desc.identifier = "mfwindowduration"; + desc.name = "Duration of the median filtering window"; + desc.description = "Sets the duration of the median filtering window"; + desc.minValue = 2; + desc.maxValue = 100; + desc.defaultValue = 10; + desc.isQuantized = true; + desc.quantizeStep = 0.1; + desc.unit = "s"; + list.push_back(desc); + return list; } @@ -141,6 +158,9 @@ } else if (name == "deltathreshold") { return m_delta; + } + else if (name == "mfwindowduration") { + return m_mfwindur; } return 0.0; @@ -158,6 +178,10 @@ if (m_delta == value) return; m_delta = value; } + else if (name == "mfwindowduration") { + if (m_mfwindur == value) return; + m_mfwindur = value; + } } @@ -411,13 +435,24 @@ ppParams.LPACoeffs = aCoeffs; ppParams.LPBCoeffs = bCoeffs; - //TO-DO: the duration of the median filtering window could be another adjustable parameter - //of the plugin since the optimal duration may vary according to signals. It should not be - //set up in samples but in seconds instead to maintain the same behavior for different signal - //sample frequencies. - - ppParams.WinT.post = 8; //works well with calcium data (15 samples at 3 Hz --> W = 5 s --> M = 2.5 s) - ppParams.WinT.pre = 7; + int NWin; + float samples = m_inputSampleRate*m_mfwindur; + if (samples < 4){ + NWin = 4; //minimal possible length of the window in samples +#ifdef VERBOSE + cout << "WARNING: CalciumSignalAnalyser::getRemainingFeatures:" + << "The duration of the median filtering window is too small considering the" + << "sample frequency of the signal. Duration of "<< NWin/m_inputSampleRate + << " s used instead." + << endl; +#endif + }else{ + NWin = floor(m_inputSampleRate*m_mfwindur); + if (NWin%2 != 0) NWin--; + } + + ppParams.WinT.post = NWin/2; + ppParams.WinT.pre = NWin/2 - 1; ppParams.QuadThresh.a = (100 - m_sensitivity) / 1000.0; ppParams.QuadThresh.b = 0;
--- a/CalciumSignalAnalyser.h Mon Jun 20 22:10:14 2011 +0100 +++ b/CalciumSignalAnalyser.h Wed Jun 22 14:34:06 2011 +0100 @@ -1,20 +1,24 @@ /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* - Header file for the Calcium Signal Analyser Vamp Plugin + Calcium Signal Analyser Vamp Plugin - Description: Detects and characterises the transients in noisy signals. + Transient detection and characterisation for calcium signals. - Authors: Mathieu Barthet. - Based on the QM Vamp note onset detector plugin by Christian Landone, - Chris Duxbury, and Juan Pablo Bello. + Centre for Digital Music, Queen Mary University of London. + This file copyright 2010-2011 Mathieu Barthet and QMUL. - Version: 1 + Based on the QM Vamp note onset detector plugin by Christian + Landone, Chris Duxbury, and Juan Pablo Bello. - Centre for Digital Music, Queen Mary, University of London. - All rights reserved. + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. See the file + COPYING included with this distribution for more information. -*/ + Version: 2 + */ #ifndef _CALCIUM_SIGNAL_ANALSYER_PLUGIN_H_ #define _CALCIUM_SIGNAL_ANALSYER_PLUGIN_H_ @@ -72,6 +76,7 @@ float m_sensitivity; float m_delta; + float m_mfwindur; int processcounter; };
--- a/CalciumSignalAnalyser_plugins.cpp Mon Jun 20 22:10:14 2011 +0100 +++ b/CalciumSignalAnalyser_plugins.cpp Wed Jun 22 14:34:06 2011 +0100 @@ -1,17 +1,22 @@ /* -Calcium Signal Analyser Vamp Plugin - -Description: Detects and characterises the transients in noisy signals. + Calcium Signal Analyser Vamp Plugin -Authors: Mathieu Barthet. -Based on the QM Vamp note onset detector plugin by Christian Landone, -Chris Duxbury, and Juan Pablo Bello. - -Version: 1 - -Centre for Digital Music, Queen Mary University of London. -All rights reserved. -*/ + Transient detection and characterisation for calcium signals. + + Centre for Digital Music, Queen Mary University of London. + This file copyright 2010-2011 Mathieu Barthet and QMUL. + + Based on the QM Vamp note onset detector plugin by Christian + Landone, Chris Duxbury, and Juan Pablo Bello. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. See the file + COPYING included with this distribution for more information. + + Version: 2 + */ #include <vamp/vamp.h> #include <vamp-sdk/PluginAdapter.h>
--- a/INSTALL.txt Mon Jun 20 22:10:14 2011 +0100 +++ b/INSTALL.txt Wed Jun 22 14:34:06 2011 +0100 @@ -9,35 +9,39 @@ REQUIRED QM DSP Library https://code.soundsoftware.ac.uk/projects/qm-dsp -To install (by compiling from source) -===================================== +To install by compiling from source +=================================== -First download and install the required libraries following the associated instructions -(they may require to install other dependencies). +First download and install the required libraries following their installation +instructions (they may require other dependencies). When compiling the plugin, the +default location of the required libraries should be: -You can edit the Makefile of the Calcium Signal Analyser Vamp plugin depending your -operating system and various options. The directories of the required libraries can be -specified. By default, the required libraries are assumed to be installed at the same -directory tree level as the plugin. +../vamp-plugin-sdk, and +../qm-dsp -To build on a Unix-like system, run +If you want to install the libraries elsewhere, you can edit the Makefile and specify +their location by setting the variables VAMP_SDK_DIR and QM_DSP_DIR. + +Edit the Makefile to select the appropriate options for your operating system. + +Then to build on a Unix-like system, run: $ make Then install the plugin as follows depending on your operating system: - Win 32 -> Copy vamp-calciumsignalanalyser.dll, vamp-calciumsignalanalyser.cat and - vamp-calciumsignalanalyser.n3 to C:\Program Files\Vamp Plugins\ + Win 32 -> Copy vamp-calciumsignalanalyser.dll, vamp-calciumsignalanalyser.cat (optional) and + vamp-calciumsignalanalyser.n3 (optional) to C:\Program Files\Vamp Plugins\ - Win 64 -> Copy vamp-calciumsignalanalyser.dll, vamp-calciumsignalanalyser.cat and - vamp-calciumsignalanalyser.n3 to C:\Program Files\Vamp Plugins (x86)\ + Win 64 -> Copy vamp-calciumsignalanalyser.dll, vamp-calciumsignalanalyser.cat (optional) and + vamp-calciumsignalanalyser.n3 (optional) to C:\Program Files\Vamp Plugins (x86)\ - OS/X -> Copy vamp-calciumsignalanalyser.dylib, vamp-calciumsignalanalyser.cat and - vamp-calciumsignalanalyser.n3 to $HOME/Library/Audio/Plug-Ins/Vamp/ + OS/X -> Copy vamp-calciumsignalanalyser.dylib, vamp-calciumsignalanalyser.cat (optional) and + vamp-calciumsignalanalyser.n3 (optional) to $HOME/Library/Audio/Plug-Ins/Vamp/ or /Library/Audio/Plug-Ins/Vamp/ - Linux -> Copy vamp-calciumsignalanalyser.so, vamp-calciumsignalanalyser.cat and - vamp-calciumsignalanalyser.n3 to $HOME/vamp/ or /usr/local/lib/vamp/ + Linux -> Copy vamp-calciumsignalanalyser.so, vamp-calciumsignalanalyser.cat (optional) and + vamp-calciumsignalanalyser.n3 (optional) to $HOME/vamp/ or /usr/local/lib/vamp/ or /usr/lib/vamp/
--- a/README.txt Mon Jun 20 22:10:14 2011 +0100 +++ b/README.txt Wed Jun 22 14:34:06 2011 +0100 @@ -6,19 +6,26 @@ characterization of transients in noisy signals. It is adapted for the analysis of calcium signals measured using confocal microscopy. +Copyright +========= + +This code is Copyright (c) 2010-2011 Mathieu Barthet, Queen Mary +University of London. + +The plugin is based on the QM Vamp note onset detector developed +by Christian Landone, Chris Duxbury, and Juan Pablo Bello. + The Vamp architecture is a feature extraction system developed at Queen Mary University of London (see more information at: http://www.vamp-plugins.org/). -This code is Copyright (c) 2010-2011 Mathieu Barthet, Queen Mary -University of London. The plugin is based on the QM Vamp note onset -detector developed by Christian Landone, Chris Duxbury, and Juan -Pablo Bello. - About This Release ================== -This is release 1. +This is release 2. + +Changes between releases are reported in the CHANGELOG file provided +with the distribution. License ======= @@ -40,18 +47,18 @@ Installation depends on your operating system. - Win 32 -> Copy vamp-calciumsignalanalyser.dll, vamp-calciumsignalanalyser.cat and - vamp-calciumsignalanalyser.n3 to C:\Program Files\Vamp Plugins\ + Win 32 -> Copy vamp-calciumsignalanalyser.dll, vamp-calciumsignalanalyser.cat (optional) and + vamp-calciumsignalanalyser.n3 (optional) to C:\Program Files\Vamp Plugins\ - Win 64 -> Copy vamp-calciumsignalanalyser.dll, vamp-calciumsignalanalyser.cat and - vamp-calciumsignalanalyser.n3 to C:\Program Files\Vamp Plugins (x86)\ + Win 64 -> Copy vamp-calciumsignalanalyser.dll, vamp-calciumsignalanalyser.cat (optional) and + vamp-calciumsignalanalyser.n3 (optional) to C:\Program Files\Vamp Plugins (x86)\ - OS/X -> Copy vamp-calciumsignalanalyser.dylib, vamp-calciumsignalanalyser.cat and - vamp-calciumsignalanalyser.n3 to $HOME/Library/Audio/Plug-Ins/Vamp/ + OS/X -> Copy vamp-calciumsignalanalyser.dylib, vamp-calciumsignalanalyser.cat (optional) and + vamp-calciumsignalanalyser.n3 (optional) to $HOME/Library/Audio/Plug-Ins/Vamp/ or /Library/Audio/Plug-Ins/Vamp/ - Linux -> Copy vamp-calciumsignalanalyser.so, vamp-calciumsignalanalyser.cat and - vamp-calciumsignalanalyser.n3 to $HOME/vamp/ or /usr/local/lib/vamp/ + Linux -> Copy vamp-calciumsignalanalyser.so, vamp-calciumsignalanalyser.cat (optional) and + vamp-calciumsignalanalyser.n3 (optional) to $HOME/vamp/ or /usr/local/lib/vamp/ or /usr/lib/vamp/ Documentation @@ -60,7 +67,6 @@ Additional information on the plugin are given in the plugin documentation which can be found in the /doc directory of this distribution. - Credits and references ======================