Code Monkey home page Code Monkey logo

fecgsyn's Introduction

license

FECGSYN toolbox, version 1.3-alpha, August 2019

Open-source platform for reproducible NI-FECG research

Authors

FECGSYN is the product of a collaboration between the Department of Engineering Science, University of Oxford (DES-OX), the Institute of Biomedical Engineering, TU Dresden (IBMT-TUD), the Department of Electrical and Electronic Engineering, University of Melbourne (EEE-UOM) and the Biomedical Engineering Faculty at the Technion Israel Institute of Technology (BME-IIT). The authors are:

  • Joachim Behar
  • Fernando Andreotti
  • Julien Oster
  • Sebastian Zaunseder
  • Gari D. Clifford
  • Emerson Keenan
  • Chandan Karmakar
  • Marimuthu Palaniswami

Contacts: [email protected] & [email protected]

History

FECGSYN is built upon the work from McSharry et al. [1] and Sameni et al. [2] The original code from McSharry et al. is available in MATLAB and in C on PhysioNet. The code developed by Sameni et al. is part of the OSET toolbox, also available online in MATLAB. Links to these work are available at: http://physionet.incor.usp.br/physiotools/ipmcode/

  1. McSharry, Patrick E and Clifford, Gari D and Tarassenko, Lionel and Smith, Leonard A. A dynamical model for generating synthetic electrocardiogram signals. IEEE Transactions on Biomedical Engineering, 50(3) 2003.

  2. Sameni, Reza, et al. Multichannel ECG and noise modeling: application to maternal and foetal ECG signals. EURASIP Journal on Advances in Signal Processing 2007 (2007).

References

When using FECGSYN please reference at least one of the following articles:

  1. Behar, Joachim, Fernando Andreotti, Sebastian Zaunseder, Qiao Li, Julien Oster, and Gari D Clifford. 2014. "An ECG Model for Simulating Maternal-Foetal Activity Mixtures on Abdominal ECG Recordings." Physiol Meas 35(8), pp.1537-50, 2014.

and/or

  1. Andreotti F., Behar J., Zaunseder S.,Oster J. and Clifford G D., An Open-Source Framework for Stress-Testing Non-Invasive Foetal ECG Extraction Algorithms. Physiol Meas 37(5), pp. 627-648, 2016.

If you are using FECGSYN's asymmetric volume conductor modeling capability, please reference the following article:

  1. Keenan E., Karmakar C K. and Palaniswami M., The effects of asymmetric volume conductor modeling on non-invasive fetal ECG extraction. Physiol Meas 39(10), pp. 105013, 2018.

License

Released under the GNU General Public License

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 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Disclaimer

This toolbox makes use of several other pre-existing open source algorithms listed below:

  • ECGSYN: A realistic ECG waveform generator, by Dr. Patrick McSharry and Gari D. Clifford, available here (licensed under GNU GPL 2.0)
  • Open Source ECG Toolbox (OSET), v1.0, by Dr. Reza Sameni, available here (licensed under GNU GPL 2.0)
  • FastICA for Matlab, v2.5, by Hugo Gävert, Jarmo Hurri, Jaakko Särelä, and Aapo Hyvärinen available here (licensed under GNU GPL 2.0)
  • JadeR, by Jean-Francois Cardoso, available here (BSD license)
  • FECG-ESN toolbox, v1.0, Dr. Joachim Behar, available here (licensed under GNU GPL 2.0)
  • ESN learning toolbox, v1.0, by H. Jaeger (Fraunhofer IAIS), available here (unlicensed)
  • QRS Detection with Pan-Tompkins algorithm, by Daniel Wedekind, available here (licensed under GNU GPL 2.0)
  • arrow.m, by Dr. Erik A. Johnson, available here, (BSD license)
  • fwhm.m, v1.2, by Patrick Egan, available here, (BSD license)
  • pcorr2.m, by Peter Rydesäter, available here (BSD license)
  • FieldTrip: The MATLAB toolbox for MEG and EEG analysis, v20190828, by Robert Oostenveld, Pascal Fries, Eric Maris, and Jan-Mathijs Schoffelen, available here (licensed under GNU GPL 2.0)
  • Iso2Mesh, v1.9.0-1, Qianqian Fang, available here (licensed under GNU GPL 2.0)

