Example b2112: Optimisation of conductivities from 2D mapping study

Optimisation of conductivities from 2D mapping study


This study is based on a data set obtained from a 2D epicardial mapping study by Peng Chen at Cedars Sinai Medical Center, LA. The data set is stored in peng4.signal, and contains potential recordings at 509 surface electrodes on canine myocardium, and can be viewed using Emap. The only change to this data was to reject electrode 225 as it distorted the results.

The wavefront proceeds fairly constantly for approximately the first 40ms, and then activated the entire remaining region almost simultaneously. This is due to the 3D nature of the tissue slice, and as we are only interested in 2D conductivities, the first 15 columns and 19 rows of electrodes only were used (cornered by electrodes 1 and 393). The activation times were converted from Emap to a data file using /usr/local/bin/sig2ipdata and the (very poor quality!) C source code is available at http://www.esc.auckland.ac.nz/People/Students/Sands/sig2ipdata.c.

From observation of the activation map, the fibre direction was assumed to be constantly zero throughout the region. Similarly from observation, the stimulus points were determined as the closest grid points to electrodes 148,169,190 and 211.

The optimiser goes through the following sequence:

NAGMINA:	fem define initial;w;optimise
NAGMINA:	fem define solve;w;optimise
FUNCT2:		   fem update optimisation	
FUNCT2:		   fem update grid material	
FUNCT2:		   fem define initial;r;optimise
FUNCT2:		   fem define solve;r;optimise
FUNCT2:		   fem solve
FUNCT2:		   fem evaluate residuals wrt mat_params view
OPTI: 		UNTIL residual is minimised

Activation time is calculated as the time of greatest change in Vm, and the residuals compare this to the activation time at the electrode.

The comfile run by this example is as follows:

#Example_b2112 Optimisation of conductivities from 2D mapping study
#  See Description.html for further explanation.

fem de param;r;example_b2;example           #Parameter settings

fem define bases;r;2d9x9;example 		#9x9 grid pt collocation basis
fem define node;r;peng-small;example 	#13x16 element mesh (26mmx32mm)
fem define elem;r;peng-small;example 	#13x16 element mesh (26mmx32mm)
fem define fibre;d  			#Assumed zero everywhere
fem define elem;d fibre
fem define grid;r;9x9;example 			#creates 13545 grid pts
fem update grid geom
fem update grid metric
fem define equation;r;cubic;example lock 	#Cubic activation model

# Command updated by fixcom.sh on Wed Aug 23 17:49:48 NZT 2000
# Old command: fem define data;r;peng-new-small;example electrode file_format activation
fem define data;r;peng-new-small;example electrode file_format activation

#					!  reads activation times at
#					!  data points
fem define data;c grid 			#Computes closest grid pt to 
#					!  each data pt
fem define material;r;cubic;example 	#Sets up initial mode parameters
fem define cell;r;cubic;example 	#Sets up initial mode parameters
fem update grid material 		#Computes grid pt conductivities
fem define opti;r;peng;example lock 	#Reads optimisation parameters
fem define initial;r;peng-small;example 	#Stimulus pts are at l.hand edge
fem define solve;r;peng4;example lock 	#Solution parameters
#Commented so example can run nightly.
#opt 					!Optimise conductivities

# ! Now write the computed conductivities to a file called:
# ! cubic-solve.ipmate before running the rest of the
# ! example.

fem define material;r;cubic-solve;example 	#Read optimised conductivities
fem update grid material 		#Update grid pt info
fem define initial;r;peng-small;example 	#Use same stimulus
fem define solve;r;peng4;example lock 	#And same solution parameters
#fem solve 				!Solve the activation
#fem update gauss activation 		!Store activation time at gauss
#					!  pts for drawing field
#fem define window;c 			!Open output window
#fem draw field gauss 1 zmin=0 zmax=70 	!Draw computed activation field
#fem draw data rgb=computed 		!Overlay exptl activation times

Additional testing commands:

fem list opti
fem list solve
fem list grid yq index v grid 200..250
fem list data

Files used by this example are:

Name                         Modified     Size

example_b2112.com 20-Nov-2001 2.1k 2d9x9.ipbase 10-Apr-2000 1.2k 9x9.ipgrid 06-Mar-2003 18k bak.ippara 12-Nov-2002 5.9k bak.ippara_old 10-Apr-2000 4.4k cubic-solve.ipcell 10-Apr-2000 1.7k cubic-solve.ipmate 10-Apr-2000 1.7k cubic-solve.ipmate_cell_old 10-Apr-2000 3.4k cubic.ipcell 10-Apr-2000 1.7k cubic.ipequa 26-May-2003 1.5k cubic.ipmate 10-Apr-2000 1.7k cubic.ipmate_cell_old 10-Apr-2000 3.4k example_b2.ippara 12-Nov-2002 5.9k example_b2.ippara_old 10-Apr-2000 4.4k ipsolv.bak2 10-Apr-2000 955 optimise.ipinit 10-Apr-2000 8.0k optimise.ipsolv 10-Apr-2000 812 optimise.ipsolvbak 10-Apr-2000 938 peng-batch.com 10-Apr-2000 42 peng-new-small.ipdata 10-Apr-2000 9.9k peng-new.events 10-Apr-2000 8.2k peng-new.ipdata 10-Apr-2000 16k peng-opt.com 20-Nov-2001 611 peng-small.ipelem 10-Apr-2000 52k peng-small.ipinit 10-Apr-2000 1.3k peng-small.ipmesh 10-Apr-2000 868 peng-small.ipnode 10-Apr-2000 36k peng.ipfiel 10-Apr-2000 137 peng.ipfit 10-Apr-2000 560 peng.ipmesh 10-Apr-2000 868 peng.ipnode 10-Apr-2000 753 peng.ipopti 16-Sep-2001 1.4k peng4.com 20-Nov-2001 503 peng4.ipsolv 03-Oct-2001 1.0k peng4.ipsolv.old 10-Apr-2000 956 peng4.ipsolvbak 10-Apr-2000 1.2k peng4.signal 10-Apr-2000 403k test.ipsolv 10-Apr-2000 628 test_output.com 23-Apr-2001 83

Download the entire example:

Name                                 Modified     Size

examples_b_b2_b21_b211_b2112.tar.gz 27-Aug-2010 306k

Testing status by version:

StatusTestedReal time (s)
cmSuccessSun Mar 6 00:02:12 20160
cm-debugSuccessSat Mar 5 00:07:32 20162
cmSuccessSun Aug 19 01:37:54 200710
cm-debugSuccessWed Aug 15 01:37:53 200732
cm-debug-clear-mallocSuccessSat Aug 18 01:46:59 200738
cm-debug-clear-malloc7SuccessMon Aug 20 01:50:13 200739
cm64SuccessSun Aug 19 01:37:56 200711
cm64-debugSuccessTue Aug 21 01:37:13 200733
cm64-debug-clear-mallocSuccessThu Apr 1 11:10:43 200416
cmSuccessWed Mar 4 01:08:07 20092
cm-debugSuccessMon Mar 2 01:09:34 20099
cm64SuccessWed Mar 4 01:08:08 20091
cm64-debugSuccessTue Mar 3 01:15:16 20099
cmSuccessSun Mar 6 00:01:04 20160
cm-debugSuccessSat Mar 5 00:01:42 20162

Testing status by file:

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

Input last modified: Thu Aug 26 14:27:10 2010

CMISS Help / Examples / b / b2 / b21 / b211 / b2112