Example e7: Applying Noise and Manipulating Signals

This example tests ...

This example is an extension to Example e/e6 . The signal files : sig1 and sig2 are idential. They consist of 3 electrodes evaluated for 300 time steps.

The noise is generated using Gaussian random number generator with a sd of 1.0 and mean of 0.0 (before scaling)


The comfile run by this example is as follows:

# Example e7
# ----------
#


#----------------------------------------------------------#
#
# Applying and manipulating signals
#
#----------------------------------------------------------#


fem def para;r;torsoslice;example            #Sets up minimal parameter set.
fem def regi;r;torsoslice;example            #Two regions.
fem def node;r;;example region all           #Defines nodes for a 2D slice 
#                                            # through a torso and heart.
fem def base;r;;example                      #Defines cubic Hermite BEM bfns.
fem def elem;r;;example region all           #Defines 17 elements between heart 
#                                            # and torso.
fem list elem region all total       


#
#----------------------------#
# Setup equations
#----------------------------#
#
fem def equa;r;;example region all           #Defines a quasistatic analysis of
#                                            # the standard Laplace equation.
fem def mate;r;;example region all
fem def init;r;;example region all
fem def sour;r;;example region 2             #Moving dipole inside heart.
fem def coup;r;;example                      #The type of coupling.
fem def solv;r;;example coupled region all

Additional testing commands:

fem solve coupled


fem eval elect;sig1 history torsoslice from nodes electrodes 46,48,50 region 1
fem eval elect;sig2 history torsoslice from nodes electrodes 46,48,50 region 1


#
#----------------------------#
# Apply noise
#----------------------------#
#
fem def nois;r;nois1;example                 #Gaussian distribution (mean of 0.0).
fem apply noise signal sig1 ascii outfile sig_noisy
fem add sig infile1 sig1 a 1.0 infile2 sig2 b -1.0 outfile sig_diff1 ascii
#                                            #Adds the two *.ipsign files together
#                                            # with coefficients 1.0 and -1.0. 
#                                            # ie produces a difference signal. 
#                                            # Should be no signal.
fem add sig infile1 sig1 a 1.0 infile2 sig_noisy b -1.0 outfile sig_noise ascii
#                                            #Adds the two *.ipsign files together 
#                                            # with coefficients 1.0 and -1.0.
#                                            # ie. The noise which was originally 
#                                            # applied.
fem def nois;r;nois2;example                 #Uniform distribution (ran0).
fem apply noise signal sig1 ascii outfile sig_noisy
fem def nois;r;nois3;example                 #Uniform distribution (ran1).
fem apply noise signal sig1 ascii outfile sig_noisy

Files used by this example are:

Name                   Modified     Size

example_e7.com 20-Nov-2001 1.2k nois1.ipnois 30-May-2000 496 nois2.ipnois 30-May-2000 417 nois3.ipnois 30-May-2000 417 test_output.com 20-Nov-2001 1.4k torsoslice.ipbase 10-Apr-2000 1.2k torsoslice.ipcoup 21-Aug-2002 464 torsoslice.ipcoup.old 10-Apr-2000 413 torsoslice.ippara 26-Feb-2003 5.9k torsoslice.ipregi 10-Apr-2000 93 torsoslice.ipsour 11-Jun-2002 78k torsoslice.irelem 10-Apr-2000 5.8k torsoslice.irequa 26-May-2003 2.3k torsoslice.irinit 10-Apr-2000 8.7k torsoslice.irmate 10-Apr-2000 155 torsoslice.irnode 10-Apr-2000 7.2k torsoslice.irsolv 13-Apr-2007 2.2k

Download the entire example:

Name                  Modified     Size

examples_e_e7.tar.gz 14-Apr-2007 139k

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmSuccessSun Mar 6 00:02:36 20161
cm-debugSuccessSat Mar 5 00:04:29 20161
mips-irix
cmSuccessSun Aug 19 01:35:51 20077
cm-debugSuccessWed Aug 15 01:27:44 200711
cm-debug-clear-mallocSuccessSat Aug 18 01:32:40 200719
cm-debug-clear-malloc7SuccessMon Aug 20 01:29:32 200715
cm64SuccessSun Aug 19 01:35:22 20079
cm64-debugSuccessTue Aug 21 01:27:16 200712
cm64-debug-clear-mallocSuccessThu Apr 1 12:10:32 20045
rs6000-aix
cmSuccessWed Mar 4 01:09:22 20091
cm-debugSuccessMon Mar 2 01:07:22 20093
cm64SuccessWed Mar 4 01:08:36 20092
cm64-debugSuccessTue Mar 3 01:12:19 20092
x86_64-linux
cmSuccessSun Mar 6 00:01:08 20161
cm-debugSuccessSat Mar 5 00:01:38 20160

Testing status by file:


Graphical output from this problem is given here.


Html last generated: Sun Mar 6 05:51:28 2016

Input last modified: Fri Apr 13 10:42:02 2007


CMISS Help / Examples / e / e7