Not provided with package, ocasionally required, see install instructions:

  • WFDB Toolbox for MATLAB and Octave, v.0.9.9, by Dr. Ikaro Silva, available here (licensed under GNU GPL 2.0)
  • Pre-processed anatomic models, by Emerson Keenan, available here (licensed under CC BY-NC-SA 2.0 FR)

fecgsyn's People

Contributors

emersonkeenan avatar fernandoandreotti avatar jbehar avatar mohsalvi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fecgsyn's Issues

add_noisedipole with octave

While using octave, and following the section "Initial NI-FECG simulation example" from the getting started webpage I encountered an error stating that the pca function is missing in the statistics package.

I noted that there is a "princomp" function in the package, and changed the line 166 from
[~,pc] = pca(noise_ar);
to
[~,pc] = princomp(noise_ar);

It resolved the issue, however I am new to octave/matlab, so I am not 100% sure that the function are interchangeable. Could someone kindly indicate that this change is making sense?

GUI Initial screen with easy access to FECGSYN functionalities

This is up for discussion, we have four main functionalities to which we should facilitate the access. This could be done by creating an initial screen with 4 large buttons:

  • Data Generation (call run_ecg_generator() with specified param - redirects to current version of GUI)
  • FECG Extraction (call specific method, or FECGSYN_main_extract() to extract with multiple methods)
  • FQRS Detection (call qrs_detect() with desired thresholds and refractory period)
  • Morphological Analysis (call FECGSYN_benchMorph() to selected path and channels - assuming out struct as input)

@GUI: Posdev not defined

Posdev allows (or not) that the position of fheart and mheart vary within a small sphere. It should be included in the GUI.

How to generate signals from different people?

Hi, I wonder how to generate signals from different people?
There are 10 pregnant women mentioned in the introduction of fecgdb data set. How are they generated? What's the difference?

PQRST Segmentation

The model could allow for segmentation algorithms a good training platform. In order to do so, we should spit out the PQRST waves on-set/peak/offsets. Maybe use ecgpuwave on the raw VCG? Points can be simply expanded using phase information.

out.mixture in run_ecg_generator

This is more question (or a problem with the documentation) than an issue but I wasn't sure how else to raise my question.
In the function run_ecg_generator several outputs are generated. Among them out.mixture defined as "generated ecg mixture [NB_EL x param.n matrix]".

  • I am not sure what NB_EL represents, is it the number of electrodes capturing signals?
  • Is it the same for the mother ecg and foetus ecg?
  • Is there is a special meaning for the first one (it looks a bit different to the others)?

Rethink how to maintain header

Need automated form of maintaining header in files. This pertains authorship and license information.

Some of the things that are currently inconsistent:

  • VERSION_NUMBER
  • VERSION_DATE
  • COPYRIGHT_YEAR
  • "Last update" useless since we use git
  • Website should move all to www.fecgsyn.com

Update Naive Bayes to use fitcnb from Matlab

Warning: NaiveBayes will be removed in a future release. Use the predict method of an object returned by fitcnb instead.

In NaiveBayes/posterior (line 46)
In classreg.learning.internal.DisallowVectorOps/subsref (line 21)
Warning: NaiveBayes will be removed in a future release. Use the predict method of an object returned by fitcnb instead.
In NaiveBayes/posterior (line 46)
In classreg.learning.internal.DisallowVectorOps/subsref (line 21)
Warning: NaiveBayes will be removed in a future release. Use the predict method of an object returned by fitcnb instead.
In NaiveBayes/posterior (line 46)
In classreg.learning.internal.DisallowVectorOps/subsref (line 21)

Update RLS to Matlab's newer versions

I was using a Matlab 2016 and this warning popped up:

Warning: adaptfilt.rls will be removed in a future release. Use dsp.RLSFilter instead.
> In adaptfilt.baseclass/deprecationMessage (line 12)
  In adaptfilt.rls (line 49)
  In FECGESN_lmsrls_canceller (line 96)
  In FECGSYN_adaptfilt_extraction (line 114)
  In parallel_function>make_general_channel/channel_general (line 914)
  In remoteParallelFunction (line 38)

On future releases should be fixed..

GUI compatibility with fecgsyn v.1.1

The toolbox was largely updated and the GUI may not work properly. First steps are:

  • update GUI for data generation (i.e. simulating and outputing signals)
  • update GUI for FECG extraction (using any of the 8 available methods, see documentation).

Generating new Dataset- problem with saving ouputs

Hi,
I've run the following code in order to generate new data ( as shown in your examples):

param.fs = 1000; % data generation at 1kHz
param.n = 15*param.fs;
param.SNRfm = -3; % fetal maternal SNR
param.SNRmn = 8; % maternal to noise SNR
param.ntype = {'MA'}; % adding muscular artifact type noise
param.noise_fct = {1}; % noise at constant SNR level
debug = 5; % debug level (5 = max number of plots generated)
out = run_ecg_generator(param,debug);
FECGSYN_plotmix(out) % plots random channels of one of the created datasets

In the examples it's written that "The code will produce simulation files". I specified the desires path on the Matlab root with cd savedir but i don't get any simulation files.
Could anyone help me out?
Thank you in advance,

Rebecca

Calibration depends on electrodes position

Since both fetal and noise calibration depends on average maternal, foetal or noise power throughout the propagated channels, the final values (e.g. SNRfm = -6 dB) depend on the electrode configuration. Maybe considering the total power on the reference electrode may be a good alternative?

@GUI: Number of electrodes

It should be a field which assumes any number. If necessary, we can randomize the initial value, or put them as a sequential array around the belly.

Additionally, we should make another button and some presets, e.g.:
Foetal 32 + 2 (new scheme) - should be the default
Foetal 5 (old scheme original)
Adult 3 (Eindhoven)
Adult 12 (12-Lead)

SNRmn is acting wierd

After changing electrode positions, calibration does not seem to be working properly.

Nonlinear phase between beats

In order to make the model more realistic and make things more interesting for extraction methods, a nonlinear phase should be designed. In order to do so, some nonlinear phase - RR relationship is required.

where's the data for this article?

could you tell me where the data for this article:

<Non-invasive Fetal ECG Signal Quality
Assessment for Multichannel
Heart Rate Estimation>

A total of n = 259 mul- tichannel recordings from 107 singleton pregnancies (diverse pathophysiological states and gestational weeks ranging from 17 to 39 weeks) were collected.

Thanks for your help!

Ectopic VCG Models

We only have one activated, since the other ones were problematic. Should we add some more?

@GUI: Warning by refreshing electrodes preview

Here is the error message:
Warning: linkaxes requires 2-D axes as input. Use linkprop for generic
property linking.

In linkaxes at 72
In FECGSYN_UI>update_axes at 1247
In FECGSYN_UI>update_geometry_preview at 1299
In FECGSYN_UI>cb_bt_geo_preview at 2166

Ground electrode

I commented out the calculus using the ground electrode:

ground = repmat(mean(mixture),NB_ELEC,1);
mixture = mixture - ground;
mecg = mecg - ground;
fecg = cellfun(@(x) x - ground,fecg,'UniformOutput',0);
noise = cellfun(@(x) x - ground,noise,'UniformOutput',0);

A better solution then averaging the channels should be found. e.g. defining a grond electrode somewhere on the models back.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.