diff --git a/Documentation/ECGTool_inverse.tex b/Documentation/ECGTool_inverse.tex index c1d3fc9..4341118 100644 --- a/Documentation/ECGTool_inverse.tex +++ b/Documentation/ECGTool_inverse.tex @@ -254,6 +254,82 @@ \subsection{Truncated SVD Method (TSVD)} % \subsection{Total Variation} % \subsubsection{Options and Modes of Operation} + + + +\subsection{Method of Fundamental Solutions} + +Method of Fundamental Solutions (MFS) is a method to approximate +solutions to partial differential equations, such as Laplace's +equation used in bioelectricity problems. MFS is similar to BEM in +that it is formulated to take into account boundary conditions and +solutions, but not volumetric ones. However, MFS is considered +meshless, even though points representing the heart and torso regions +are needed, because the points do not need tessellation, as do BEM and +FEM. In MFS the points representing these regions must be outside the +computational domain, \ie{} in the myocardium and outside the torso, +but as close to the boundary as possible. Also, unlike BEM and FEM +methods, computing a forward matrix is not necessary. Instead, the +MFS computes the coefficients representing pericardial potential +values based on analytical evaluation of the potential distribution +and the boundary condition \cite{JDT:Mat77,JDT:Wan2006}. These +coefficients are are usually solved for with Tikhonov regularization +\cite{JDT:Wan2006,JDT:Joh2018}. In this toolkit, we implemented MFS +as described by Wang and Rudy \cite{JDT:Wan2006} with the methods to +choose the regularization parameters described by Johnston +\cite{JDT:Joh2018}. It is implemented in a python library +(`PythonLibrary/MFS\_inverse/mfs\_inverse.py') that can be called from +SCIRun using the InterfaceWithPython module, as shown in +`MSF\_inverse\_Cage.srn5' and `MSF\_inverse\_python.srn5'. + +\noindent{\bf Inputs:} + \begin{enumerate} + \item Heart boundary ($H\in\Re^{N,3}$) + \item Torso boundary ($T\in\Re^{M,3}$) + \item Heart recording points ($P\in\Re^{F,3}$) + \item Measured Potentials ($Y\in\Re^{K,T}$) + \item Torso Electrodes ($C$ list of $K$ indices) + \item options + \end{enumerate} + {\bf Outputs:} + \begin{enumerate} + \item Inverse Solution ($X\in\Re^{F,T}$) + \item Regularization Parameter ($\lambda$) + \item Regularized Curve + \end{enumerate} + + +\subsubsection{Options and Modes of Operation} + +Options for the algorithm are the scale method (along the normals or +by scaling the point cloud), scale factor, regularization parameter +choosing method \cite{JDT:Joh2018}, lambda range, gamma (for some +techniques). The implementation has an option to plot the +regularization function. + + + + + + + + +\subsection{Isotropy Method} + + The Isotropy Method is an approach that considers temporal correlations + to imrove the conditioning of the inverse taken. In SCIRun we have + implemented this approach with a combination of modules and + \href{http://scirundocwiki.sci.utah.edu/SCIRunDocs/index.php/CIBC:Documentation:SCIRun:Reference:BioPSE:SolveInverseProblemWithTikhonov}{{\tt + SolveInverseProblemWithTikhonov}}. Our implementation of the Isotropy + Method can be found in the example network + ``potential-based-inverse/greensite-inverse-IsotropyMethod.srn5'', + shown in \autoref{fig:IsotropyMethod}. + + The network is composed of the standard sections of a simulation + network to loading data, visualizing and synthesizing the ECG + measurements. The specific blocks that correspond to the Isotropy + Method are the ``Temporal Decomposition'', ``solving'' and ``Temporal + Reconstruction''. Here we describe this blocks in more detail: @@ -262,26 +338,41 @@ \subsection{Truncated SVD Method (TSVD)} % \subsubsection{Options and Modes of Operation} -\subsection{Isotropy Method} - The Isotropy Method is an approach that considers temporal correlations to imrove the conditioning of the inverse taken. - In SCIRun we have implemented this approach with a combination of modules and \href{http://scirundocwiki.sci.utah.edu/SCIRunDocs/index.php/CIBC:Documentation:SCIRun:Reference:BioPSE:SolveInverseProblemWithTikhonov}{{\tt SolveInverseProblemWithTikhonov}}. - Our implementation of the Isotropy Method can be found in the example network ``potential-based-inverse/greensite-inverse-IsotropyMethod.srn5'', shown in \autoref{fig:IsotropyMethod}. - The network is composed of the standard sections of a simulation network to loading data, visualizing and synthesizing the ECG measurements. - The specific blocks that correspond to the Isotropy Method are the ``Temporal Decomposition'', ``solving'' and ``Temporal Reconstruction''. Here we describe this blocks in more detail: \begin{enumerate} - \item The {\bf temporal decomposition} block computes the singular value decomposition of the input data, truncates the right singular vectors (corresponding to time) and projects the input data into this lower dimensional space. - \item The {\bf solving } block consists on a Tikhonov module that solves the inverse problem for the input data projected onto the low dimensional temporal space. - \item The {\bf temporal reconstruction} block, uses the truncated right singular vectors from (1) to reconstruct the full temporal behavior of the inverse solutions obtained in the Tikhonov solver. + \item The {\bf temporal decomposition} block computes the + singular value decomposition of the input data, truncates the + right singular vectors (corresponding to time) and projects + the input data into this lower dimensional space. + \item The {\bf solving } block consists on a Tikhonov module + that solves the inverse problem for the input data projected + onto the low dimensional temporal space. + \item The {\bf temporal reconstruction} block, uses the + truncated right singular vectors from (1) to reconstruct the + full temporal behavior of the inverse solutions obtained in + the Tikhonov solver. \end{enumerate} \subsubsection{Options and Modes of Operation} - As implemented, the Isotropy Method does not have many options for operation. The most important parameter that needs to be determined by the user is the truncation point of the right singular vectors, which can be accessed in the ``SelectSubMatrix'' module within the ``temporal decomposition'' block. - The GUI for this module, shown in \autoref{fig:IsotropyMethod_gui}, allows to select a submatrix from an input matrix. In the case of the isotropy method, the users are only interested in the ``end'' parameter from the column range selector (lower right entry) since it determined where to truncate the right singular vectors. - - This implementation of the Isotropy Method has extra parameters that determine the operation of the Tikhonov inverse. These parameters are specific to the \href{http://scirundocwiki.sci.utah.edu/SCIRunDocs/index.php/CIBC:Documentation:SCIRun:Reference:BioPSE:SolveInverseProblemWithTikhonov}{{\tt SolveInverseProblemWithTikhonov}} module and we refer the user to \autoref{sec:inverse:tikhonov} for more details. + As implemented, the Isotropy Method does not have many options for + operation. The most important parameter that needs to be determined by + the user is the truncation point of the right singular vectors, which + can be accessed in the ``SelectSubMatrix'' module within the ``temporal + decomposition'' block. The GUI for this module, shown in + \autoref{fig:IsotropyMethod_gui}, allows to select a submatrix from an + input matrix. In the case of the isotropy method, the users are only + interested in the ``end'' parameter from the column range selector + (lower right entry) since it determined where to truncate the right + singular vectors. + + This implementation of the Isotropy Method has extra parameters that + determine the operation of the Tikhonov inverse. These parameters are + specific to the + \href{http://scirundocwiki.sci.utah.edu/SCIRunDocs/index.php/CIBC:Documentation:SCIRun:Reference:BioPSE:SolveInverseProblemWithTikhonov}{{\tt + SolveInverseProblemWithTikhonov}} module and we refer the user to + \autoref{sec:inverse:tikhonov} for more details. \begin{figure} \begin{center} diff --git a/Documentation/ECGTool_math.tex b/Documentation/ECGTool_math.tex index 66a2ee1..80559eb 100644 --- a/Documentation/ECGTool_math.tex +++ b/Documentation/ECGTool_math.tex @@ -300,36 +300,34 @@ \subsection{BEM in the Forward/Inverse Toolkit} that assumption, the surfaces of those subdomains become a sufficient domain upon which to solve the problem for the entire domain. -Briefly, one of the Green's Theorems from vector -calculus is applied to an integrated form of Laplace's equation to transform the -differential problem into a Fredholm integral problem \cite{RSM:Bar77}. The surfaces are -each subdivided (tessellated) into a collection of small surface (or -boundary) elements. Then (two-dimensional) basis functions (again usually -low-order polynomials) are used to -approximate the quantities of interest between the nodes of the resulting -surface meshes. Given this discretization, after -manipulation of the resulting integral equation, -the integrals required can + +Briefly, one of the Green's Theorems from vector calculus is applied to an +integrated form of Laplace's equation to transform the differential problem +into a Fredholm integral problem \cite{RSM:Bar77}. The surfaces are each +subdivided (tessellated) into a collection of small surface (or boundary) +elements. Then (two-dimensional) basis functions (again usually low-order +polynomials) are used to approximate the quantities of interest between the +nodes of the resulting surface meshes. Given this discretization, after +manipulation of the resulting integral equation, the integrals required can be computed through a series of numerical integrations over the mesh -elements. -In the BEM method, these integrals involve as unknowns the +elements. In the BEM method, these integrals involve as unknowns the potential and its gradient. The integration involves the computation of the distance between each node within the surface and to all others surfaces. In complicated geometries, and in all cases when the node is integrated -against the points on its ``own'' -surface, there are numerical difficulties computing these integrals. In those cases -there are a number of sophisticated solutions which have been proposed in the literature (and -some of them are adopted in the SCIRun implementation). -The result of all these integrals is a transfer matrix, which again we will -denote $\mathbf{A}$, relating the source potentials or currents to the -unknown measurement potentials. In the BEM case, because of the all-to-all -nature of the integrations required, this matrix will be dense, not -sparse. On the other hand, the size of the equation will be directly -determined by the number of measurements and sources rather than the -number of nodes in the entire domain. (We note that there is an alternative -formulation of the BEM method which retains the potentials at all nodes on -all surfaces, and which can be reduced to the transfer matrix described -here, but we omit the details as usual.) +against the points on its ``own'' surface, there are numerical difficulties +computing these integrals. In those cases there are a number of +sophisticated solutions which have been proposed in the literature (and +some of them are adopted in the SCIRun implementation). The result of all +these integrals is a transfer matrix, which again we will denote +$\mathbf{A}$, relating the source potentials or currents to the unknown +measurement potentials. In the BEM case, because of the all-to-all nature +of the integrations required, this matrix will be dense, not sparse. On the +other hand, the size of the equation will be directly determined by the +number of measurements and sources rather than the number of nodes in the +entire domain. (We note that there is an alternative formulation of the BEM +method which retains the potentials at all nodes on all surfaces, and which +can be reduced to the transfer matrix described here, but we omit the +details as usual.) \section{Solutions to the Inverse Problem in the Forward/Inverse Toolkit} @@ -341,16 +339,17 @@ \section{Solutions to the Inverse Problem in the Forward/Inverse Toolkit} $\mathbf{A}$, calculated by any appropriate method, including either FEM or BEM. -In the activation-based case, the source model is that the unknowns are an -activation surface. (That is, activation times as a function of position on -the heart surface, which we denote as $\tau(x)$, where $x$ indicates -position on the heart surface.) -The assumptions required for the activation-based model imply that the temporal waveform of the potential -(and current) at each source node has a fixed form, the same at all -locations on the surface. -This is assumed to be either a step function or a smoothed version of a step function (using -piecewise polynomials or inverse trigonometric functions). We denote this -function as $u(t)$. Thus the relevant forward equation can be written as +In the activation-based case, the source model is that the unknowns +are an activation surface. (That is, activation times as a function of +position on the heart surface, which we denote as $\tau(x)$, where $x$ +indicates position on the heart surface.) The assumptions required for +the activation-based model imply that the temporal waveform of the +potential (and current) at each source node has a fixed form, the same +at all locations on the surface. This is assumed to be either a step +function or a smoothed version of a step function (using piecewise +polynomials or inverse trigonometric functions). We denote this +function as $u(t)$. Thus the relevant forward equation can be written +as \begin{equation} y(p,t) = \int_{x} \mathbf{A}_{p,x}u(t-\tau(x))\,dx \label{eq:act} \end{equation} @@ -430,9 +429,14 @@ \subsubsection{Standard Tikhonov regularization} \end{eqnarray} \end{center} -\noindent where $\lambda$ is the regularization parameter, which is a user defined scalar value. The matrix $\mathbf{P}$ represents the \textit{a priori} knowledge of the measurements. The matrix $\mathbf{L}$ describes the property of the solution $x$ to be constrained. -Conceptually, $\lambda$ trades off between the misfit between predicted and measured data (the first term in the equation) and the \textit{a priori} constraint. -An approximate solution $\hat{x}$ of \autoref{tik_problem} is given for the + +\noindent where $\lambda$ is the regularization parameter, which is a user +defined scalar value. The matrix $\mathbf{P}$ represents the \textit{a +priori} knowledge of the measurements. The matrix $\mathbf{L}$ describes +the property of the solution $x$ to be constrained. Conceptually, $\lambda$ +trades off between the misfit between predicted and measured data (the +first term in the equation) and the \textit{a priori} constraint. An +approximate solution $\hat{x}$ of \autoref{tik_problem} is given for the overdetermined case ($n > m$) as follows: \begin{center} \begin{eqnarray} diff --git a/Documentation/ECGTool_overview.tex b/Documentation/ECGTool_overview.tex index 28f4fb2..17a8f0f 100644 --- a/Documentation/ECGTool_overview.tex +++ b/Documentation/ECGTool_overview.tex @@ -135,7 +135,7 @@ \section{Toolkit overview and capabilities} \caption{Algorithms currently included in the CIBC ECG Forward/Inverse toolkit \newline $^\dag$Activation-based forward solution is not yet -unavailable\newline +available\newline $^{\&}$Based on a Gauss-Newton optimization \newline $^{*}$ Matlab implementation $^\ddag$ Python implementation diff --git a/Documentation/ECGToolkitGuide.pdf b/Documentation/ECGToolkitGuide.pdf new file mode 100644 index 0000000..f8abee4 Binary files /dev/null and b/Documentation/ECGToolkitGuide.pdf differ diff --git a/Documentation/ECGToolkitGuide_figures/MFS_network.png b/Documentation/ECGToolkitGuide_figures/MFS_network.png new file mode 100644 index 0000000..47c90bf Binary files /dev/null and b/Documentation/ECGToolkitGuide_figures/MFS_network.png differ diff --git a/Documentation/toolkit.bib b/Documentation/toolkit.bib index 8ddd291..8af8db8 100644 --- a/Documentation/toolkit.bib +++ b/Documentation/toolkit.bib @@ -10,6 +10,20 @@ @INPROCEEDINGS{JDT:Gul97 month="Oct" } +@article{JDT:Joh2018, +title = "Accuracy of electrocardiographic imaging using the method of fundamental solutions", +journal = "Computers in Biology and Medicine", +volume = "102", +pages = "433 - 448", +year = "2018", +issn = "0010-4825", +doi = "https://doi.org/10.1016/j.compbiomed.2018.09.016", +url = "http://www.sciencedirect.com/science/article/pii/S0010482518302786", +author = "Peter R. Johnston", +keywords = "Inverse problems, Electrocardiology, Tikhonov regularisation, Method of fundamental solutions, Electrophysiology", +abstract = "Solving the inverse problem of electrocardiology via the Method of Fundamental Solutions has been proposed previously. The advantage of this approach is that it is a meshless method, so it is far easier to implement numerically than many other approaches. However, determining the heart surface potential distribution is still an ill-posed problem and thus requires some form of Tikhonov regularisation to obtain the required distributions. In this study, several methods for determining an “optimal” regularisation parameter are compared in the context of solving the inverse problem of electrocardiology via the Method of Fundamental Solutions. It is found that the Robust Generalised Cross-Validation method most often yields epicardial potential distributions with the least relative error when compared to the input distribution. The study also compares the inverse solutions obtained with the Method of Fundamental Solutions with those obtained in a previous study using the boundary element method. It is found that choosing the best solution methodology and regularisation parameter determination method depends on the particular scenario being considered." +} + @Article{RSM:Gul98, author = "R.M. Gulrajani", title = "The forward and inverse problems of @@ -41,6 +55,19 @@ @Article{RSM:Bar77 development of the problem., ECG055", } +@article{JDT:Mat77, +author = "Mathon, R. and Johnston, R.", +title = "The Approximate Solution of Elliptic Boundary-Value Problems by +Fundamental Solutions", +journal = j-SIAM-J-NUM, +volume = "14", +number = "4", +pages = "638-650", +year = "1977", +doi = "10.1137/0714043", +URL = "https://doi.org/10.1137/0714043", +} + @Article{RSM:Oos2004, author = "A. van Oosterom and T.F. Oostendorp", @@ -73,3 +100,22 @@ @Article{RSM:Oos2004 www.ecgsim.org.", bibdate = "Wed Aug 11 06:37:42 2004", } + +@article{JDT:Wan2006, + Author = "Wang, Yong and Rudy, Yoram", + Doi = "10.1007/s10439-006-9131-7", + Journal = j-ABE, + Keywords = "Action Potentials/*physiology; *Algorithms; Animals; Body + Surface Potential Mapping/*methods; Computer Simulation; Diagnosis, + Computer-Assisted/*methods; Electrocardiography/methods; Electromagnetic + Fields; Heart Conduction System/*physiology; Humans; *Models, + Cardiovascular", + Month = "08", + Number = "8", + Pages = "1272--1288", + Title = "Application of the method of fundamental solutions to + potential-based inverse electrocardiography", + Url = "https://www.ncbi.nlm.nih.gov/pubmed/16807788", + Volume = "34", + Year = "2006", +} \ No newline at end of file diff --git a/Networks/activation-based-inverse/actgauss-newton-inverse.srn5 b/Networks/activation-based-inverse/actgauss-newton-inverse.srn5 index 1963e50..ccf62c6 100644 --- a/Networks/activation-based-inverse/actgauss-newton-inverse.srn5 +++ b/Networks/activation-based-inverse/actgauss-newton-inverse.srn5 @@ -198,7 +198,7 @@ - InterfaceWithPython:1 + InterfaceWithPython:0 SCIRun @@ -207,7 +207,7 @@ - 18 + 19 0 @@ -467,6 +467,19 @@ matrixOutput1 = c + + + PythonTopLevelCode + + + PythonTopLevelCode + + 2 + # Main namespace/top level context code goes here; for example, import statements and global variables. +# This code will be executed before the 'Code' tab, and no input/output variables are available. + + + @@ -1797,7 +1810,7 @@ matrixOutput1 = c - 39 + 50 0 @@ -1835,6 +1848,97 @@ matrixOutput1 = c + + + CameraDistance + + + CameraDistance + + 1 + 3.00000000000000000e+00 + + + + + + CameraLookAt + + + CameraLookAt + + 5 + + 3 + 0 + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + + + + CameraRotation + + + CameraRotation + + 5 + + 4 + 0 + + listElement + + 1 + 1.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + Diffuse @@ -1931,6 +2035,18 @@ matrixOutput1 = c + + + HeadLightAzimuth + + + HeadLightAzimuth + + 0 + 180 + + + HeadLightColor @@ -1943,6 +2059,18 @@ matrixOutput1 = c + + + HeadLightInclination + + + HeadLightInclination + + 0 + 90 + + + HeadLightOn @@ -1955,6 +2083,18 @@ matrixOutput1 = c + + + Light1Azimuth + + + Light1Azimuth + + 0 + 180 + + + Light1Color @@ -1967,6 +2107,18 @@ matrixOutput1 = c + + + Light1Inclination + + + Light1Inclination + + 0 + 90 + + + Light1On @@ -1979,6 +2131,18 @@ matrixOutput1 = c + + + Light2Azimuth + + + Light2Azimuth + + 0 + 180 + + + Light2Color @@ -1991,6 +2155,18 @@ matrixOutput1 = c + + + Light2Inclination + + + Light2Inclination + + 0 + 90 + + + Light2On @@ -2003,6 +2179,18 @@ matrixOutput1 = c + + + Light3Azimuth + + + Light3Azimuth + + 0 + 180 + + + Light3Color @@ -2015,6 +2203,18 @@ matrixOutput1 = c + + + Light3Inclination + + + Light3Inclination + + 0 + 90 + + + Light3On @@ -2281,7 +2481,7 @@ matrixOutput1 = c - 39 + 50 0 @@ -2319,6 +2519,97 @@ matrixOutput1 = c + + + CameraDistance + + + CameraDistance + + 1 + 3.00000000000000000e+00 + + + + + + CameraLookAt + + + CameraLookAt + + 5 + + 3 + 0 + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + + + + CameraRotation + + + CameraRotation + + 5 + + 4 + 0 + + listElement + + 1 + 1.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + Diffuse @@ -2415,6 +2706,18 @@ matrixOutput1 = c + + + HeadLightAzimuth + + + HeadLightAzimuth + + 0 + 180 + + + HeadLightColor @@ -2427,6 +2730,18 @@ matrixOutput1 = c + + + HeadLightInclination + + + HeadLightInclination + + 0 + 90 + + + HeadLightOn @@ -2439,6 +2754,18 @@ matrixOutput1 = c + + + Light1Azimuth + + + Light1Azimuth + + 0 + 180 + + + Light1Color @@ -2451,6 +2778,18 @@ matrixOutput1 = c + + + Light1Inclination + + + Light1Inclination + + 0 + 90 + + + Light1On @@ -2463,6 +2802,18 @@ matrixOutput1 = c + + + Light2Azimuth + + + Light2Azimuth + + 0 + 180 + + + Light2Color @@ -2475,6 +2826,18 @@ matrixOutput1 = c + + + Light2Inclination + + + Light2Inclination + + 0 + 90 + + + Light2On @@ -2487,6 +2850,18 @@ matrixOutput1 = c + + + Light3Azimuth + + + Light3Azimuth + + 0 + 180 + + + Light3Color @@ -2499,6 +2874,18 @@ matrixOutput1 = c + + + Light3Inclination + + + Light3Inclination + + 0 + 90 + + + Light3On @@ -2841,7 +3228,7 @@ matrixOutput1 = c ResultMatrix 0 - InterfaceWithPython:1 + InterfaceWithPython:0 InputMatrix 2 @@ -2865,7 +3252,7 @@ matrixOutput1 = c Result 0 - InterfaceWithPython:1 + InterfaceWithPython:0 InputMatrix 3 @@ -2884,7 +3271,7 @@ matrixOutput1 = c - InterfaceWithPython:1 + InterfaceWithPython:0 PythonMatrix1 0 @@ -2925,7 +3312,7 @@ matrixOutput1 = c Field 0 - InterfaceWithPython:1 + InterfaceWithPython:0 InputField 0 @@ -2997,7 +3384,7 @@ matrixOutput1 = c Matrix 0 - InterfaceWithPython:1 + InterfaceWithPython:0 InputMatrix 0 @@ -3021,7 +3408,7 @@ matrixOutput1 = c Matrix 0 - InterfaceWithPython:1 + InterfaceWithPython:0 InputMatrix 1 @@ -3117,7 +3504,7 @@ matrixOutput1 = c Pathname 0 - InterfaceWithPython:1 + InterfaceWithPython:0 InputString 0 @@ -3171,12 +3558,12 @@ matrixOutput1 = c EvaluateLinearAlgebraBinary:0 - 4.40000000000000000e+01 - 2.31000000000000000e+02 + -1.60000000000000000e+01 + 2.25000000000000000e+02 - InterfaceWithPython:1 + InterfaceWithPython:0 3.90050000000000068e+02 4.15750000000000000e+02 @@ -3341,17 +3728,15 @@ for initial guess - InterfaceWithPython:1 + InterfaceWithPython:0 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'.SF NS Text'; font-size:13pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.Helvetica Neue DeskInterface';">Executes Gauss Newton calculations.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.Helvetica Neue DeskInterface';">Runs matlab in Python.</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.Helvetica Neue DeskInterface';">Open the Python Console window.</span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Executes Gauss Newton calculations.</p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Open the Python Console window.</p></body></html> Executes Gauss Newton calculations. -Runs matlab in Python. Open the Python Console window. 0 13 @@ -3464,7 +3849,7 @@ p, li { white-space: pre-wrap; } -1 - InterfaceWithPython:1 + InterfaceWithPython:0 9 diff --git a/Networks/activation-based-inverse/actgauss-newton-inverse_matlab.srn5 b/Networks/activation-based-inverse/actgauss-newton-inverse_matlab.srn5 index 3fa3b79..ef971e6 100644 --- a/Networks/activation-based-inverse/actgauss-newton-inverse_matlab.srn5 +++ b/Networks/activation-based-inverse/actgauss-newton-inverse_matlab.srn5 @@ -207,7 +207,7 @@ - 17 + 18 0 @@ -302,20 +302,12 @@ 2 -# +#matlab engine started in the top level script tab. + +# set matlab path to include act gauss newton code +eng.path(os.environ['SCIRUNDATADIR']+'/MatlabLibrary/activation_inverse',eng.path(),nargout=0) -# check for a running matlab engine -if ('eng' in globals()) == False: - print('Starting Matlab.') - print('To avoid restarting matlab every execution, use Matlab2016 functions,') - print('or type the following code in the console:') - print('import matlab.engine') - print('eng =matlab.engine.start_matlab()') - import matlab.engine - eng=matlab.engine.start_matlab() -else: - print('matlab already started.') # inputs i1 = matrixInput1 # forward matrix @@ -325,7 +317,6 @@ i4 = matrixInput4 # perturbed activation times field1 = fieldInput1 - #print(len(i2)) # clip BSP to QRS only. @@ -468,6 +459,19 @@ matrixOutput1 = c + + + PythonTopLevelCode + + + PythonTopLevelCode + + 2 + import matlab.engine +eng = matlab.engine.start_matlab() if (not 'eng' in vars()) else eng + + + @@ -1754,7 +1758,7 @@ matrixOutput1 = c - 39 + 50 0 @@ -1792,6 +1796,97 @@ matrixOutput1 = c + + + CameraDistance + + + CameraDistance + + 1 + 3.00000000000000000e+00 + + + + + + CameraLookAt + + + CameraLookAt + + 5 + + 3 + 0 + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + + + + CameraRotation + + + CameraRotation + + 5 + + 4 + 0 + + listElement + + 1 + 1.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + Diffuse @@ -1888,6 +1983,18 @@ matrixOutput1 = c + + + HeadLightAzimuth + + + HeadLightAzimuth + + 0 + 180 + + + HeadLightColor @@ -1900,6 +2007,18 @@ matrixOutput1 = c + + + HeadLightInclination + + + HeadLightInclination + + 0 + 90 + + + HeadLightOn @@ -1912,6 +2031,18 @@ matrixOutput1 = c + + + Light1Azimuth + + + Light1Azimuth + + 0 + 180 + + + Light1Color @@ -1924,6 +2055,18 @@ matrixOutput1 = c + + + Light1Inclination + + + Light1Inclination + + 0 + 90 + + + Light1On @@ -1936,6 +2079,18 @@ matrixOutput1 = c + + + Light2Azimuth + + + Light2Azimuth + + 0 + 180 + + + Light2Color @@ -1948,6 +2103,18 @@ matrixOutput1 = c + + + Light2Inclination + + + Light2Inclination + + 0 + 90 + + + Light2On @@ -1960,6 +2127,18 @@ matrixOutput1 = c + + + Light3Azimuth + + + Light3Azimuth + + 0 + 180 + + + Light3Color @@ -1972,6 +2151,18 @@ matrixOutput1 = c + + + Light3Inclination + + + Light3Inclination + + 0 + 90 + + + Light3On @@ -2238,7 +2429,7 @@ matrixOutput1 = c - 39 + 50 0 @@ -2276,6 +2467,97 @@ matrixOutput1 = c + + + CameraDistance + + + CameraDistance + + 1 + 3.00000000000000000e+00 + + + + + + CameraLookAt + + + CameraLookAt + + 5 + + 3 + 0 + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + + + + CameraRotation + + + CameraRotation + + 5 + + 4 + 0 + + listElement + + 1 + 1.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + Diffuse @@ -2372,6 +2654,18 @@ matrixOutput1 = c + + + HeadLightAzimuth + + + HeadLightAzimuth + + 0 + 180 + + + HeadLightColor @@ -2384,6 +2678,18 @@ matrixOutput1 = c + + + HeadLightInclination + + + HeadLightInclination + + 0 + 90 + + + HeadLightOn @@ -2396,6 +2702,18 @@ matrixOutput1 = c + + + Light1Azimuth + + + Light1Azimuth + + 0 + 180 + + + Light1Color @@ -2408,6 +2726,18 @@ matrixOutput1 = c + + + Light1Inclination + + + Light1Inclination + + 0 + 90 + + + Light1On @@ -2420,6 +2750,18 @@ matrixOutput1 = c + + + Light2Azimuth + + + Light2Azimuth + + 0 + 180 + + + Light2Color @@ -2432,6 +2774,18 @@ matrixOutput1 = c + + + Light2Inclination + + + Light2Inclination + + 0 + 90 + + + Light2On @@ -2444,6 +2798,18 @@ matrixOutput1 = c + + + Light3Azimuth + + + Light3Azimuth + + 0 + 180 + + + Light3Color @@ -2456,6 +2822,18 @@ matrixOutput1 = c + + + Light3Inclination + + + Light3Inclination + + 0 + 90 + + + Light3On diff --git a/Networks/potential-based-inverse/MSF_inverse_python.srn5 b/Networks/potential-based-inverse/MSF_inverse_sock.srn5 similarity index 100% rename from Networks/potential-based-inverse/MSF_inverse_python.srn5 rename to Networks/potential-based-inverse/MSF_inverse_sock.srn5 diff --git a/Networks/uncertainty-forward/uncertainty_forward_III.srn5 b/Networks/uncertainty-forward/uncertainty_forward_III.srn5 new file mode 100644 index 0000000..39d3f72 --- /dev/null +++ b/Networks/uncertainty-forward/uncertainty_forward_III.srn5 @@ -0,0 +1,17133 @@ + + + + + + + 92 + 0 + + BooleanCompare:0 + + + SCIRun + Flow Control + BooleanCompare + + + + 6 + 0 + + + Comparison_Option + + + Comparison_Option + + 2 + greatop + + + + + + Else_Option + + + Else_Option + + 2 + third + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + Then_Option + + + Then_Option + + 2 + null + + + + + + Value_Option_1 + + + Value_Option_1 + + 2 + value + + + + + + Value_Option_2 + + + Value_Option_2 + + 2 + value + + + + + + + + + BuildBEMatrix:0 + + + SCIRun + Forward + BuildBEMatrix + + + + 5 + 0 + + + BoundaryConditionList + + + BoundaryConditionList + + 5 + + 2 + 0 + + + + 2 + Source (Dirichlet) + + + + + + 2 + Measurement (Neumann) + + + + + + + + + FieldNameList + + + FieldNameList + + 5 + + 2 + 0 + + + + 2 + field0 + + + + + + 2 + field1 + + + + + + + + + InsideConductivityList + + + InsideConductivityList + + 5 + + 2 + 0 + + + + 1 + 0.00000000000000000e+00 + + + + + + 1 + 1.00000000000000000e+00 + + + + + + + + + OutsideConductivityList + + + OutsideConductivityList + + 5 + + 2 + 0 + + + + 1 + 1.00000000000000000e+00 + + + + + + 1 + 0.00000000000000000e+00 + + + + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + CalculateFieldData:0 + + + SCIRun + ChangeFieldData + CalculateFieldData + + + + 3 + 0 + + + FormatString + + + FormatString + + 2 + Scalar + + + + + + FunctionString + + + FunctionString + + 2 + RESULT = DATA1*10; + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + CollectMatrices:0 + + + SCIRun + Math + CollectMatrices + + + + 4 + 0 + + + CollectAppendIndicator + + + CollectAppendIndicator + + 0 + 0 + + + + + + CollectPrependIndicator + + + CollectPrependIndicator + + 0 + 1 + + + + + + CollectRowIndicator + + + CollectRowIndicator + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ConvertMatrixToString:0 + + + SCIRun + Converters + ConvertMatrixToString + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ConvertScalarToMatrix:0 + + + SCIRun + Converters + ConvertScalarToMatrix + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ConvertScalarToMatrix:1 + + + SCIRun + Converters + ConvertScalarToMatrix + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + CreateStandardColorMap:0 + + + SCIRun + Visualization + CreateStandardColorMap + + + + 8 + 0 + + + AlphaUserPointsVector + + + AlphaUserPointsVector + + 5 + + 0 + 0 + + + + + + + ColorMapInvert + + + ColorMapInvert + + 3 + 0 + + + + + + ColorMapName + + + ColorMapName + + 2 + Rainbow + + + + + + ColorMapResolution + + + ColorMapResolution + + 0 + 256 + + + + + + ColorMapShift + + + ColorMapShift + + 1 + 0.00000000000000000e+00 + + + + + + CustomColor0 + + + CustomColor0 + + 2 + Color(0.2,0.2,0.2) + + + + + + CustomColor1 + + + CustomColor1 + + 2 + Color(0.8,0.8,0.8) + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + CreateStandardColorMap:1 + + + SCIRun + Visualization + CreateStandardColorMap + + + + 8 + 0 + + + AlphaUserPointsVector + + + AlphaUserPointsVector + + 5 + + 0 + 0 + + + + + + + ColorMapInvert + + + ColorMapInvert + + 3 + 0 + + + + + + ColorMapName + + + ColorMapName + + 2 + Rainbow + + + + + + ColorMapResolution + + + ColorMapResolution + + 0 + 256 + + + + + + ColorMapShift + + + ColorMapShift + + 1 + 0.00000000000000000e+00 + + + + + + CustomColor0 + + + CustomColor0 + + 2 + Color(0.2,0.2,0.2) + + + + + + CustomColor1 + + + CustomColor1 + + 2 + Color(0.8,0.8,0.8) + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + CreateStandardColorMap:2 + + + SCIRun + Visualization + CreateStandardColorMap + + + + 8 + 0 + + + AlphaUserPointsVector + + + AlphaUserPointsVector + + 5 + + 0 + 0 + + + + + + + ColorMapInvert + + + ColorMapInvert + + 3 + 0 + + + + + + ColorMapName + + + ColorMapName + + 2 + Rainbow + + + + + + ColorMapResolution + + + ColorMapResolution + + 0 + 256 + + + + + + ColorMapShift + + + ColorMapShift + + 1 + 0.00000000000000000e+00 + + + + + + CustomColor0 + + + CustomColor0 + + 2 + Color(0.2,0.2,0.2) + + + + + + CustomColor1 + + + CustomColor1 + + 2 + Color(0.8,0.8,0.8) + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + EvaluateLinearAlgebraBinary:0 + + + SCIRun + Math + EvaluateLinearAlgebraBinary + + + + 3 + 0 + + + FunctionString + + + FunctionString + + 2 + x+y + + + + + + Operator + + + Operator + + 0 + 2 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + EvaluateLinearAlgebraBinary:1 + + + SCIRun + Math + EvaluateLinearAlgebraBinary + + + + 3 + 0 + + + FunctionString + + + FunctionString + + 2 + x+y + + + + + + Operator + + + Operator + + 0 + 2 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + EvaluateLinearAlgebraBinary:2 + + + SCIRun + Math + EvaluateLinearAlgebraBinary + + + + 3 + 0 + + + FunctionString + + + FunctionString + + 2 + x+y + + + + + + Operator + + + Operator + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + EvaluateLinearAlgebraUnary:0 + + + SCIRun + Math + EvaluateLinearAlgebraUnary + + + + 4 + 0 + + + FunctionString + + + FunctionString + + 2 + x+10 + + + + + + Operator + + + Operator + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ScalarValue + + + ScalarValue + + 0 + 0 + + + + + + + + + EvaluateLinearAlgebraUnary:1 + + + SCIRun + Math + EvaluateLinearAlgebraUnary + + + + 4 + 0 + + + FunctionString + + + FunctionString + + 2 + x+10 + + + + + + Operator + + + Operator + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ScalarValue + + + ScalarValue + + 0 + 0 + + + + + + + + + EvaluateLinearAlgebraUnary:2 + + + SCIRun + Math + EvaluateLinearAlgebraUnary + + + + 4 + 0 + + + FunctionString + + + FunctionString + + 2 + x+10 + + + + + + Operator + + + Operator + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ScalarValue + + + ScalarValue + + 0 + 0 + + + + + + + + + EvaluateLinearAlgebraUnary:3 + + + SCIRun + Math + EvaluateLinearAlgebraUnary + + + + 4 + 0 + + + FunctionString + + + FunctionString + + 2 + x+10 + + + + + + Operator + + + Operator + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ScalarValue + + + ScalarValue + + 0 + 0 + + + + + + + + + GetFieldNodes:0 + + + SCIRun + ChangeMesh + GetFieldNodes + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + GetFieldNodes:1 + + + SCIRun + ChangeMesh + GetFieldNodes + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + GetMatrixSlice:0 + + + SCIRun + Math + GetMatrixSlice + + + + 7 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 1 + + + + + + MaxIndex + + + MaxIndex + + 0 + 382 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 203 + + + + + + + + + GetMatrixSlice:1 + + + SCIRun + Math + GetMatrixSlice + + + + 7 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 1 + + + + + + MaxIndex + + + MaxIndex + + 0 + 382 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 203 + + + + + + + + + GetMatrixSlice:2 + + + SCIRun + Math + GetMatrixSlice + + + + 7 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 1 + + + + + + MaxIndex + + + MaxIndex + + 0 + 124 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 0 + + + + + + + + + GetMatrixSlice:3 + + + SCIRun + Math + GetMatrixSlice + + + + 7 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 0 + + + + + + MaxIndex + + + MaxIndex + + 0 + 3 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 2 + + + + + + + + + GetMatrixSlice:4 + + + SCIRun + Math + GetMatrixSlice + + + + 7 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 0 + + + + + + MaxIndex + + + MaxIndex + + 0 + 9 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 0 + + + + + + + + + GetMatrixSlice:5 + + + SCIRun + Math + GetMatrixSlice + + + + 7 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 1 + + + + + + MaxIndex + + + MaxIndex + + 0 + 382 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 203 + + + + + + + + + GetMatrixSlice:6 + + + SCIRun + Math + GetMatrixSlice + + + + 7 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 1 + + + + + + MaxIndex + + + MaxIndex + + 0 + 382 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 203 + + + + + + + + + GetMatrixSlice:7 + + + SCIRun + Math + GetMatrixSlice + + + + 7 + 0 + + + IsSliceColumn + + + IsSliceColumn + + 3 + 1 + + + + + + MaxIndex + + + MaxIndex + + 0 + 382 + + + + + + PlayModeDelay + + + PlayModeDelay + + 0 + 0 + + + + + + PlayModeType + + + PlayModeType + + 2 + looponce + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + SliceIncrement + + + SliceIncrement + + 0 + 1 + + + + + + SliceIndex + + + SliceIndex + + 0 + 203 + + + + + + + + + ImportMatricesFromMatlab:0 + + + SCIRun + Matlab + ImportMatricesFromMatlab + + + + 3 + 0 + + + Filename + + + Filename + + 2 + /Users/jess/PD/Tank_Experiment/experiments/Tank_10_27_2014/geom/s_vect.mat + + + + + + PortChoices + + + PortChoices + + 5 + + 6 + 0 + + + + 2 + s_cent + + + + + + 2 + s_evecs + + + + + + 2 + radii + + + + + + 2 + <none> + + + + + + 2 + <none> + + + + + + 2 + <none> + + + + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + InterfaceWithPython:0 + + + SCIRun + Python + InterfaceWithPython + + + + 15 + 0 + + + InputField:0 + + + InputField:0 + + 2 + fieldInput1 + + + + + + NumberOfRetries + + + NumberOfRetries + + 0 + 50 + + + + + + PollingIntervalMilliseconds + + + PollingIntervalMilliseconds + + 0 + 20 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + PythonCode + + + PythonCode + + 2 + import numpy as np +import itertools +import os + +print('loaded builtin libs') + +"" +sys.path.append(os.environ['SCIRUNDATADIR']+'/PythonLibrary/Uncertainty/') + +print('path set') +import indexing, wafp, sensitivity +print('load 1') +from test_functions import genz_oscillatory +print('load 2') +from opolynd import opolynd_eval +print('load 3') +from recurrence import jacobi_recurrence +print('uncertainty code loaded') +"" + +# order of paramters: +# sagittal (XZ plane) swing (apex displacement, mm) +# coronal (YZ plane) swing (apex displacement, mm) +# long axis rotation (degrees) +# Z displacement (mm) + + +scalar = 20 + +torso = fieldInput1 + +Nx = len(torso['node']) + +print(Nx) + +x = np.linspace(0, 1, Nx) # spatial grid +#print(x) +curr_dir = os.getcwd() + + +######## Step 1: generate samples + +d = 4 # dimension of random/parameter space +k = 2 # polynomial degree (parameter space) +poly_space = indexing.total_degree_indices + +lambdas = poly_space(d, k) +N = lambdas.shape[0] + +M = N + 10 # Number of samples (expensive model runs) to perform. Must + # be at least N, but the +10 is arbitrary. + # Of course, large M ===> better. + +candidate_mesh_size = int(2e2) + +print("Generating parameter mesh...") +z = wafp.legendre_wafp(lambdas, M=candidate_mesh_size) +z = wafp.legendre_wafp_enrichment(z, lambdas, M-N)*scalar +print(z) +# The samples are the array z, each row is a d-dimensional sample on the +# hypercube [-1,1]^d. The particular way these points are generated is +# random, so you'll get a different set of z each time this is fun, but +# the "quality" of the grid has relatively low variance from run to run. +# This takes a while, but these points may be stored for future use. + +# Compare surrogate discrepancy at validation points +M_validation = 100 +z_validation = np.random.uniform(0, scalar, [100, d]) + +z_tot = np.row_stack((z,z_validation)) + +print(z_tot.shape) + +matrixOutput1 = (z_tot.T).tolist() +matrixOutput2 = lambdas.tolist() + +others = [[ d, k, N, M, M_validation, Nx ]] + +print(others) + +matrixOutput3 = others + + + + + + + + + + + + PythonOutputField1Name + + + PythonOutputField1Name + + 2 + fieldOutput1 + + + + + + PythonOutputField2Name + + + PythonOutputField2Name + + 2 + fieldOutput2 + + + + + + PythonOutputField3Name + + + PythonOutputField3Name + + 2 + fieldOutput3 + + + + + + PythonOutputMatrix1Name + + + PythonOutputMatrix1Name + + 2 + matrixOutput1 + + + + + + PythonOutputMatrix2Name + + + PythonOutputMatrix2Name + + 2 + matrixOutput2 + + + + + + PythonOutputMatrix3Name + + + PythonOutputMatrix3Name + + 2 + matrixOutput3 + + + + + + PythonOutputString1Name + + + PythonOutputString1Name + + 2 + stringOutput1 + + + + + + PythonOutputString2Name + + + PythonOutputString2Name + + 2 + stringOutput2 + + + + + + PythonOutputString3Name + + + PythonOutputString3Name + + 2 + stringOutput3 + + + + + + PythonTopLevelCode + + + PythonTopLevelCode + + 2 + # Main namespace/top level context code goes here; for example, import statements and global variables. +# This code will be executed before the 'Code' tab, and no input/output variables are available. + + + + + + + + + InterfaceWithPython:1 + + + SCIRun + Python + InterfaceWithPython + + + + 18 + 0 + + + InputMatrix:0 + + + InputMatrix:0 + + 2 + matrixInput1 + + + + + + InputMatrix:1 + + + InputMatrix:1 + + 2 + matrixInput2 + + + + + + InputMatrix:2 + + + InputMatrix:2 + + 2 + matrixInput3 + + + + + + InputMatrix:3 + + + InputMatrix:3 + + 2 + matrixInput4 + + + + + + NumberOfRetries + + + NumberOfRetries + + 0 + 50 + + + + + + PollingIntervalMilliseconds + + + PollingIntervalMilliseconds + + 0 + 20 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + PythonCode + + + PythonCode + + 2 + # Insert your Python code here. The SCIRun API package is automatically imported. +import itertools +import numpy as np +import os + + +u_in = matrixInput1 +lmd = matrixInput2 +z_in = matrixInput3 +others = matrixInput4 + +d = int(others[0][0]) +k = int(others[0][1]) +N = int(others[0][2]) +M = int(others[0][3]) +M_validation = int(others[0][4]) +Nx = int(others[0][5]) + +print(type(M)) + +u_tot = np.array(u_in) +u=u_tot[:,0:M] +u_truth = u_tot[:,M:] + +lambdas = np.array(lmd).astype(int) +z_tot = np.array(z_in).T + +z = z_tot[0:M,:] +z_validation = z_tot[M:,:] + + +print(z.shape) + +#print(lambdas) +print(lambdas.shape) +print(lambdas.max()) + +######## Step 3: compute PCE coefficients +print("Assembling PCE coefficients...") +ab = jacobi_recurrence(lambdas.max()+1, alpha=0., beta=0., probability=True) +print(ab) +V = opolynd_eval(z, lambdas, ab) +weights = np.sqrt(float(N)/float(M)) / np.sqrt(np.sum(V**2,axis=1)) + +# The PCE coefficients are computed as a weighted discrete least-squares +# estimator with the weights above. +coeffs = np.linalg.lstsq( (V.T*weights).T, (u*weights).T)[0].T + +# Each row of coeffs contains PCE coefficients for a single x gridpoint. +# Each column of coeffs contains a particular PCE coefficient for all +# values of x. + +######## Step 4: whatever postprocessing you want +print("Processing PCE coefficients...") +# Compute total sensitivities +total_sensitivities = sensitivity.pce_total_sensitivity(coeffs.T, lambdas, list(range(d))) +#np.savetxt(sens_tot_file,total_sensitivities,delimiter = ' ') + +# Compute global sensitivities +# Compute main-effect and main-interaction sensitivities +Js = [[j] for j in range(d)] +for comb in itertools.combinations(list(range(d)), 2): + Js.append(comb) + +global_sensitivities = sensitivity.pce_global_sensitivity(coeffs.T, lambdas, Js) +#np.savetxt(sens_global_file,global_sensitivities,delimiter = ' ') + +matrixOutput1 = total_sensitivities.tolist() +matrixOutput2 = global_sensitivities.tolist() + + +# compare to validation points +u_pce = np.zeros([Nx, M_validation]) +V = opolynd_eval(z_validation, lambdas, ab) +u_pce = np.dot(V, coeffs.T).T + + +# Compute l2- and max-errors for each grid point: +l2_error = np.sqrt(np.sum((u_truth - u_pce)**2, axis=1))/np.sqrt(N) +linf_error = np.max(np.abs(u_truth - u_pce), axis=1) + +string_out = "L2 error on validation mesh: {0:1.3e}\nMaximum error on validation mesh: {1:1.3e}".format(np.linalg.norm(l2_error)/np.sqrt(Nx), np.max(linf_error.flatten())) + +string2_out = "L2 error: {0:1.3e}".format(np.linalg.norm(l2_error)/np.sqrt(Nx)) +string3_out = "Max error: {0:1.3e}".format(np.max(linf_error.flatten())) + +print(string_out) +print(string2_out) +print(string3_out) + +stringOutput1 = string_out +stringOutput2 = string2_out +stringOutput3 = string3_out + + + + + + + + + + + + PythonOutputField1Name + + + PythonOutputField1Name + + 2 + fieldOutput1 + + + + + + PythonOutputField2Name + + + PythonOutputField2Name + + 2 + fieldOutput2 + + + + + + PythonOutputField3Name + + + PythonOutputField3Name + + 2 + fieldOutput3 + + + + + + PythonOutputMatrix1Name + + + PythonOutputMatrix1Name + + 2 + matrixOutput1 + + + + + + PythonOutputMatrix2Name + + + PythonOutputMatrix2Name + + 2 + matrixOutput2 + + + + + + PythonOutputMatrix3Name + + + PythonOutputMatrix3Name + + 2 + matrixOutput3 + + + + + + PythonOutputString1Name + + + PythonOutputString1Name + + 2 + stringOutput1 + + + + + + PythonOutputString2Name + + + PythonOutputString2Name + + 2 + stringOutput2 + + + + + + PythonOutputString3Name + + + PythonOutputString3Name + + 2 + stringOutput3 + + + + + + PythonTopLevelCode + + + PythonTopLevelCode + + 2 + # Main namespace/top level context code goes here; for example, import statements and global variables. +# This code will be executed before the 'Code' tab, and no input/output variables are available. + + + + + + + + + InterfaceWithPython:2 + + + SCIRun + Python + InterfaceWithPython + + + + 20 + 0 + + + InputMatrix:0 + + + InputMatrix:0 + + 2 + matrixInput1 + + + + + + InputMatrix:1 + + + InputMatrix:1 + + 2 + matrixInput1 + + + + + + InputMatrix:2 + + + InputMatrix:2 + + 2 + matrixInput3 + + + + + + InputMatrix:3 + + + InputMatrix:3 + + 2 + matrixInput2 + + + + + + InputMatrix:4 + + + InputMatrix:4 + + 2 + matrixInput3 + + + + + + InputMatrix:5 + + + InputMatrix:5 + + 2 + matrixInput4 + + + + + + NumberOfRetries + + + NumberOfRetries + + 0 + 50 + + + + + + PollingIntervalMilliseconds + + + PollingIntervalMilliseconds + + 0 + 200 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + PythonCode + + + PythonCode + + 2 + import numpy as np + +weights = matrixInput1 +cent = matrixInput2 +s_evecs = matrixInput3 +radii = matrixInput4 + +#weights = [[-30], [-30],[20],[20]] + +print(weights) + +h_length = radii[0][0] + + +v1 = [0,1,0] +v2 = [1,0,0] +v3 = [s_evecs[0][0],s_evecs[1][0], s_evecs[2][0]] + + +theta1 = np.arcsin(weights[0][0]/h_length) +theta2 = np.arcsin(weights[1][0]/h_length) +theta3 = np.radians(weights[2][0]) + +c1 = np.cos(theta1) +s1 = np.sin(theta1) +c2 = np.cos(theta2) +s2 = np.sin(theta2) +c3 = np.cos(theta3) +s3 = np.sin(theta3) + +T1 = np.array([ [ 1,0, 0, - cent[0][0]], [ 0,1, 0, - cent[1][0]], [ 0, 0, 1, - cent[2][0]], [0, 0, 0, 1] ]) +T2 = np.array([ [ 1,0, 0, cent[0][0]], [ 0,1, 0, cent[1][0]], [ 0, 0, 1, cent[2][0]], [0, 0, 0, 1] ]) + +Ry = np.array( [ [ c1, 0, s1, 0], [0,1,0,0], [-s1, 0, c1, 0], [0,0,0,1] ]) +Rx = np.array( [ [ 1,0,0,0], [0, c2, -s2, 0], [0, s2, c2, 0], [0,0,0,1] ]) +R3 = np.array( [ [ c3+v3[0]*v3[0]*(1-c3), v3[0]*v3[1]*(1-c3)-v3[2]*s3, v3[0]*v3[2]*(1-c3)+v3[1]*s3 , 0], + [ v3[1]*v3[0]*(1-c3)+v3[2]*s3, c3+v3[1]*v3[1]*(1-c3) , v3[2]*v3[1]*(1-c3)-v3[0]*s3 , 0], + [ v3[0]*v3[2]*(1-c3)-v3[1]*s3, v3[2]*v3[1]*(1-c3)+v3[0]*s3, c3+v3[2]*v3[2]*(1-c3), 0], + [ 0, 0, 0, 1] ]) + + +Tz = np.vstack((np.hstack((np.identity(3),np.array([[0],[0],[weights[3][0]]]))),np.array([[0,0,0,1]]))) + +Transform = np.dot(Tz,np.dot(T2,np.dot(Rx,np.dot(Ry,np.dot(R3,T1))))) + +#print(v3) +#print(cent) + +field1 = {'node': cent, 'field' : [ v3 ] } + + +I = np.identity(4) +matrixOutput1 = Transform.tolist() +fieldOutput1 = field1 +matrixOutput2 = [v3] + + + + + + + + PythonOutputField1Name + + + PythonOutputField1Name + + 2 + fieldOutput1 + + + + + + PythonOutputField2Name + + + PythonOutputField2Name + + 2 + fieldOutput2 + + + + + + PythonOutputField3Name + + + PythonOutputField3Name + + 2 + fieldOutput3 + + + + + + PythonOutputMatrix1Name + + + PythonOutputMatrix1Name + + 2 + matrixOutput1 + + + + + + PythonOutputMatrix2Name + + + PythonOutputMatrix2Name + + 2 + matrixOutput2 + + + + + + PythonOutputMatrix3Name + + + PythonOutputMatrix3Name + + 2 + matrixOutput3 + + + + + + PythonOutputString1Name + + + PythonOutputString1Name + + 2 + stringOutput1 + + + + + + PythonOutputString2Name + + + PythonOutputString2Name + + 2 + stringOutput2 + + + + + + PythonOutputString3Name + + + PythonOutputString3Name + + 2 + stringOutput3 + + + + + + PythonTopLevelCode + + + PythonTopLevelCode + + 2 + # Main namespace/top level context code goes here; for example, import statements and global variables. +# This code will be executed before the 'Code' tab, and no input/output variables are available. + + + + + + + + + LinePlotter:0 + + + SCIRun + Math + LinePlotter + + + + 14 + 0 + + + CurveStyle + + + CurveStyle + + 2 + Lines + + + + + + DataTitle + + + DataTitle + + 2 + Data title + + + + + + HorizontalAxisPosition + + + HorizontalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + HorizontalAxisVisible + + + HorizontalAxisVisible + + 3 + 1 + + + + + + PlotBackgroundColor + + + PlotBackgroundColor + + 2 + + + + + + + PlotColors + + + PlotColors + + 5 + + 5 + 0 + + listElement + + 2 + Color(0.152941,0.129412,0.235294) + + + + listElement + + 2 + Color(0.352941,0.207843,0.164706) + + + + listElement + + 2 + Color(0.639216,0.231373,0.12549) + + + + listElement + + 2 + Color(0.643137,0.47451,0.388235) + + + + listElement + + 2 + Color(0.65098,0.647059,0.478431) + + + + + + + + + PlotTitle + + + PlotTitle + + 2 + + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ShowPointSymbols + + + ShowPointSymbols + + 3 + 0 + + + + + + TransposeData + + + TransposeData + + 3 + 0 + + + + + + VerticalAxisPosition + + + VerticalAxisPosition + + 1 + -3.30000000000000000e+01 + + + + + + VerticalAxisVisible + + + VerticalAxisVisible + + 3 + 1 + + + + + + XAxisLabel + + + XAxisLabel + + 2 + time (ms) + + + + + + YAxisLabel + + + YAxisLabel + + 2 + epi potential (mV) + + + + + + + + + LinePlotter:1 + + + SCIRun + Math + LinePlotter + + + + 14 + 0 + + + CurveStyle + + + CurveStyle + + 2 + Lines + + + + + + DataTitle + + + DataTitle + + 2 + Data title + + + + + + HorizontalAxisPosition + + + HorizontalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + HorizontalAxisVisible + + + HorizontalAxisVisible + + 3 + 1 + + + + + + PlotBackgroundColor + + + PlotBackgroundColor + + 2 + + + + + + + PlotColors + + + PlotColors + + 5 + + 5 + 0 + + listElement + + 2 + Color(0.152941,0.129412,0.235294) + + + + listElement + + 2 + Color(0.352941,0.207843,0.164706) + + + + listElement + + 2 + Color(0.639216,0.231373,0.12549) + + + + listElement + + 2 + Color(0.643137,0.47451,0.388235) + + + + listElement + + 2 + Color(0.65098,0.647059,0.478431) + + + + + + + + + PlotTitle + + + PlotTitle + + 2 + Plot title + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ShowPointSymbols + + + ShowPointSymbols + + 3 + 0 + + + + + + TransposeData + + + TransposeData + + 3 + 0 + + + + + + VerticalAxisPosition + + + VerticalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + VerticalAxisVisible + + + VerticalAxisVisible + + 3 + 1 + + + + + + XAxisLabel + + + XAxisLabel + + 2 + time + + + + + + YAxisLabel + + + YAxisLabel + + 2 + std + + + + + + + + + LinePlotter:2 + + + SCIRun + Math + LinePlotter + + + + 14 + 0 + + + CurveStyle + + + CurveStyle + + 2 + Lines + + + + + + DataTitle + + + DataTitle + + 2 + Data title + + + + + + HorizontalAxisPosition + + + HorizontalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + HorizontalAxisVisible + + + HorizontalAxisVisible + + 3 + 1 + + + + + + PlotBackgroundColor + + + PlotBackgroundColor + + 2 + + + + + + + PlotColors + + + PlotColors + + 5 + + 5 + 0 + + listElement + + 2 + Color(0.152941,0.129412,0.235294) + + + + listElement + + 2 + Color(0.352941,0.207843,0.164706) + + + + listElement + + 2 + Color(0.639216,0.231373,0.12549) + + + + listElement + + 2 + Color(0.643137,0.47451,0.388235) + + + + listElement + + 2 + Color(0.65098,0.647059,0.478431) + + + + + + + + + PlotTitle + + + PlotTitle + + 2 + global sensitivities + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ShowPointSymbols + + + ShowPointSymbols + + 3 + 0 + + + + + + TransposeData + + + TransposeData + + 3 + 0 + + + + + + VerticalAxisPosition + + + VerticalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + VerticalAxisVisible + + + VerticalAxisVisible + + 3 + 1 + + + + + + XAxisLabel + + + XAxisLabel + + 2 + time + + + + + + YAxisLabel + + + YAxisLabel + + 2 + norm(std) + + + + + + + + + LinePlotter:3 + + + SCIRun + Math + LinePlotter + + + + 14 + 0 + + + CurveStyle + + + CurveStyle + + 2 + Lines + + + + + + DataTitle + + + DataTitle + + 2 + Data title + + + + + + HorizontalAxisPosition + + + HorizontalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + HorizontalAxisVisible + + + HorizontalAxisVisible + + 3 + 1 + + + + + + PlotBackgroundColor + + + PlotBackgroundColor + + 2 + + + + + + + PlotColors + + + PlotColors + + 5 + + 5 + 0 + + listElement + + 2 + Color(0.152941,0.129412,0.235294) + + + + listElement + + 2 + Color(0.352941,0.207843,0.164706) + + + + listElement + + 2 + Color(0.639216,0.231373,0.12549) + + + + listElement + + 2 + Color(0.643137,0.47451,0.388235) + + + + listElement + + 2 + Color(0.65098,0.647059,0.478431) + + + + + + + + + PlotTitle + + + PlotTitle + + 2 + Plot title + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ShowPointSymbols + + + ShowPointSymbols + + 3 + 0 + + + + + + TransposeData + + + TransposeData + + 3 + 0 + + + + + + VerticalAxisPosition + + + VerticalAxisPosition + + 1 + 0.00000000000000000e+00 + + + + + + VerticalAxisVisible + + + VerticalAxisVisible + + 3 + 1 + + + + + + XAxisLabel + + + XAxisLabel + + 2 + time + + + + + + YAxisLabel + + + YAxisLabel + + 2 + std + + + + + + + + + PrintStringIntoString:0 + + + SCIRun + String + PrintStringIntoString + + + + 2 + 0 + + + FormatString + + + FormatString + + 2 + %scapped_sock_lap_mapping.mat + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + PrintStringIntoString:1 + + + SCIRun + String + PrintStringIntoString + + + + 2 + 0 + + + FormatString + + + FormatString + + 2 + %ss_vect.mat + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReadField:0 + + + SCIRun + DataIO + ReadField + + + + 5 + 0 + + + FileTypeName + + + FileTypeName + + 2 + Matlab Field + + + + + + Filename + + + Filename + + 2 + /Users/jess/CIBC/PD/Tank_Experiment/experiments/Tank_10_27_2014/geom/capped_sock.mat + + + + + + GuiFileTypeName + + + GuiFileTypeName + + 2 + + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ScriptEnvironmentVariable + + + ScriptEnvironmentVariable + + 2 + + + + + + + + + + ReadField:1 + + + SCIRun + DataIO + ReadField + + + + 5 + 0 + + + FileTypeName + + + FileTypeName + + 2 + Matlab Field + + + + + + Filename + + + Filename + + 2 + /Users/jess/PD/Tank_Experiment/geoms_original/Full_tank_771.mat + + + + + + GuiFileTypeName + + + GuiFileTypeName + + 2 + + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ScriptEnvironmentVariable + + + ScriptEnvironmentVariable + + 2 + + + + + + + + + + ReadMatrix:0 + + + SCIRun + DataIO + ReadMatrix + + + + 5 + 0 + + + FileTypeName + + + FileTypeName + + 2 + Matlab Matrix + + + + + + Filename + + + Filename + + 2 + /Users/jess/CIBC/PD/Tank_Experiment/experiments/Tank_10_27_2014/processed_ecg/mat_files/beat1/Run0001-cs.mat + + + + + + GuiFileTypeName + + + GuiFileTypeName + + 2 + + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ScriptEnvironmentVariable + + + ScriptEnvironmentVariable + + 2 + + + + + + + + + + ReadMatrix:1 + + + SCIRun + DataIO + ReadMatrix + + + + 5 + 0 + + + FileTypeName + + + FileTypeName + + 2 + Matlab Matrix + + + + + + Filename + + + Filename + + 2 + /Users/jess/PD/Tank_Experiment/experiments/Tank_10_27_2014/geom/capped_sock_lap_mapping.mat + + + + + + GuiFileTypeName + + + GuiFileTypeName + + 2 + + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ScriptEnvironmentVariable + + + ScriptEnvironmentVariable + + 2 + + + + + + + + + + ReportMatrixInfo:0 + + + SCIRun + Math + ReportMatrixInfo + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportMatrixInfo:1 + + + SCIRun + Math + ReportMatrixInfo + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportMatrixInfo:2 + + + SCIRun + Math + ReportMatrixInfo + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportMatrixInfo:3 + + + SCIRun + Math + ReportMatrixInfo + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportMatrixSliceMeasure:0 + + + SCIRun + Math + ReportMatrixSliceMeasure + + + + 3 + 0 + + + Method + + + Method + + 0 + 4 + + + + + + Operator + + + Operator + + 0 + 0 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportMatrixSliceMeasure:1 + + + SCIRun + Math + ReportMatrixSliceMeasure + + + + 3 + 0 + + + Method + + + Method + + 0 + 4 + + + + + + Operator + + + Operator + + 0 + 0 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportMatrixSliceMeasure:2 + + + SCIRun + Math + ReportMatrixSliceMeasure + + + + 3 + 0 + + + Method + + + Method + + 0 + 1 + + + + + + Operator + + + Operator + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportMatrixSliceMeasure:3 + + + SCIRun + Math + ReportMatrixSliceMeasure + + + + 3 + 0 + + + Method + + + Method + + 0 + 4 + + + + + + Operator + + + Operator + + 0 + 0 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportMatrixSliceMeasure:4 + + + SCIRun + Math + ReportMatrixSliceMeasure + + + + 3 + 0 + + + Method + + + Method + + 0 + 1 + + + + + + Operator + + + Operator + + 0 + 0 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportMatrixSliceMeasure:5 + + + SCIRun + Math + ReportMatrixSliceMeasure + + + + 3 + 0 + + + Method + + + Method + + 0 + 1 + + + + + + Operator + + + Operator + + 0 + 0 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportStringInfo:0 + + + SCIRun + String + ReportStringInfo + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportStringInfo:1 + + + SCIRun + String + ReportStringInfo + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportStringInfo:2 + + + SCIRun + String + ReportStringInfo + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ReportStringInfo:3 + + + SCIRun + String + ReportStringInfo + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + RescaleColorMap:0 + + + SCIRun + Visualization + RescaleColorMap + + + + 5 + 0 + + + AutoScale + + + AutoScale + + 0 + 0 + + + + + + FixedMax + + + FixedMax + + 1 + 3.59510919419421660e+00 + + + + + + FixedMin + + + FixedMin + + 1 + -9.28728671992329780e-01 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + Symmetric + + + Symmetric + + 3 + 0 + + + + + + + + + RescaleColorMap:1 + + + SCIRun + Visualization + RescaleColorMap + + + + 5 + 0 + + + AutoScale + + + AutoScale + + 0 + 0 + + + + + + FixedMax + + + FixedMax + + 1 + 3.58987224302422581e-01 + + + + + + FixedMin + + + FixedMin + + 1 + 2.81890244373098176e-01 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + Symmetric + + + Symmetric + + 3 + 0 + + + + + + + + + RescaleColorMap:2 + + + SCIRun + Visualization + RescaleColorMap + + + + 5 + 0 + + + AutoScale + + + AutoScale + + 0 + 1 + + + + + + FixedMax + + + FixedMax + + 1 + 1.00000000000000000e+00 + + + + + + FixedMin + + + FixedMin + + 1 + 0.00000000000000000e+00 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + Symmetric + + + Symmetric + + 3 + 0 + + + + + + + + + RescaleColorMap:3 + + + SCIRun + Visualization + RescaleColorMap + + + + 5 + 0 + + + AutoScale + + + AutoScale + + 0 + 0 + + + + + + FixedMax + + + FixedMax + + 1 + 2.67532303241773461e-01 + + + + + + FixedMin + + + FixedMin + + 1 + 2.50001833983863497e-01 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + Symmetric + + + Symmetric + + 3 + 0 + + + + + + + + + RescaleColorMap:4 + + + SCIRun + Visualization + RescaleColorMap + + + + 5 + 0 + + + AutoScale + + + AutoScale + + 0 + 0 + + + + + + FixedMax + + + FixedMax + + 1 + 3.08172666853572359e+01 + + + + + + FixedMin + + + FixedMin + + 1 + 5.02000384333046323e+00 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + Symmetric + + + Symmetric + + 3 + 0 + + + + + + + + + ResizeMatrix:0 + + + SCIRun + Math + ResizeMatrix + + + + 4 + 0 + + + Major + + + Major + + 2 + Row + + + + + + NoOfColumns + + + NoOfColumns + + 0 + 1 + + + + + + NoOfRows + + + NoOfRows + + 0 + 295293 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ResizeMatrix:1 + + + SCIRun + Math + ResizeMatrix + + + + 4 + 0 + + + Major + + + Major + + 2 + Row + + + + + + NoOfColumns + + + NoOfColumns + + 0 + 383 + + + + + + NoOfRows + + + NoOfRows + + 0 + 771 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ResizeMatrix:2 + + + SCIRun + Math + ResizeMatrix + + + + 4 + 0 + + + Major + + + Major + + 2 + Row + + + + + + NoOfColumns + + + NoOfColumns + + 0 + 383 + + + + + + NoOfRows + + + NoOfRows + + 0 + 771 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ResizeMatrix:3 + + + SCIRun + Math + ResizeMatrix + + + + 4 + 0 + + + Major + + + Major + + 2 + Row + + + + + + NoOfColumns + + + NoOfColumns + + 0 + 383 + + + + + + NoOfRows + + + NoOfRows + + 0 + 771 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + SetFieldData:0 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 2 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + SetFieldData:1 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 2 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + SetFieldData:2 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 2 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + SetFieldData:4 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 2 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + SetFieldData:5 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 2 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + SetFieldData:6 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 2 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + SetFieldData:7 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 2 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + SetFieldData:8 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 2 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + SetFieldData:9 + + + SCIRun + ChangeFieldData + SetFieldData + + + + 2 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + keepTypeCheckBox + + + keepTypeCheckBox + + 3 + 0 + + + + + + + + + ShowColorMap:0 + + + SCIRun + Visualization + ShowColorMap + + + + 15 + 0 + + + AddExtraSpace + + + AddExtraSpace + + 3 + 0 + + + + + + ColorMapName + + + ColorMapName + + 2 + + + + + + + DisplayLength + + + DisplayLength + + 0 + 0 + + + + + + DisplaySide + + + DisplaySide + + 0 + 0 + + + + + + Labels + + + Labels + + 0 + 3 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + Scale + + + Scale + + 1 + 1.00000000000000000e+00 + + + + + + SignificantDigits + + + SignificantDigits + + 0 + 3 + + + + + + TextBlue + + + TextBlue + + 1 + 0.00000000000000000e+00 + + + + + + TextGreen + + + TextGreen + + 1 + 0.00000000000000000e+00 + + + + + + TextRed + + + TextRed + + 1 + 0.00000000000000000e+00 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + Units + + + Units + + 2 + + + + + + + XTranslation + + + XTranslation + + 0 + 0 + + + + + + YTranslation + + + YTranslation + + 0 + 10 + + + + + + + + + ShowField:0 + + + SCIRun + Visualization + ShowField + + + + 39 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 0 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 0 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + cardiacPot + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 1 + + + + + + + + + ShowField:1 + + + SCIRun + Visualization + ShowField + + + + 39 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 1 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 1 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + BSPM + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 1 + + + + + + + + + ShowField:2 + + + SCIRun + Visualization + ShowField + + + + 39 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 1 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 0 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + total sensitivities + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 1 + + + + + + + + + ShowField:3 + + + SCIRun + Visualization + ShowField + + + + 39 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 1 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 0 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + global sensitivities + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 1 + + + + + + + + + ShowField:4 + + + SCIRun + Visualization + ShowField + + + + 39 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 5.00000000000000000e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 1 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 0 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 0 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 0 + + + + + + FieldName + + + FieldName + + 2 + orig heart pos + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 1 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 0 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 0 + + + + + + + + + ShowField:5 + + + SCIRun + Visualization + ShowField + + + + 39 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 0 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 0 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 1 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 0 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 0 + + + + + + + + + ShowField:6 + + + SCIRun + Visualization + ShowField + + + + 39 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 1 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 0 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + spatial mean total + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 1 + + + + + + + + + ShowField:7 + + + SCIRun + Visualization + ShowField + + + + 39 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 1 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 0 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + mean_total + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 1 + + + + + + + + + ShowField:8 + + + SCIRun + Visualization + ShowField + + + + 39 + 0 + + + CullBackfacingText + + + CullBackfacingText + + 3 + 0 + + + + + + CylinderRadius + + + CylinderRadius + + 1 + 1.00000000000000006e-01 + + + + + + CylinderResolution + + + CylinderResolution + + 0 + 5 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + DefaultTextColor + + + DefaultTextColor + + 2 + Color(1,1,1) + + + + + + EdgeTransparency + + + EdgeTransparency + + 3 + 0 + + + + + + EdgeTransparencyValue + + + EdgeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + EdgesAsCylinders + + + EdgesAsCylinders + + 0 + 0 + + + + + + EdgesAvailable + + + EdgesAvailable + + 3 + 1 + + + + + + EdgesColoring + + + EdgesColoring + + 0 + 1 + + + + + + FaceInvertNormals + + + FaceInvertNormals + + 3 + 0 + + + + + + FaceTransparency + + + FaceTransparency + + 3 + 0 + + + + + + FaceTransparencyValue + + + FaceTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + FacesAvailable + + + FacesAvailable + + 3 + 1 + + + + + + FacesColoring + + + FacesColoring + + 0 + 1 + + + + + + FieldName + + + FieldName + + 2 + mean_global + + + + + + NodeAsSpheres + + + NodeAsSpheres + + 0 + 0 + + + + + + NodeTransparency + + + NodeTransparency + + 3 + 0 + + + + + + NodeTransparencyValue + + + NodeTransparencyValue + + 1 + 6.49999976158142090e-01 + + + + + + NodesAvailable + + + NodesAvailable + + 3 + 1 + + + + + + NodesColoring + + + NodesColoring + + 0 + 1 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + RenderAsLocation + + + RenderAsLocation + + 3 + 0 + + + + + + ShowCellIndices + + + ShowCellIndices + + 3 + 0 + + + + + + ShowDataValues + + + ShowDataValues + + 3 + 1 + + + + + + ShowEdgeIndices + + + ShowEdgeIndices + + 3 + 0 + + + + + + ShowEdges + + + ShowEdges + + 3 + 0 + + + + + + ShowFaceIndices + + + ShowFaceIndices + + 3 + 0 + + + + + + ShowFaces + + + ShowFaces + + 3 + 1 + + + + + + ShowNodeIndices + + + ShowNodeIndices + + 3 + 0 + + + + + + ShowNodes + + + ShowNodes + + 3 + 0 + + + + + + ShowText + + + ShowText + + 3 + 0 + + + + + + SphereResolution + + + SphereResolution + + 0 + 5 + + + + + + SphereScaleValue + + + SphereScaleValue + + 1 + 2.99999999999999989e-02 + + + + + + TextAlwaysVisible + + + TextAlwaysVisible + + 3 + 0 + + + + + + TextColoring + + + TextColoring + + 0 + 0 + + + + + + TextPrecision + + + TextPrecision + + 0 + 3 + + + + + + TextSize + + + TextSize + + 0 + 8 + + + + + + UseFaceNormals + + + UseFaceNormals + + 3 + 1 + + + + + + + + + ShowFieldGlyphs:0 + + + SCIRun + Visualization + ShowFieldGlyphs + + + + 52 + 0 + + + ArrowHeadRatio + + + ArrowHeadRatio + + 1 + 5.00000000000000000e-01 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.549401,0,0) + + + + + + FieldName + + + FieldName + + 2 + Heart Long axis + + + + + + NormalizeGlyphs + + + NormalizeGlyphs + + 3 + 0 + + + + + + NormalizeTensors + + + NormalizeTensors + + 3 + 0 + + + + + + NormalizeVectors + + + NormalizeVectors + + 3 + 0 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + RenderBases + + + RenderBases + + 3 + 0 + + + + + + RenderBidirectionaly + + + RenderBidirectionaly + + 3 + 1 + + + + + + RenderGlyphsBellowThreshold + + + RenderGlyphsBellowThreshold + + 3 + 1 + + + + + + RenderTensorsBelowThreshold + + + RenderTensorsBelowThreshold + + 3 + 1 + + + + + + RenderVectorsBelowThreshold + + + RenderVectorsBelowThreshold + + 3 + 1 + + + + + + ScalarsColoring + + + ScalarsColoring + + 0 + 0 + + + + + + ScalarsColoringDataInput + + + ScalarsColoringDataInput + + 2 + Primary + + + + + + ScalarsDisplayType + + + ScalarsDisplayType + + 0 + 0 + + + + + + ScalarsResolution + + + ScalarsResolution + + 0 + 10 + + + + + + ScalarsScale + + + ScalarsScale + + 1 + 1.00000000000000000e+00 + + + + + + ScalarsThreshold + + + ScalarsThreshold + + 1 + 0.00000000000000000e+00 + + + + + + ScalarsTransparency + + + ScalarsTransparency + + 3 + 0 + + + + + + ScalarsTransparencyValue + + + ScalarsTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + ScalarsUniformTransparencyValue + + + ScalarsUniformTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + SecondaryVectorParameterDataInput + + + SecondaryVectorParameterDataInput + + 2 + Primary + + + + + + SecondaryVectorParameterScale + + + SecondaryVectorParameterScale + + 1 + 2.50000000000000000e-01 + + + + + + SecondaryVectorParameterScalingType + + + SecondaryVectorParameterScalingType + + 0 + 1 + + + + + + ShowScalarTab + + + ShowScalarTab + + 3 + 0 + + + + + + ShowScalars + + + ShowScalars + + 3 + 0 + + + + + + ShowSecondaryTab + + + ShowSecondaryTab + + 3 + 0 + + + + + + ShowTensorTab + + + ShowTensorTab + + 3 + 0 + + + + + + ShowTensors + + + ShowTensors + + 3 + 0 + + + + + + ShowTertiaryTab + + + ShowTertiaryTab + + 3 + 0 + + + + + + ShowVectorTab + + + ShowVectorTab + + 3 + 1 + + + + + + ShowVectors + + + ShowVectors + + 3 + 1 + + + + + + SuperquadricEmphasis + + + SuperquadricEmphasis + + 1 + 8.49999999999999978e-01 + + + + + + TensorsColoring + + + TensorsColoring + + 0 + 0 + + + + + + TensorsColoringDataInput + + + TensorsColoringDataInput + + 2 + Primary + + + + + + TensorsDisplayType + + + TensorsDisplayType + + 0 + 2 + + + + + + TensorsResolution + + + TensorsResolution + + 0 + 10 + + + + + + TensorsScale + + + TensorsScale + + 1 + 1.00000000000000006e-01 + + + + + + TensorsThreshold + + + TensorsThreshold + + 1 + 0.00000000000000000e+00 + + + + + + TensorsTransparency + + + TensorsTransparency + + 3 + 0 + + + + + + TensorsTransparencyValue + + + TensorsTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + TensorsUniformTransparencyValue + + + TensorsUniformTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + Threshold + + + Threshold + + 1 + 0.00000000000000000e+00 + + + + + + VectorsColoring + + + VectorsColoring + + 0 + 0 + + + + + + VectorsColoringDataInput + + + VectorsColoringDataInput + + 2 + Primary + + + + + + VectorsDisplayType + + + VectorsDisplayType + + 0 + 0 + + + + + + VectorsResolution + + + VectorsResolution + + 0 + 5 + + + + + + VectorsScale + + + VectorsScale + + 1 + 1.00000000000000000e+01 + + + + + + VectorsThreshold + + + VectorsThreshold + + 1 + 0.00000000000000000e+00 + + + + + + VectorsTransparency + + + VectorsTransparency + + 3 + 0 + + + + + + VectorsTransparencyValue + + + VectorsTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + VectorsUniformTransparencyValue + + + VectorsUniformTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + + + + ShowFieldGlyphs:1 + + + SCIRun + Visualization + ShowFieldGlyphs + + + + 52 + 0 + + + ArrowHeadRatio + + + ArrowHeadRatio + + 1 + 5.00000000000000000e-01 + + + + + + DefaultMeshColor + + + DefaultMeshColor + + 2 + Color(0.5,0.5,0.5) + + + + + + FieldName + + + FieldName + + 2 + + + + + + + NormalizeGlyphs + + + NormalizeGlyphs + + 3 + 0 + + + + + + NormalizeTensors + + + NormalizeTensors + + 3 + 0 + + + + + + NormalizeVectors + + + NormalizeVectors + + 3 + 0 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + RenderBases + + + RenderBases + + 3 + 0 + + + + + + RenderBidirectionaly + + + RenderBidirectionaly + + 3 + 0 + + + + + + RenderGlyphsBellowThreshold + + + RenderGlyphsBellowThreshold + + 3 + 1 + + + + + + RenderTensorsBelowThreshold + + + RenderTensorsBelowThreshold + + 3 + 1 + + + + + + RenderVectorsBelowThreshold + + + RenderVectorsBelowThreshold + + 3 + 1 + + + + + + ScalarsColoring + + + ScalarsColoring + + 0 + 0 + + + + + + ScalarsColoringDataInput + + + ScalarsColoringDataInput + + 2 + Primary + + + + + + ScalarsDisplayType + + + ScalarsDisplayType + + 0 + 0 + + + + + + ScalarsResolution + + + ScalarsResolution + + 0 + 10 + + + + + + ScalarsScale + + + ScalarsScale + + 1 + 1.00000000000000000e+00 + + + + + + ScalarsThreshold + + + ScalarsThreshold + + 1 + 0.00000000000000000e+00 + + + + + + ScalarsTransparency + + + ScalarsTransparency + + 3 + 0 + + + + + + ScalarsTransparencyValue + + + ScalarsTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + ScalarsUniformTransparencyValue + + + ScalarsUniformTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + SecondaryVectorParameterDataInput + + + SecondaryVectorParameterDataInput + + 2 + Primary + + + + + + SecondaryVectorParameterScale + + + SecondaryVectorParameterScale + + 1 + 2.50000000000000000e-01 + + + + + + SecondaryVectorParameterScalingType + + + SecondaryVectorParameterScalingType + + 0 + 1 + + + + + + ShowScalarTab + + + ShowScalarTab + + 3 + 0 + + + + + + ShowScalars + + + ShowScalars + + 3 + 0 + + + + + + ShowSecondaryTab + + + ShowSecondaryTab + + 3 + 0 + + + + + + ShowTensorTab + + + ShowTensorTab + + 3 + 0 + + + + + + ShowTensors + + + ShowTensors + + 3 + 0 + + + + + + ShowTertiaryTab + + + ShowTertiaryTab + + 3 + 0 + + + + + + ShowVectorTab + + + ShowVectorTab + + 3 + 1 + + + + + + ShowVectors + + + ShowVectors + + 3 + 1 + + + + + + SuperquadricEmphasis + + + SuperquadricEmphasis + + 1 + 8.49999999999999978e-01 + + + + + + TensorsColoring + + + TensorsColoring + + 0 + 0 + + + + + + TensorsColoringDataInput + + + TensorsColoringDataInput + + 2 + Primary + + + + + + TensorsDisplayType + + + TensorsDisplayType + + 0 + 2 + + + + + + TensorsResolution + + + TensorsResolution + + 0 + 10 + + + + + + TensorsScale + + + TensorsScale + + 1 + 1.00000000000000006e-01 + + + + + + TensorsThreshold + + + TensorsThreshold + + 1 + 0.00000000000000000e+00 + + + + + + TensorsTransparency + + + TensorsTransparency + + 3 + 0 + + + + + + TensorsTransparencyValue + + + TensorsTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + TensorsUniformTransparencyValue + + + TensorsUniformTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + Threshold + + + Threshold + + 1 + 0.00000000000000000e+00 + + + + + + VectorsColoring + + + VectorsColoring + + 0 + 1 + + + + + + VectorsColoringDataInput + + + VectorsColoringDataInput + + 2 + Primary + + + + + + VectorsDisplayType + + + VectorsDisplayType + + 0 + 4 + + + + + + VectorsResolution + + + VectorsResolution + + 0 + 10 + + + + + + VectorsScale + + + VectorsScale + + 1 + 5.00000000000000000e-01 + + + + + + VectorsThreshold + + + VectorsThreshold + + 1 + 0.00000000000000000e+00 + + + + + + VectorsTransparency + + + VectorsTransparency + + 3 + 0 + + + + + + VectorsTransparencyValue + + + VectorsTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + VectorsUniformTransparencyValue + + + VectorsUniformTransparencyValue + + 1 + 6.50000000000000022e-01 + + + + + + + + + ShowString:0 + + + SCIRun + Visualization + ShowString + + + + 12 + 0 + + + CoordinateHorizontal + + + CoordinateHorizontal + + 1 + 1.49999999999999994e-01 + + + + + + CoordinateVertical + + + CoordinateVertical + + 1 + 9.49999999999999956e-01 + + + + + + FixedHorizontal + + + FixedHorizontal + + 2 + Left + + + + + + FixedVertical + + + FixedVertical + + 2 + Top + + + + + + FontName + + + FontName + + 2 + FreeSansBold + + + + + + FontSize + + + FontSize + + 0 + 18 + + + + + + PositionType + + + PositionType + + 2 + Coordinates + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + TextAlpha + + + TextAlpha + + 1 + 1.00000000000000000e+00 + + + + + + TextBlue + + + TextBlue + + 1 + 0.00000000000000000e+00 + + + + + + TextGreen + + + TextGreen + + 1 + 0.00000000000000000e+00 + + + + + + TextRed + + + TextRed + + 1 + 0.00000000000000000e+00 + + + + + + + + + SplitFileName:0 + + + SCIRun + String + SplitFileName + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + TransformMeshWithTransform:0 + + + SCIRun + ChangeMesh + TransformMeshWithTransform + + + + 1 + 0 + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + ViewScene:0 + + + SCIRun + Render + ViewScene + + + + 54 + 0 + + + Ambient + + + Ambient + + 1 + 2.00000000000000011e-01 + + + + + + BackCull + + + BackCull + + 3 + 0 + + + + + + BackgroundColor + + + BackgroundColor + + 2 + Color(255,255,255) + + + + + + CameraDistance + + + CameraDistance + + 1 + 3.00000000000000000e+00 + + + + + + CameraDistanceMinimum + + + CameraDistanceMinimum + + 1 + 1.00000000000000004e-10 + + + + + + CameraLookAt + + + CameraLookAt + + 5 + + 3 + 0 + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + + + + CameraRotation + + + CameraRotation + + 5 + + 4 + 0 + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 1.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + + + + Diffuse + + + Diffuse + + 1 + 1.00000000000000000e+00 + + + + + + DisplayList + + + DisplayList + + 3 + 0 + + + + + + Emission + + + Emission + + 1 + 1.00000000000000000e+00 + + + + + + FieldOfView + + + FieldOfView + + 0 + 20 + + + + + + FogColor + + + FogColor + + 2 + Color(0,0,1) + + + + + + FogEnd + + + FogEnd + + 1 + 7.09999999999999964e-01 + + + + + + FogOn + + + FogOn + + 3 + 0 + + + + + + FogStart + + + FogStart + + 1 + 0.00000000000000000e+00 + + + + + + HasNewGeometry + + + HasNewGeometry + + 3 + 0 + + + + + + HeadLightAzimuth + + + HeadLightAzimuth + + 0 + 180 + + + + + + HeadLightColor + + + HeadLightColor + + 2 + Color(0,0,0) + + + + + + HeadLightInclination + + + HeadLightInclination + + 0 + 90 + + + + + + HeadLightOn + + + HeadLightOn + + 3 + 1 + + + + + + IsExecuting + + + IsExecuting + + 3 + 0 + + + + + + Light1Azimuth + + + Light1Azimuth + + 0 + 180 + + + + + + Light1Color + + + Light1Color + + 2 + Color(0,0,0) + + + + + + Light1Inclination + + + Light1Inclination + + 0 + 90 + + + + + + Light1On + + + Light1On + + 3 + 0 + + + + + + Light2Azimuth + + + Light2Azimuth + + 0 + 180 + + + + + + Light2Color + + + Light2Color + + 2 + Color(0,0,0) + + + + + + Light2Inclination + + + Light2Inclination + + 0 + 90 + + + + + + Light2On + + + Light2On + + 3 + 0 + + + + + + Light3Azimuth + + + Light3Azimuth + + 0 + 180 + + + + + + Light3Color + + + Light3Color + + 2 + Color(0,0,0) + + + + + + Light3Inclination + + + Light3Inclination + + 0 + 90 + + + + + + Light3On + + + Light3On + + 3 + 0 + + + + + + Lighting + + + Lighting + + 3 + 1 + + + + + + ObjectsOnly + + + ObjectsOnly + + 3 + 1 + + + + + + PolygonOffset + + + PolygonOffset + + 1 + 0.00000000000000000e+00 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ScaleBarFontSize + + + ScaleBarFontSize + + 0 + 1 + + + + + + ScaleBarHeight + + + ScaleBarHeight + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarLength + + + ScaleBarLength + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarLineWidth + + + ScaleBarLineWidth + + 1 + 1.00000000000000000e+00 + + + + + + ScaleBarMultiplier + + + ScaleBarMultiplier + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarNumTicks + + + ScaleBarNumTicks + + 0 + 0 + + + + + + ScaleBarUnitValue + + + ScaleBarUnitValue + + 2 + mm + + + + + + Shine + + + Shine + + 1 + 1.00000000000000000e+00 + + + + + + ShowBBox + + + ShowBBox + + 3 + 0 + + + + + + ShowScaleBar + + + ShowScaleBar + + 3 + 0 + + + + + + ShowViewer + + + ShowViewer + + 3 + 0 + + + + + + Specular + + + Specular + + 1 + 4.00000000000000022e-01 + + + + + + Stereo + + + Stereo + + 3 + 0 + + + + + + StereoFusion + + + StereoFusion + + 1 + 4.00000000000000022e-01 + + + + + + TextOffset + + + TextOffset + + 1 + 0.00000000000000000e+00 + + + + + + UseBGColor + + + UseBGColor + + 3 + 1 + + + + + + UseClip + + + UseClip + + 3 + 1 + + + + + + + + + ViewScene:1 + + + SCIRun + Render + ViewScene + + + + 54 + 0 + + + Ambient + + + Ambient + + 1 + 2.00000000000000011e-01 + + + + + + BackCull + + + BackCull + + 3 + 0 + + + + + + BackgroundColor + + + BackgroundColor + + 2 + Color(255,255,255) + + + + + + CameraDistance + + + CameraDistance + + 1 + 3.00000000000000000e+00 + + + + + + CameraDistanceMinimum + + + CameraDistanceMinimum + + 1 + 1.00000000000000004e-10 + + + + + + CameraLookAt + + + CameraLookAt + + 5 + + 3 + 0 + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + + + + CameraRotation + + + CameraRotation + + 5 + + 4 + 0 + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 1.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + + + + Diffuse + + + Diffuse + + 1 + 1.00000000000000000e+00 + + + + + + DisplayList + + + DisplayList + + 3 + 0 + + + + + + Emission + + + Emission + + 1 + 1.00000000000000000e+00 + + + + + + FieldOfView + + + FieldOfView + + 0 + 20 + + + + + + FogColor + + + FogColor + + 2 + Color(0,0,1) + + + + + + FogEnd + + + FogEnd + + 1 + 7.09999999999999964e-01 + + + + + + FogOn + + + FogOn + + 3 + 0 + + + + + + FogStart + + + FogStart + + 1 + 0.00000000000000000e+00 + + + + + + HasNewGeometry + + + HasNewGeometry + + 3 + 1 + + + + + + HeadLightAzimuth + + + HeadLightAzimuth + + 0 + 180 + + + + + + HeadLightColor + + + HeadLightColor + + 2 + Color(0,0,0) + + + + + + HeadLightInclination + + + HeadLightInclination + + 0 + 90 + + + + + + HeadLightOn + + + HeadLightOn + + 3 + 1 + + + + + + IsExecuting + + + IsExecuting + + 3 + 0 + + + + + + Light1Azimuth + + + Light1Azimuth + + 0 + 180 + + + + + + Light1Color + + + Light1Color + + 2 + Color(0,0,0) + + + + + + Light1Inclination + + + Light1Inclination + + 0 + 90 + + + + + + Light1On + + + Light1On + + 3 + 0 + + + + + + Light2Azimuth + + + Light2Azimuth + + 0 + 180 + + + + + + Light2Color + + + Light2Color + + 2 + Color(0,0,0) + + + + + + Light2Inclination + + + Light2Inclination + + 0 + 90 + + + + + + Light2On + + + Light2On + + 3 + 0 + + + + + + Light3Azimuth + + + Light3Azimuth + + 0 + 180 + + + + + + Light3Color + + + Light3Color + + 2 + Color(0,0,0) + + + + + + Light3Inclination + + + Light3Inclination + + 0 + 90 + + + + + + Light3On + + + Light3On + + 3 + 0 + + + + + + Lighting + + + Lighting + + 3 + 1 + + + + + + ObjectsOnly + + + ObjectsOnly + + 3 + 1 + + + + + + PolygonOffset + + + PolygonOffset + + 1 + 0.00000000000000000e+00 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ScaleBarFontSize + + + ScaleBarFontSize + + 0 + 99 + + + + + + ScaleBarHeight + + + ScaleBarHeight + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarLength + + + ScaleBarLength + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarLineWidth + + + ScaleBarLineWidth + + 1 + 1.00000000000000000e+00 + + + + + + ScaleBarMultiplier + + + ScaleBarMultiplier + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarNumTicks + + + ScaleBarNumTicks + + 0 + 0 + + + + + + ScaleBarUnitValue + + + ScaleBarUnitValue + + 2 + mm + + + + + + Shine + + + Shine + + 1 + 1.00000000000000000e+00 + + + + + + ShowBBox + + + ShowBBox + + 3 + 0 + + + + + + ShowScaleBar + + + ShowScaleBar + + 3 + 0 + + + + + + ShowViewer + + + ShowViewer + + 3 + 0 + + + + + + Specular + + + Specular + + 1 + 4.00000000000000022e-01 + + + + + + Stereo + + + Stereo + + 3 + 0 + + + + + + StereoFusion + + + StereoFusion + + 1 + 4.00000000000000022e-01 + + + + + + TextOffset + + + TextOffset + + 1 + 0.00000000000000000e+00 + + + + + + UseBGColor + + + UseBGColor + + 3 + 1 + + + + + + UseClip + + + UseClip + + 3 + 1 + + + + + + + + + ViewScene:2 + + + SCIRun + Render + ViewScene + + + + 54 + 0 + + + Ambient + + + Ambient + + 1 + 2.00000000000000011e-01 + + + + + + BackCull + + + BackCull + + 3 + 0 + + + + + + BackgroundColor + + + BackgroundColor + + 2 + Color(0,0,0) + + + + + + CameraDistance + + + CameraDistance + + 1 + 3.00000000000000000e+00 + + + + + + CameraDistanceMinimum + + + CameraDistanceMinimum + + 1 + 1.00000000000000004e-10 + + + + + + CameraLookAt + + + CameraLookAt + + 5 + + 3 + 0 + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + + + + CameraRotation + + + CameraRotation + + 5 + + 4 + 0 + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + listElement + + 1 + 1.00000000000000000e+00 + + + + listElement + + 1 + 0.00000000000000000e+00 + + + + + + + + + Diffuse + + + Diffuse + + 1 + 1.00000000000000000e+00 + + + + + + DisplayList + + + DisplayList + + 3 + 0 + + + + + + Emission + + + Emission + + 1 + 1.00000000000000000e+00 + + + + + + FieldOfView + + + FieldOfView + + 0 + 20 + + + + + + FogColor + + + FogColor + + 2 + Color(0,0,1) + + + + + + FogEnd + + + FogEnd + + 1 + 7.09999999999999964e-01 + + + + + + FogOn + + + FogOn + + 3 + 0 + + + + + + FogStart + + + FogStart + + 1 + 0.00000000000000000e+00 + + + + + + HasNewGeometry + + + HasNewGeometry + + 3 + 0 + + + + + + HeadLightAzimuth + + + HeadLightAzimuth + + 0 + 180 + + + + + + HeadLightColor + + + HeadLightColor + + 2 + Color(0,0,0) + + + + + + HeadLightInclination + + + HeadLightInclination + + 0 + 90 + + + + + + HeadLightOn + + + HeadLightOn + + 3 + 1 + + + + + + IsExecuting + + + IsExecuting + + 3 + 0 + + + + + + Light1Azimuth + + + Light1Azimuth + + 0 + 180 + + + + + + Light1Color + + + Light1Color + + 2 + Color(0,0,0) + + + + + + Light1Inclination + + + Light1Inclination + + 0 + 90 + + + + + + Light1On + + + Light1On + + 3 + 0 + + + + + + Light2Azimuth + + + Light2Azimuth + + 0 + 180 + + + + + + Light2Color + + + Light2Color + + 2 + Color(0,0,0) + + + + + + Light2Inclination + + + Light2Inclination + + 0 + 90 + + + + + + Light2On + + + Light2On + + 3 + 0 + + + + + + Light3Azimuth + + + Light3Azimuth + + 0 + 180 + + + + + + Light3Color + + + Light3Color + + 2 + Color(0,0,0) + + + + + + Light3Inclination + + + Light3Inclination + + 0 + 90 + + + + + + Light3On + + + Light3On + + 3 + 0 + + + + + + Lighting + + + Lighting + + 3 + 1 + + + + + + ObjectsOnly + + + ObjectsOnly + + 3 + 1 + + + + + + PolygonOffset + + + PolygonOffset + + 1 + 0.00000000000000000e+00 + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + ScaleBarFontSize + + + ScaleBarFontSize + + 0 + 1 + + + + + + ScaleBarHeight + + + ScaleBarHeight + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarLength + + + ScaleBarLength + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarLineWidth + + + ScaleBarLineWidth + + 1 + 1.00000000000000000e+00 + + + + + + ScaleBarMultiplier + + + ScaleBarMultiplier + + 1 + 0.00000000000000000e+00 + + + + + + ScaleBarNumTicks + + + ScaleBarNumTicks + + 0 + 0 + + + + + + ScaleBarUnitValue + + + ScaleBarUnitValue + + 2 + mm + + + + + + Shine + + + Shine + + 1 + 1.00000000000000000e+00 + + + + + + ShowBBox + + + ShowBBox + + 3 + 0 + + + + + + ShowScaleBar + + + ShowScaleBar + + 3 + 0 + + + + + + ShowViewer + + + ShowViewer + + 3 + 0 + + + + + + Specular + + + Specular + + 1 + 4.00000000000000022e-01 + + + + + + Stereo + + + Stereo + + 3 + 0 + + + + + + StereoFusion + + + StereoFusion + + 1 + 4.00000000000000022e-01 + + + + + + TextOffset + + + TextOffset + + 1 + 0.00000000000000000e+00 + + + + + + UseBGColor + + + UseBGColor + + 3 + 1 + + + + + + UseClip + + + UseClip + + 3 + 1 + + + + + + + + + WriteMatrix:0 + + + SCIRun + DataIO + WriteMatrix + + + + 5 + 0 + + + FileTypeList + + + FileTypeList + + 2 + SCIRun Matrix Binary (*.mat);;SCIRun Matrix ASCII (*.mat);;ECGSimFile (*.*);;Matlab Matrix (*.mat);;SimpleTextFile (*.*) + + + + + + FileTypeName + + + FileTypeName + + 2 + SimpleTextFile + + + + + + Filename + + + Filename + + 2 + %SCIRUNDATADIR%/Data/tikhonov_inv/25feb97_sock_closed.fld.tmp_solution.txt + + + + + + GuiFileTypeName + + + GuiFileTypeName + + 2 + + + + + + + ProgrammableInputPortEnabled + + + ProgrammableInputPortEnabled + + 3 + 0 + + + + + + + + + + 136 + 0 + + BooleanCompare:0 + + OutputMatrix + 0 + + InterfaceWithPython:1 + + InputMatrix + 0 + + + + BuildBEMatrix:0 + + BEM_Forward_Matrix + 0 + + EvaluateLinearAlgebraBinary:0 + + LHS + 0 + + + + CalculateFieldData:0 + + OutputField + 0 + + ShowFieldGlyphs:0 + + PrimaryData + 0 + + + + CollectMatrices:0 + + CompositeMatrix + 0 + + BooleanCompare:0 + + PossibleOutput + 0 + + + + CollectMatrices:0 + + CompositeMatrix + 0 + + ReportMatrixInfo:1 + + InputMatrix + 0 + + + + ConvertMatrixToString:0 + + ResultString + 0 + + ReportStringInfo:1 + + Input + 0 + + + + ConvertScalarToMatrix:0 + + Output + 0 + + BooleanCompare:0 + + MatrixA + 0 + + + + ConvertScalarToMatrix:1 + + Output + 0 + + BooleanCompare:0 + + MatrixB + 0 + + + + CreateStandardColorMap:0 + + ColorMapObject + 0 + + RescaleColorMap:0 + + ColorMapObject + 0 + + + + CreateStandardColorMap:1 + + ColorMapObject + 0 + + RescaleColorMap:2 + + ColorMapObject + 0 + + + + CreateStandardColorMap:1 + + ColorMapObject + 0 + + RescaleColorMap:3 + + ColorMapObject + 0 + + + + CreateStandardColorMap:2 + + ColorMapObject + 0 + + RescaleColorMap:4 + + ColorMapObject + 0 + + + + EvaluateLinearAlgebraBinary:0 + + Result + 0 + + GetMatrixSlice:1 + + InputMatrix + 0 + + + + EvaluateLinearAlgebraBinary:0 + + Result + 0 + + ResizeMatrix:0 + + InputMatrix + 0 + + + + EvaluateLinearAlgebraBinary:0 + + Result + 0 + + WriteMatrix:0 + + MatrixToWrite + 0 + + + + EvaluateLinearAlgebraBinary:1 + + Result + 0 + + EvaluateLinearAlgebraBinary:0 + + RHS + 0 + + + + EvaluateLinearAlgebraBinary:1 + + Result + 0 + + EvaluateLinearAlgebraUnary:2 + + InputMatrix + 0 + + + + EvaluateLinearAlgebraBinary:1 + + Result + 0 + + GetMatrixSlice:0 + + InputMatrix + 0 + + + + EvaluateLinearAlgebraBinary:2 + + Result + 0 + + SetFieldData:7 + + InputMatrix + 0 + + + + EvaluateLinearAlgebraUnary:0 + + Result + 0 + + ReportMatrixSliceMeasure:1 + + InputMatrix + 0 + + + + EvaluateLinearAlgebraUnary:1 + + Result + 0 + + ReportMatrixSliceMeasure:0 + + InputMatrix + 0 + + + + EvaluateLinearAlgebraUnary:2 + + Result + 0 + + LinePlotter:0 + + DependentVariables + 0 + + + + EvaluateLinearAlgebraUnary:3 + + Result + 0 + + ReportMatrixSliceMeasure:3 + + InputMatrix + 0 + + + + GetFieldNodes:0 + + MatrixNodes + 0 + + EvaluateLinearAlgebraBinary:2 + + LHS + 0 + + + + GetFieldNodes:1 + + MatrixNodes + 0 + + EvaluateLinearAlgebraBinary:2 + + RHS + 0 + + + + GetMatrixSlice:0 + + OutputMatrix + 0 + + SetFieldData:0 + + InputMatrix + 0 + + + + GetMatrixSlice:0 + + Selected_Index + 0 + + GetMatrixSlice:1 + + Current_Index + 0 + + + + GetMatrixSlice:0 + + Selected_Index + 0 + + GetMatrixSlice:5 + + Current_Index + 0 + + + + GetMatrixSlice:0 + + Selected_Index + 0 + + GetMatrixSlice:6 + + Current_Index + 0 + + + + GetMatrixSlice:0 + + Selected_Index + 0 + + GetMatrixSlice:7 + + Current_Index + 0 + + + + GetMatrixSlice:1 + + OutputMatrix + 0 + + SetFieldData:1 + + InputMatrix + 0 + + + + GetMatrixSlice:2 + + OutputMatrix + 0 + + InterfaceWithPython:2 + + InputMatrix + 1 + + + + GetMatrixSlice:3 + + OutputMatrix + 0 + + ResizeMatrix:1 + + InputMatrix + 0 + + + + GetMatrixSlice:4 + + OutputMatrix + 0 + + ResizeMatrix:2 + + InputMatrix + 0 + + + + GetMatrixSlice:5 + + OutputMatrix + 0 + + SetFieldData:2 + + InputMatrix + 0 + + + + GetMatrixSlice:6 + + OutputMatrix + 0 + + SetFieldData:4 + + InputMatrix + 0 + + + + GetMatrixSlice:7 + + OutputMatrix + 0 + + SetFieldData:6 + + InputMatrix + 0 + + + + ImportMatricesFromMatlab:0 + + Matrix1 + 0 + + InterfaceWithPython:2 + + InputMatrix + 3 + + + + ImportMatricesFromMatlab:0 + + Matrix2 + 0 + + InterfaceWithPython:2 + + InputMatrix + 4 + + + + ImportMatricesFromMatlab:0 + + Matrix3 + 0 + + InterfaceWithPython:2 + + InputMatrix + 5 + + + + InterfaceWithPython:0 + + PythonMatrix1 + 0 + + GetMatrixSlice:2 + + InputMatrix + 0 + + + + InterfaceWithPython:0 + + PythonMatrix1 + 0 + + InterfaceWithPython:1 + + InputMatrix + 2 + + + + InterfaceWithPython:0 + + PythonMatrix1 + 0 + + ReportMatrixInfo:0 + + InputMatrix + 0 + + + + InterfaceWithPython:0 + + PythonMatrix2 + 0 + + InterfaceWithPython:1 + + InputMatrix + 1 + + + + InterfaceWithPython:0 + + PythonMatrix3 + 0 + + InterfaceWithPython:1 + + InputMatrix + 3 + + + + InterfaceWithPython:1 + + PythonMatrix1 + 0 + + GetMatrixSlice:3 + + InputMatrix + 0 + + + + InterfaceWithPython:1 + + PythonMatrix1 + 0 + + ReportMatrixInfo:2 + + InputMatrix + 0 + + + + InterfaceWithPython:1 + + PythonMatrix1 + 0 + + ReportMatrixSliceMeasure:2 + + InputMatrix + 0 + + + + InterfaceWithPython:1 + + PythonMatrix2 + 0 + + GetMatrixSlice:4 + + InputMatrix + 0 + + + + InterfaceWithPython:1 + + PythonMatrix2 + 0 + + ReportMatrixInfo:3 + + InputMatrix + 0 + + + + InterfaceWithPython:1 + + PythonString1 + 0 + + ReportStringInfo:0 + + Input + 0 + + + + InterfaceWithPython:1 + + PythonString2 + 0 + + ReportStringInfo:2 + + Input + 0 + + + + InterfaceWithPython:1 + + PythonString2 + 0 + + ShowString:0 + + String + 0 + + + + InterfaceWithPython:1 + + PythonString3 + 0 + + ReportStringInfo:3 + + Input + 0 + + + + InterfaceWithPython:2 + + PythonField1 + 0 + + SetFieldData:5 + + InputField + 0 + + + + InterfaceWithPython:2 + + PythonMatrix1 + 0 + + ConvertMatrixToString:0 + + InputMatrix + 0 + + + + InterfaceWithPython:2 + + PythonMatrix1 + 0 + + TransformMeshWithTransform:0 + + TransformMatrix + 0 + + + + InterfaceWithPython:2 + + PythonMatrix2 + 0 + + SetFieldData:5 + + InputMatrix + 0 + + + + PrintStringIntoString:0 + + Output + 0 + + ReadMatrix:1 + + Filename + 0 + + + + PrintStringIntoString:1 + + Output + 0 + + ImportMatricesFromMatlab:0 + + Filename + 0 + + + + ReadField:0 + + Field + 0 + + GetFieldNodes:1 + + InputField + 0 + + + + ReadField:0 + + Field + 0 + + SetFieldData:7 + + InputField + 0 + + + + ReadField:0 + + Field + 0 + + ShowField:4 + + Field + 0 + + + + ReadField:0 + + Field + 0 + + TransformMeshWithTransform:0 + + InputField + 0 + + + + ReadField:0 + + FileLoaded + 0 + + SplitFileName:0 + + Full_Filename + 0 + + + + ReadField:1 + + Field + 0 + + BuildBEMatrix:0 + + Surface + 1 + + + + ReadField:1 + + Field + 0 + + InterfaceWithPython:0 + + InputField + 0 + + + + ReadField:1 + + Field + 0 + + SetFieldData:1 + + InputField + 0 + + + + ReadField:1 + + Field + 0 + + SetFieldData:2 + + InputField + 0 + + + + ReadField:1 + + Field + 0 + + SetFieldData:4 + + InputField + 0 + + + + ReadField:1 + + Field + 0 + + SetFieldData:6 + + InputField + 0 + + + + ReadField:1 + + Field + 0 + + SetFieldData:8 + + InputField + 0 + + + + ReadField:1 + + Field + 0 + + SetFieldData:9 + + InputField + 0 + + + + ReadField:1 + + Field + 0 + + ShowField:5 + + Field + 0 + + + + ReadMatrix:0 + + Matrix + 0 + + EvaluateLinearAlgebraBinary:1 + + RHS + 0 + + + + ReadMatrix:1 + + Matrix + 0 + + EvaluateLinearAlgebraBinary:1 + + LHS + 0 + + + + ReportMatrixInfo:0 + + NumCols + 0 + + ConvertScalarToMatrix:0 + + Input + 0 + + + + ReportMatrixInfo:1 + + NumCols + 0 + + ConvertScalarToMatrix:1 + + Input + 0 + + + + ReportMatrixSliceMeasure:0 + + OutputMatrix + 0 + + LinePlotter:1 + + DependentVariables + 1 + + + + ReportMatrixSliceMeasure:1 + + OutputMatrix + 0 + + LinePlotter:2 + + DependentVariables + 0 + + + + ReportMatrixSliceMeasure:2 + + OutputMatrix + 0 + + ResizeMatrix:3 + + InputMatrix + 0 + + + + ReportMatrixSliceMeasure:3 + + OutputMatrix + 0 + + LinePlotter:3 + + DependentVariables + 1 + + + + ReportMatrixSliceMeasure:4 + + OutputMatrix + 0 + + SetFieldData:8 + + InputMatrix + 0 + + + + ReportMatrixSliceMeasure:5 + + OutputMatrix + 0 + + SetFieldData:9 + + InputMatrix + 0 + + + + RescaleColorMap:0 + + ColorMapOutput + 0 + + RescaleColorMap:1 + + ColorMapObject + 0 + + + + RescaleColorMap:0 + + ColorMapOutput + 0 + + ShowField:0 + + ColorMapObject + 0 + + + + RescaleColorMap:1 + + ColorMapOutput + 0 + + ShowField:1 + + ColorMapObject + 0 + + + + RescaleColorMap:2 + + ColorMapOutput + 0 + + ShowColorMap:0 + + ColorMapObject + 0 + + + + RescaleColorMap:2 + + ColorMapOutput + 0 + + ShowField:2 + + ColorMapObject + 0 + + + + RescaleColorMap:2 + + ColorMapOutput + 0 + + ShowField:3 + + ColorMapObject + 0 + + + + RescaleColorMap:2 + + ColorMapOutput + 0 + + ShowField:7 + + ColorMapObject + 0 + + + + RescaleColorMap:2 + + ColorMapOutput + 0 + + ShowField:8 + + ColorMapObject + 0 + + + + RescaleColorMap:3 + + ColorMapOutput + 0 + + ShowField:6 + + ColorMapObject + 0 + + + + RescaleColorMap:4 + + ColorMapOutput + 0 + + ShowFieldGlyphs:1 + + PrimaryColorMap + 0 + + + + ResizeMatrix:0 + + OutputMatrix + 0 + + CollectMatrices:0 + + SubMatrix + 0 + + + + ResizeMatrix:1 + + OutputMatrix + 0 + + EvaluateLinearAlgebraUnary:1 + + InputMatrix + 0 + + + + ResizeMatrix:1 + + OutputMatrix + 0 + + GetMatrixSlice:5 + + InputMatrix + 0 + + + + ResizeMatrix:1 + + OutputMatrix + 0 + + ReportMatrixSliceMeasure:5 + + InputMatrix + 0 + + + + ResizeMatrix:2 + + OutputMatrix + 0 + + EvaluateLinearAlgebraUnary:0 + + InputMatrix + 0 + + + + ResizeMatrix:2 + + OutputMatrix + 0 + + GetMatrixSlice:6 + + InputMatrix + 0 + + + + ResizeMatrix:2 + + OutputMatrix + 0 + + ReportMatrixSliceMeasure:4 + + InputMatrix + 0 + + + + ResizeMatrix:3 + + OutputMatrix + 0 + + EvaluateLinearAlgebraUnary:3 + + InputMatrix + 0 + + + + ResizeMatrix:3 + + OutputMatrix + 0 + + GetMatrixSlice:7 + + InputMatrix + 0 + + + + SetFieldData:0 + + OutputField + 0 + + RescaleColorMap:0 + + Field + 0 + + + + SetFieldData:0 + + OutputField + 0 + + ShowField:0 + + Field + 0 + + + + SetFieldData:1 + + OutputField + 0 + + RescaleColorMap:1 + + Field + 0 + + + + SetFieldData:1 + + OutputField + 0 + + ShowField:1 + + Field + 0 + + + + SetFieldData:2 + + OutputField + 0 + + RescaleColorMap:2 + + Field + 0 + + + + SetFieldData:2 + + OutputField + 0 + + ShowField:2 + + Field + 0 + + + + SetFieldData:4 + + OutputField + 0 + + ShowField:3 + + Field + 0 + + + + SetFieldData:5 + + OutputField + 0 + + CalculateFieldData:0 + + InputFields + 0 + + + + SetFieldData:6 + + OutputField + 0 + + RescaleColorMap:3 + + Field + 0 + + + + SetFieldData:6 + + OutputField + 0 + + ShowField:6 + + Field + 0 + + + + SetFieldData:7 + + OutputField + 0 + + RescaleColorMap:4 + + Field + 0 + + + + SetFieldData:7 + + OutputField + 0 + + ShowFieldGlyphs:1 + + PrimaryData + 0 + + + + SetFieldData:8 + + OutputField + 0 + + ShowField:8 + + Field + 0 + + + + SetFieldData:9 + + OutputField + 0 + + ShowField:7 + + Field + 0 + + + + ShowColorMap:0 + + GeometryOutput + 0 + + ViewScene:1 + + GeneralGeom + 3 + + + + ShowField:0 + + SceneGraph + 0 + + ViewScene:0 + + GeneralGeom + 0 + + + + ShowField:1 + + SceneGraph + 0 + + ViewScene:0 + + GeneralGeom + 1 + + + + ShowField:2 + + SceneGraph + 0 + + ViewScene:1 + + GeneralGeom + 0 + + + + ShowField:3 + + SceneGraph + 0 + + ViewScene:1 + + GeneralGeom + 1 + + + + ShowField:4 + + SceneGraph + 0 + + ViewScene:0 + + GeneralGeom + 3 + + + + ShowField:4 + + SceneGraph + 0 + + ViewScene:2 + + GeneralGeom + 0 + + + + ShowField:5 + + SceneGraph + 0 + + ViewScene:2 + + GeneralGeom + 1 + + + + ShowField:6 + + SceneGraph + 0 + + ViewScene:1 + + GeneralGeom + 4 + + + + ShowField:7 + + SceneGraph + 0 + + ViewScene:1 + + GeneralGeom + 5 + + + + ShowField:8 + + SceneGraph + 0 + + ViewScene:1 + + GeneralGeom + 6 + + + + ShowFieldGlyphs:0 + + SceneGraph + 0 + + ViewScene:0 + + GeneralGeom + 2 + + + + ShowFieldGlyphs:1 + + SceneGraph + 0 + + ViewScene:0 + + GeneralGeom + 4 + + + + ShowString:0 + + RenderedString + 0 + + ViewScene:1 + + GeneralGeom + 2 + + + + SplitFileName:0 + + Pathname + 0 + + PrintStringIntoString:0 + + Input + 0 + + + + SplitFileName:0 + + Pathname + 0 + + PrintStringIntoString:1 + + Input + 0 + + + + TransformMeshWithTransform:0 + + Transformed_Field + 0 + + BuildBEMatrix:0 + + Surface + 0 + + + + TransformMeshWithTransform:0 + + Transformed_Field + 0 + + GetFieldNodes:0 + + InputField + 0 + + + + TransformMeshWithTransform:0 + + Transformed_Field + 0 + + SetFieldData:0 + + InputField + 0 + + + + + + 92 + 0 + + BooleanCompare:0 + + -3.04300000000000000e+03 + -6.53000000000000000e+02 + + + + BuildBEMatrix:0 + + -3.04300000000000000e+03 + -1.26400000000000000e+03 + + + + CalculateFieldData:0 + + -2.44900000000000000e+03 + -1.44800000000000000e+03 + + + + CollectMatrices:0 + + -2.95500000000000000e+03 + -9.36000000000000000e+02 + + + + ConvertMatrixToString:0 + + -2.61700000000000000e+03 + -1.34900000000000000e+03 + + + + ConvertScalarToMatrix:0 + + -3.15500000000000000e+03 + -1.11300000000000000e+03 + + + + ConvertScalarToMatrix:1 + + -3.05900000000000000e+03 + -7.51000000000000000e+02 + + + + CreateStandardColorMap:0 + + -3.09500000000000000e+03 + -1.51700000000000000e+03 + + + + CreateStandardColorMap:1 + + -3.03400000000000000e+03 + -1.41000000000000000e+02 + + + + CreateStandardColorMap:2 + + -2.20900000000000000e+03 + -1.11600000000000000e+03 + + + + EvaluateLinearAlgebraBinary:0 + + -3.04800000000000000e+03 + -1.17800000000000000e+03 + + + + EvaluateLinearAlgebraBinary:1 + + -3.27600000000000000e+03 + -1.78100000000000000e+03 + + + + EvaluateLinearAlgebraBinary:2 + + -2.48900000000000000e+03 + -1.19600000000000000e+03 + + + + EvaluateLinearAlgebraUnary:0 + + -2.51500000000000000e+03 + -1.11000000000000000e+02 + + + + EvaluateLinearAlgebraUnary:1 + + -3.64500000000000000e+03 + -9.70000000000000000e+01 + + + + EvaluateLinearAlgebraUnary:2 + + -3.33900000000000000e+03 + -1.59500000000000000e+03 + + + + EvaluateLinearAlgebraUnary:3 + + -3.60300000000000000e+03 + 2.14000000000000000e+02 + + + + GetFieldNodes:0 + + -2.68800000000000000e+03 + -1.28100000000000000e+03 + + + + GetFieldNodes:1 + + -2.54100000000000000e+03 + -1.28300000000000000e+03 + + + + GetMatrixSlice:0 + + -2.88700000000000000e+03 + -1.57600000000000000e+03 + + + + GetMatrixSlice:1 + + -2.62700000000000000e+03 + -1.14100000000000000e+03 + + + + GetMatrixSlice:2 + + -2.68700000000000000e+03 + -1.80500000000000000e+03 + + + + GetMatrixSlice:3 + + -3.17700000000000000e+03 + -4.09000000000000000e+02 + + + + GetMatrixSlice:4 + + -2.87100000000000000e+03 + -3.49000000000000000e+02 + + + + GetMatrixSlice:5 + + -3.16400000000000000e+03 + -1.14000000000000000e+02 + + + + GetMatrixSlice:6 + + -2.83000000000000000e+03 + -1.24000000000000000e+02 + + + + GetMatrixSlice:7 + + -3.37300000000000000e+03 + -7.10000000000000000e+01 + + + + ImportMatricesFromMatlab:0 + + -2.36100000000000000e+03 + -1.80200000000000000e+03 + + + + InterfaceWithPython:0 + + -2.76600000000000000e+03 + -1.91600000000000000e+03 + + + + InterfaceWithPython:1 + + -3.03400000000000000e+03 + -5.14000000000000000e+02 + + + + InterfaceWithPython:2 + + -2.54800000000000000e+03 + -1.64900000000000000e+03 + + + + LinePlotter:0 + + -3.33000000000000000e+03 + -1.47400000000000000e+03 + + + + LinePlotter:1 + + -3.63400000000000000e+03 + 1.31000000000000000e+02 + + + + LinePlotter:2 + + -2.49700000000000000e+03 + 1.65000000000000000e+02 + + + + LinePlotter:3 + + -3.59200000000000000e+03 + 4.42000000000000000e+02 + + + + PrintStringIntoString:0 + + -3.03900000000000000e+03 + -1.95300000000000000e+03 + + + + PrintStringIntoString:1 + + -2.33000000000000000e+03 + -1.91600000000000000e+03 + + + + ReadField:0 + + -3.06300000000000000e+03 + -2.11200000000000000e+03 + + + + ReadField:1 + + -2.91500000000000000e+03 + -2.15800000000000000e+03 + + + + ReadMatrix:0 + + -3.22900000000000000e+03 + -2.10000000000000000e+03 + + + + ReadMatrix:1 + + -3.03700000000000000e+03 + -1.88500000000000000e+03 + + + + ReportMatrixInfo:0 + + -3.24000000000000000e+03 + -1.24500000000000000e+03 + + + + ReportMatrixInfo:1 + + -3.08400000000000000e+03 + -8.34000000000000000e+02 + + + + ReportMatrixInfo:2 + + -3.02700000000000000e+03 + -3.36000000000000000e+02 + + + + ReportMatrixInfo:3 + + -2.64300000000000000e+03 + -3.75000000000000000e+02 + + + + ReportMatrixSliceMeasure:0 + + -3.65100000000000000e+03 + 3.00000000000000000e+00 + + + + ReportMatrixSliceMeasure:1 + + -2.55300000000000000e+03 + -7.00000000000000000e+00 + + + + ReportMatrixSliceMeasure:2 + + -3.40100000000000000e+03 + -3.80000000000000000e+02 + + + + ReportMatrixSliceMeasure:3 + + -3.60900000000000000e+03 + 3.14000000000000000e+02 + + + + ReportMatrixSliceMeasure:4 + + -2.72700000000000000e+03 + -2.20000000000000000e+01 + + + + ReportMatrixSliceMeasure:5 + + -3.06800000000000000e+03 + -3.90000000000000000e+01 + + + + ReportStringInfo:0 + + -2.68600000000000000e+03 + -1.45000000000000000e+02 + + + + ReportStringInfo:1 + + -2.41000000000000000e+03 + -1.20700000000000000e+03 + + + + ReportStringInfo:2 + + -2.73500000000000000e+03 + -2.95000000000000000e+02 + + + + ReportStringInfo:3 + + -2.62300000000000000e+03 + -2.37000000000000000e+02 + + + + RescaleColorMap:0 + + -2.79400000000000000e+03 + -9.86000000000000000e+02 + + + + RescaleColorMap:1 + + -2.55300000000000000e+03 + -9.14000000000000000e+02 + + + + RescaleColorMap:2 + + -2.96400000000000000e+03 + 1.50000000000000000e+02 + + + + RescaleColorMap:3 + + -3.31200000000000000e+03 + 1.90000000000000000e+02 + + + + RescaleColorMap:4 + + -2.39900000000000000e+03 + -9.52000000000000000e+02 + + + + ResizeMatrix:0 + + -2.93700000000000000e+03 + -1.05200000000000000e+03 + + + + ResizeMatrix:1 + + -3.18300000000000000e+03 + -2.36000000000000000e+02 + + + + ResizeMatrix:2 + + -2.85800000000000000e+03 + -2.21000000000000000e+02 + + + + ResizeMatrix:3 + + -3.46000000000000000e+03 + -2.67000000000000000e+02 + + + + SetFieldData:0 + + -2.80200000000000000e+03 + -1.14400000000000000e+03 + + + + SetFieldData:1 + + -2.60800000000000000e+03 + -1.00700000000000000e+03 + + + + SetFieldData:2 + + -3.21500000000000000e+03 + 7.40000000000000000e+01 + + + + SetFieldData:4 + + -2.80500000000000000e+03 + 8.70000000000000000e+01 + + + + SetFieldData:5 + + -2.50300000000000000e+03 + -1.54700000000000000e+03 + + + + SetFieldData:6 + + -3.38500000000000000e+03 + 8.00000000000000000e+01 + + + + SetFieldData:7 + + -2.45900000000000000e+03 + -1.09000000000000000e+03 + + + + SetFieldData:8 + + -2.64800000000000000e+03 + 8.60000000000000000e+01 + + + + SetFieldData:9 + + -3.08100000000000000e+03 + 1.13000000000000000e+02 + + + + ShowColorMap:0 + + -3.02700000000000000e+03 + 3.35000000000000000e+02 + + + + ShowField:0 + + -2.82000000000000000e+03 + -8.95000000000000000e+02 + + + + ShowField:1 + + -2.66300000000000000e+03 + -8.50000000000000000e+02 + + + + ShowField:2 + + -3.19500000000000000e+03 + 3.35000000000000000e+02 + + + + ShowField:3 + + -2.85400000000000000e+03 + 3.22000000000000000e+02 + + + + ShowField:4 + + -3.17000000000000000e+03 + -1.72300000000000000e+03 + + + + ShowField:5 + + -2.98800000000000000e+03 + -1.72100000000000000e+03 + + + + ShowField:6 + + -3.35700000000000000e+03 + 2.82000000000000000e+02 + + + + ShowField:7 + + -3.10700000000000000e+03 + 2.53000000000000000e+02 + + + + ShowField:8 + + -2.66600000000000000e+03 + 2.46000000000000000e+02 + + + + ShowFieldGlyphs:0 + + -2.44000000000000000e+03 + -1.34100000000000000e+03 + + + + ShowFieldGlyphs:1 + + -2.41300000000000000e+03 + -8.40000000000000000e+02 + + + + ShowString:0 + + -3.00800000000000000e+03 + -2.46000000000000000e+02 + + + + SplitFileName:0 + + -3.03900000000000000e+03 + -2.02500000000000000e+03 + + + + TransformMeshWithTransform:0 + + -2.92400000000000000e+03 + -1.39200000000000000e+03 + + + + ViewScene:0 + + -2.76100000000000000e+03 + -7.23000000000000000e+02 + + + + ViewScene:1 + + -3.15500000000000000e+03 + 4.70000000000000000e+02 + + + + ViewScene:2 + + -3.08300000000000000e+03 + -1.60500000000000000e+03 + + + + WriteMatrix:0 + + -3.14000000000000000e+03 + -1.02800000000000000e+03 + + + + + 20 + 0 + + GetMatrixSlice:2 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">iterate weights</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">run play without </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">anything executed</span></p></body></html> + iterate weights +run play without +anything executed + 0 + 13 + + + + InterfaceWithPython:0 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text';">compute </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text';">WAFP</span></p></body></html> + compute +WAFP + 0 + 13 + + + + ReadField:0 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">Heart Geom</span></p></body></html> + Heart Geom + 3 + 13 + + + + ReadField:1 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">Torso Geom</span></p></body></html> + Torso Geom + 3 + 13 + + + + ReadMatrix:0 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">Heart Potentials</span></p></body></html> + Heart Potentials + 3 + 13 + + + + ResizeMatrix:0 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">change to match </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">size of matrix</span></p></body></html> + change to match +size of matrix + 3 + 13 + + + + ResizeMatrix:1 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">change to match </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">size of matrix</span></p></body></html> + change to match +size of matrix + 3 + 13 + + + + ResizeMatrix:2 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">change to match </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">size of matrix</span></p></body></html> + change to match +size of matrix + 3 + 13 + + + + ResizeMatrix:3 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">change to match </span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'.SF NS Text'; font-size:16pt;">size of matrix</span></p></body></html> + change to match +size of matrix + 3 + 13 + + + + ShowField:0 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ffffff;">ID: 0</span></p></body></html> + ID: 0 + 0 + 13 + + + + ShowField:1 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ffffff;">ID: 1</span></p></body></html> + ID: 1 + 0 + 13 + + + + ShowField:2 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ffffff;">ID: 2</span></p></body></html> + ID: 2 + 0 + 13 + + + + ShowField:3 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ffffff;">ID: 3</span></p></body></html> + ID: 3 + 0 + 13 + + + + ShowField:4 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ffffff;">ID: 4</span></p></body></html> + ID: 4 + 0 + 13 + + + + ShowField:5 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ffffff;">ID: 5</span></p></body></html> + ID: 5 + 0 + 13 + + + + ShowField:6 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ffffff;">ID: 6</span></p></body></html> + ID: 6 + 0 + 13 + + + + ShowField:7 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ffffff;">ID: 7</span></p></body></html> + ID: 7 + 0 + 13 + + + + ShowField:8 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ffffff;">ID: 8</span></p></body></html> + ID: 8 + 0 + 13 + + + + ShowFieldGlyphs:0 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ffffff;">ID: 0</span></p></body></html> + ID: 0 + 0 + 13 + + + + ShowFieldGlyphs:1 + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'.AppleSystemUIFont'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#ffffff;">ID: 1</span></p></body></html> + ID: 1 + 0 + 13 + + + + + 0 + 0 + + + 92 + 0 + + BooleanCompare:0 + -1 + + + BuildBEMatrix:0 + -1 + + + CalculateFieldData:0 + -1 + + + CollectMatrices:0 + -1 + + + ConvertMatrixToString:0 + -1 + + + ConvertScalarToMatrix:0 + -1 + + + ConvertScalarToMatrix:1 + -1 + + + CreateStandardColorMap:0 + -1 + + + CreateStandardColorMap:1 + -1 + + + CreateStandardColorMap:2 + -1 + + + EvaluateLinearAlgebraBinary:0 + -1 + + + EvaluateLinearAlgebraBinary:1 + -1 + + + EvaluateLinearAlgebraBinary:2 + -1 + + + EvaluateLinearAlgebraUnary:0 + -1 + + + EvaluateLinearAlgebraUnary:1 + -1 + + + EvaluateLinearAlgebraUnary:2 + -1 + + + EvaluateLinearAlgebraUnary:3 + -1 + + + GetFieldNodes:0 + -1 + + + GetFieldNodes:1 + -1 + + + GetMatrixSlice:0 + -1 + + + GetMatrixSlice:1 + -1 + + + GetMatrixSlice:2 + -1 + + + GetMatrixSlice:3 + -1 + + + GetMatrixSlice:4 + -1 + + + GetMatrixSlice:5 + -1 + + + GetMatrixSlice:6 + -1 + + + GetMatrixSlice:7 + -1 + + + ImportMatricesFromMatlab:0 + -1 + + + InterfaceWithPython:0 + -1 + + + InterfaceWithPython:1 + -1 + + + InterfaceWithPython:2 + -1 + + + LinePlotter:0 + -1 + + + LinePlotter:1 + -1 + + + LinePlotter:2 + -1 + + + LinePlotter:3 + -1 + + + PrintStringIntoString:0 + -1 + + + PrintStringIntoString:1 + -1 + + + ReadField:0 + -1 + + + ReadField:1 + -1 + + + ReadMatrix:0 + -1 + + + ReadMatrix:1 + -1 + + + ReportMatrixInfo:0 + -1 + + + ReportMatrixInfo:1 + -1 + + + ReportMatrixInfo:2 + -1 + + + ReportMatrixInfo:3 + -1 + + + ReportMatrixSliceMeasure:0 + -1 + + + ReportMatrixSliceMeasure:1 + -1 + + + ReportMatrixSliceMeasure:2 + -1 + + + ReportMatrixSliceMeasure:3 + -1 + + + ReportMatrixSliceMeasure:4 + -1 + + + ReportMatrixSliceMeasure:5 + -1 + + + ReportStringInfo:0 + -1 + + + ReportStringInfo:1 + -1 + + + ReportStringInfo:2 + -1 + + + ReportStringInfo:3 + -1 + + + RescaleColorMap:0 + -1 + + + RescaleColorMap:1 + -1 + + + RescaleColorMap:2 + -1 + + + RescaleColorMap:3 + -1 + + + RescaleColorMap:4 + -1 + + + ResizeMatrix:0 + -1 + + + ResizeMatrix:1 + -1 + + + ResizeMatrix:2 + -1 + + + ResizeMatrix:3 + -1 + + + SetFieldData:0 + -1 + + + SetFieldData:1 + -1 + + + SetFieldData:2 + -1 + + + SetFieldData:4 + -1 + + + SetFieldData:5 + -1 + + + SetFieldData:6 + -1 + + + SetFieldData:7 + -1 + + + SetFieldData:8 + -1 + + + SetFieldData:9 + -1 + + + ShowColorMap:0 + -1 + + + ShowField:0 + -1 + + + ShowField:1 + -1 + + + ShowField:2 + -1 + + + ShowField:3 + -1 + + + ShowField:4 + -1 + + + ShowField:5 + -1 + + + ShowField:6 + -1 + + + ShowField:7 + -1 + + + ShowField:8 + -1 + + + ShowFieldGlyphs:0 + -1 + + + ShowFieldGlyphs:1 + -1 + + + ShowString:0 + -1 + + + SplitFileName:0 + -1 + + + TransformMeshWithTransform:0 + -1 + + + ViewScene:0 + -1 + + + ViewScene:1 + -1 + + + ViewScene:2 + -1 + + + WriteMatrix:0 + -1 + + + + 3 + 0 + ViewScene:0 + WriteMatrix:0 + ViewScene:2 + + + 8 + 0 + WriteMatrix:0--EvaluateLinearAlgebraBinary:0 + ViewScene:0--ShowField:0 + ViewScene:0--ShowField:1 + ViewScene:0--ShowField:4 + ViewScene:2--ShowField:4 + ViewScene:2--ShowField:5 + ViewScene:0--ShowFieldGlyphs:1 + ViewScene:0--ShowFieldGlyphs:0 + + + 0 + 0 + + 0 + + 0 + 0 + + + + diff --git a/PythonLibrary/MFS_inverse/mfs_inverse.py b/PythonLibrary/MFS_inverse/mfs_inverse.py index 7707463..fe2591f 100644 --- a/PythonLibrary/MFS_inverse/mfs_inverse.py +++ b/PythonLibrary/MFS_inverse/mfs_inverse.py @@ -18,8 +18,7 @@ # usage: # -# mfs_inverse(heart,tank,sock, tank_pots, electrodes, lambda, scale_out, scale_in) - +# mfs_inverse(heart,tank,sock, tank_pots, electnum, scale_factor, scale_method, lambda_method, lambda, viz_regularization,gamma) The program requires the following input: @@ -32,9 +31,6 @@ 3) sock - list of (x,y,z) triples that represent the locations of the sock electrodes. This can be the points file associated with the heart mesh - - a file of ints that maps the jacket (measurement) - electrodes to the tank surface node numbers. 4) tank_pots - potentials recorded at the jacket locations. Bad leads can be marked with 'nan' and these potentials and @@ -43,11 +39,14 @@ 5) electnums - list of of ints that maps the jacket (measurement) electrodes to the tank surface node numbers. - 6) scale_out - distance to move points of the tank surface + 6) scale_factor - distance of scaling based on the method - 7) scale_in - distance to move points of the heart surface + 7) scale_method - method of scaling the points. Options are "normals", "scale", and "rbf". + "normals" : Projects points along the normals calculated via mesh tessellation. + "scale" : Scales the points using the center of the volume. + "rbf" : Projects the points along the normals calculated via RBF (not implemented). - 8) lmbd_method - method of picking the regularization paramter. lmbd_method input must be: manual, l_curve, zc, creso, gcv, or rgcv + 8) lambda_method - method of picking the regularization paramter. lmbd_method input must be: manual, l_curve, zc, creso, gcv, or rgcv 9) lmbda - the value of the regularisation parameter. if lmbd_method is manual, lmbd must be a single value, otherwise it should be a list of possible values, @@ -70,7 +69,7 @@ from sys import argv from numpy import sqrt,pi,array,cross,zeros,einsum,arccos,sum,append,dot,diag,transpose,ones,reshape,isnan,linspace,where,diff,sign,argmin,argmax,mean,max,min from numpy.linalg import norm,svd -import scipy +#import scipy #import pyqtgraph #from math import isnan @@ -111,6 +110,9 @@ def mfs_inverse(heart,tank,sock,tank_pots,electnums,scale_factor,scale_method,lm # read jacket potentials bspm = array(tank_pots) sz_bspm = bspm.shape + + print(bspm.shape) + print(elecs.shape) # clean up nan's from bspm new_bspm,new_elecs = cleanbspm(bspm,elecs) diff --git a/PythonLibrary/activation_inverse/actgaussnewton.py b/PythonLibrary/activation_inverse/actgaussnewton.py index f87fe1f..a52ec93 100644 --- a/PythonLibrary/activation_inverse/actgaussnewton.py +++ b/PythonLibrary/activation_inverse/actgaussnewton.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -import scipy as sp +#import scipy as sp import numpy as np import numpy.linalg as la #import scipy.io as sio @@ -39,6 +39,7 @@ def ActGaussNewton(A, Y, L, tauinit, Lambda, w, minstep): print('size Y = ',Y.shape) # sio.savemat('/Users/jess/Downloads/Y.mat', {'Y_tmp': Y}) +# sio.savemat('/Users/jess/Downloads/A.mat', {'A_tmp': A}) dims_tau = np.shape(tau) step = 2*np.ones(dims_tau) @@ -69,18 +70,18 @@ def ActGaussNewton(A, Y, L, tauinit, Lambda, w, minstep): # calculate the step direction G = np.dot(J.T,J) - #print('trying to save') + print('trying to save') #sio.savemat('/Users/jess/Downloads/G.mat', {'G_tmp': G}) #sio.savemat('/Users/jess/Downloads/r.mat', {'r_tmp': r}) #print('size r = ',r.shape) #print('norm r = ',la.norm(r)) - #print('max r = ',np.max(r)) + print('max r = ',np.max(r)) size_G = np.shape(G) - #print('size G = ',size_G) - #print('G= ',G) - #print('norm G = ',la.norm(G)) - #print('max G = ',np.max(G)) + print('size G = ',size_G) + print('G= ',G) + print('norm G = ',la.norm(G)) + print('max G = ',np.max(G)) print('starting condition test') s = la.svd(G, full_matrices = 0,compute_uv=0) @@ -158,6 +159,7 @@ def ActGaussNewton(A, Y, L, tauinit, Lambda, w, minstep): ############################################################################### def agnresidual(A,Y,L,tau,Lambda,w): + print('starting agnresidual function') dim_A = np.shape(A) dim_Y = np.shape(Y) @@ -167,22 +169,29 @@ def agnresidual(A,Y,L,tau,Lambda,w): u = np.linspace(1,T,T) H = np.zeros((N,T)) - + print('set up matrices') for k in range(0,N): H[k,:] = polyactrow(u-tau[k],w[k]) - #sio.savemat('/Users/jess/Downloads/H.mat', {'H_tmp': H}) +# sio.savemat('/Users/jess/Downloads/H.mat', {'H_tmp': H}) -#print("size Y = ",np.shape(Y)) -# print("size A = ",np.shape(A)) -# print("size H = ",np.shape(H)) + print("size Y = ",np.shape(Y)) + print("size A = ",np.shape(A)) + print("size H = ",np.shape(H)) - E = Y-np.dot(A,H) + temp = np.dot(A,H) + E = Y- temp + print('size E = ',E.shape) R = np.sqrt(Lambda)*np.dot(L,H) + print('size R = ',R.shape) dims_E = np.shape(E) dims_R = np.shape(R) vec_E = np.reshape(E.T,(dims_E[0]*dims_E[1])).T + print('size vec_E = ',vec_E.shape) vec_R = np.reshape(R.T,(dims_R[0]*dims_R[1])).T + print('size vec_R = ',vec_R.shape) + + print('concatinating vectors') # sio.savemat('/Users/jess/Downloads/E.mat', {'E_tmp': E}) # sio.savemat('/Users/jess/Downloads/R.mat', {'R_tmp': R}) @@ -195,6 +204,7 @@ def agnresidual(A,Y,L,tau,Lambda,w): ############################################################################### def agnjacobian(A,Y,L,tau,Lambda,w): + print('starting agnjacobian') dim_A = np.shape(A) dim_Y = np.shape(Y) M = dim_A[0] @@ -308,4 +318,4 @@ def dpolyactrow(u,w): dh[(0 better. - -candidate_mesh_size = int(2e2) - -print("Generating parameter mesh...") -z = wafp.legendre_wafp(lambdas, M=candidate_mesh_size) -z = wafp.legendre_wafp_enrichment(z, lambdas, M-N) -print(z) -# The samples are the array z, each row is a d-dimensional sample on the -# hypercube [-1,1]^d. The particular way these points are generated is -# random, so you'll get a different set of z each time this is fun, but -# the "quality" of the grid has relatively low variance from run to run. -# This takes a while, but these points may be stored for future use. - - - -######## Step 2: run "expensive" model - -u = np.zeros([Nx, M]) - -print("Evaluating model on mesh...") -print((z.shape)) -for ind,zval in enumerate(z): - u[:,ind] = expensive_model(zval) - -print(u) - -sens_output_file=os.path.join(curr_dir,'../../Data/tikhonov_inv/sensitivity_solutions.txt') -sens_tot_file=os.path.join(curr_dir,'../../Data/tikhonov_inv/total_sensitivity.txt') -sens_global_file=os.path.join(curr_dir,'../../Data/tikhonov_inv/global_sensitivity.txt') -gt_output_file=os.path.join(curr_dir,'../../Data/tikhonov_inv/ground_truth_solutions.txt') -pce_output_file=os.path.join(curr_dir,'../../Data/tikhonov_inv/pce_solutions.txt') -np.savetxt(sens_output_file,u,delimiter = ' ') - -# Each column of u is a model run for a fixed parameter value - -######## Step 3: compute PCE coefficients -print("Assembling PCE coefficients...") -ab = jacobi_recurrence(lambdas.max()+1, alpha=0., beta=0., probability=True) -V = opolynd_eval(z, lambdas, ab) -weights = np.sqrt(float(N)/float(M)) / np.sqrt(np.sum(V**2,axis=1)) - -# The PCE coefficients are computed as a weighted discrete least-squares -# estimator with the weights above. -coeffs = np.linalg.lstsq( (V.T*weights).T, (u*weights).T)[0].T - -# Each row of coeffs contains PCE coefficients for a single x gridpoint. -# Each column of coeffs contains a particular PCE coefficient for all -# values of x. - -######## Step 4: whatever postprocessing you want -print("Processing PCE coefficients...") -# Compute total sensitivities -total_sensitivities = sensitivity.pce_total_sensitivity(coeffs.T, lambdas, list(range(d))) -np.savetxt(sens_tot_file,total_sensitivities,delimiter = ' ') - -# Compute global sensitivities -# Compute main-effect and main-interaction sensitivities -Js = [[j] for j in range(d)] -[Js.append(comb) for comb in itertools.combinations(list(range(d)), 2)] - -global_sensitivities = sensitivity.pce_global_sensitivity(coeffs.T, lambdas, Js) -np.savetxt(sens_global_file,global_sensitivities,delimiter = ' ') - -# Compare surrogate discrepancy at validation points -M_validation = 100 -z_validation = np.random.uniform(0, 1, [100, d]) - -u_truth = np.zeros([Nx, M_validation]) -for ind, zval in enumerate(z_validation): - u_truth[:,ind] = expensive_model(zval) - -np.savetxt(gt_output_file,u_truth,delimiter = ' ') - -u_pce = np.zeros([Nx, M_validation]) -V = opolynd_eval(z_validation, lambdas, ab) -u_pce = np.dot(V, coeffs.T).T - -np.savetxt(pce_output_file,u_pce,delimiter = ' ') - -# Compute l2- and max-errors for each grid point: -l2_error = np.sqrt(np.sum((u_truth - u_pce)**2, axis=1))/np.sqrt(N) -linf_error = np.max(np.abs(u_truth - u_pce), axis=1) - -print("L2 error on validation mesh: {0:1.3e}\nMaximum error on validation mesh: {1:1.3e}".format(np.linalg.norm(l2_error)/np.sqrt(Nx), np.max(linf_error.flatten()))) - -run_visualization(sens_output_file,sens_tot_file,sens_global_file,gt_output_file) - -fig = plt.figure() -ax = fig.add_subplot(111, projection='3d') -ax.scatter(z[:,0], z[:,1], z[:,2], 'r.') -plt.show() - - diff --git a/PythonLibrary/uncertainty/fidist.py b/PythonLibrary/uncertainty/fidist.py deleted file mode 100644 index 12326f8..0000000 --- a/PythonLibrary/uncertainty/fidist.py +++ /dev/null @@ -1,321 +0,0 @@ -# Fast routines for induced distributions - -import os, subprocess -import numpy as np -from scipy.io import loadmat - -import opoly1d, recurrence - -# Matlab binary location: -matlab_binary = '/Applications/MATLAB_R2015b.app/bin/matlab' -#matlab_binary = '/Applications/MATLAB_R2016a.app/bin/matlab' - -# Abs path for data directory -cwd = os.path.dirname(os.path.abspath(__file__)) -data_directory = os.path.join(cwd, '../data/') - -def loadfile_jacobi(filename, alpha, beta, n): - - filename = os.path.join(data_directory, filename) - try: - data = loadmat(filename)['data'].flatten() - except: - data = np.zeros(0) - - if data.size < n+1: - # Run matlab to generate/populate file - - print("Calling matlab....") - cwd = os.path.dirname(os.path.abspath(__file__)) - - command = "cd(" + "'" + cwd + "'); cd ..; " - - command += "data = load_fjacobi({:d}, {:.4f}, {:.4f}); ".format(n, alpha, beta) - command += "data = fidistinv_jacobi_setup({:d}, {:.4f}, {:.4f}, data); ".format(n, alpha, beta) - command += "save_fjacobi(data, {:.4f}, {:.4f}); ".format(alpha, beta) - - command += "exit" - #print command - - subprocess.call([matlab_binary, "-nodisplay", "-r", command]) - print("...finished") - - data = loadmat(filename)['data'].flatten() - - return data - -def loadfile_hfreud(filename, alpha, rho, n): - - filename = os.path.join(data_directory, filename) - try: - data = loadmat(filename)['data'].flatten() - except: - data = np.zeros(0) - - if data.size < n+1: - # Run matlab to generate/populate file - - print("Calling matlab....") - cwd = os.path.dirname(os.path.abspath(__file__)) - - command = "cd(" + "'" + cwd + "'); cd ..; " - - command += "data = load_fhfreud({:d}, {:.4f}, {:.4f}); ".format(n, alpha, rho) - command += "data = fidistinv_hfreud_setup({:d}, {:.4f}, {:.4f}, data); ".format(n, alpha, rho) - command += "save_fhfreud(data, {:.4f}, {:.4f}); ".format(alpha, rho) - - command += "exit" - print(command) - - subprocess.call([matlab_binary, "-nodisplay", "-r", command]) - print("...finished") - - data = loadmat(filename)['data'].flatten() - - return data - - -def fidistinv_jacobi(u, n, alpha, beta): - - assert alpha > -1. and beta > -1. - filename = 'jacobi_{:3.4f}_{:3.4f}.mat'.format(alpha,beta) - data = loadfile_jacobi(filename, alpha, beta, np.max(n)) - - return fidistinv_driver(u, n, data) - -def fidistinv_hfreud(u, n, alpha, rho): - - filename = 'half_freud_{:3.4f}_{:3.4f}.mat'.format(alpha,rho) - data = loadfile_hfreud(filename, alpha, rho, np.max(n)) - - return fidistinv_driver(u, n, data) - -def fidistinv_freud(u, n, alpha, rho): - - x = np.zeros(u.shape) - if n.size == 1: - if n[0] % 2 == 0: - x = np.sqrt( fidistinv_hfreud( np.abs(2.*u-1.), n/2, alpha/2., (rho-1.)/2. ) ) - else: - x = np.sqrt( fidistinv_hfreud( np.abs(2.*u-1.), (n-1)/2, alpha/2., (rho+1.)/2. ) ) - - else: - evenflags = n % 2 == 0 - oddflags = np.invert(evenflags) - - x[evenflags] = np.sqrt( fidistinv_hfreud( np.abs(2.*u[evenflags]-1.), n[evenflags]/2, \ - alpha/2., (rho-1.)/2. ) ) - x[oddflags] = np.sqrt( fidistinv_hfreud( np.abs(2.*u[oddflags]-1.), (n[oddflags]-1)/2, \ - alpha/2., (rho+1.)/2. ) ) - - # Reflect - flags = u < 0.5 - x[flags] = -x[flags] - return x - -def fidistinv_driver(u, n, data): - # Main driver for computing approximate (fast) induced - # distributions. - - # Proximity to edge of interval at which we peg u to interval - # endpoints - inttol = 1e-8 - - assert np.all(u>=0.) and np.all(u<=1.) - assert np.all(n>=0) - - x = np.zeros(u.size) - if u.size == 0: - return x - - # Sort n (degree) values - if n.size > 1: - assert u.size == n.size - inds = np.argsort(n) - indsep = np.argwhere( np.diff(n[inds]) > 0 ) + 1 - else: - inds = np.arange(0, u.size, dtype=int) - indsep = np.zeros(0) - - # Create partition of indices in u - indsep = np.insert(indsep, 0, 0) - indsep = np.append(indsep, u.size) - - ushape = u.shape - u = u.flatten() - - # Loop over each value of n (degree) - for (i1,i2) in zip( indsep[:-1], indsep[1:] ): - #nn = n[inds[i1]] - #uu = u[inds[i1:i2]] - - x[inds[i1:i2]] = fidistinv_driver_helper(u[inds[i1:i2]], data[n[inds[i1]]]) - - x.reshape(ushape) - return x - -def fidistinv_driver_helper(u, data): - - tol = 1e-12 # machine eps guarding - - - # Construct Vandermonde-like matrix - M = data.shape[0] - 6 - ab = recurrence.jacobi_recurrence(M+1, alpha=-1/2., beta=-1/2.) - - edges = np.concatenate([[-np.inf], data[0,:], [data[1,-1]], [np.inf]]) - bins = np.digitize(u, edges) - B = edges.size-1; - - x = np.zeros(u.size) - x[bins==1] = data[2,0] - x[bins==B] = data[3,-1] - - for qb in range(2, B): - mask = (bins==qb) - if not(np.any(mask)): - continue - - q = qb -2 - vgrid = (u[mask] - data[0,q])/(data[1,q] - data[0,q])*2. - 1. - - V = opoly1d.opoly1d_eval(vgrid, list(range(M)), ab) - temp = np.dot(V, data[6:,q]) - temp /= ( (1. + vgrid)**(data[4,q]) * (1. - vgrid)**(data[5,q]) ) - - if data[4,q] != 0.: - # Set LHS to be 0 - flags = np.abs(u[mask] - data[0,q]) < tol - temp[flags] = 0. - temp *= (data[3,q] - data[2,q]) - temp += data[2,q] - else: - # Set RHS to be 0 - flags = np.abs(u[mask] - data[1,q]) < tol - temp[flags] = 0. - temp *= (data[3,q] - data[2,q]) - temp += data[3,q] - - x[mask] = temp - - return x - -def idist_mixture_sampling_tensorial(M, d, k, disttype, **kwargs): - # Returns M samples in d dimensions from a mixture of induced - # distributions, where the mixture is associated to a degree-k - # tensor-product distribution. The input disttype should be - # "jacobi", "hfreud", or "freud". The keyword arguments required are - # (alpha,beta) for jacobi, (alpha,rho) for hfreud, and (alpha,rho) - # for freud. - - assert k >= 0 # non-negative degree - assert d >= 1 # positive dimension - - # Tensorial is easy: all coordinates have the same distribution. - u = np.random.rand(M*d) - n = np.floor((k+1)*np.random.rand(M*d)).astype(int) - n[n==(k+1)] = k - - if disttype == "jacobi": - x = fidistinv_jacobi(u, n, **kwargs) - elif disttype == "hfreud": - x = fidistinv_hfreud(u, n, **kwargs) - elif disttype == "freud": - x = fidistinv_freud(u, n, **kwargs) - else: - assert False - - if d > 1: - return x.reshape((M,d)) - else: - return x - -if __name__ == "__main__": - - import pdb - from matplotlib import pyplot as plt - import opolynd - - alpha = 0. - beta = 0. - N = 11 - u = np.linspace(0, 1, N) - u[-1] -= 1e-6 - n = np.arange(N, dtype=int) - - # Testing loading jacobi data and evaluating fidistinv_jacobi - filename = 'jacobi_{:3.4f}_{:3.4f}.mat'.format(alpha, beta) - data = loadfile_jacobi(filename, alpha, beta, np.max(n)) - x = fidistinv_jacobi(u, n, alpha, beta) - # Answer from matlab: - xexact = [-1.000000000000000, -0.928317766722557, -0.887228979688486 , -0.517492607529973, -0.210828858592612, 0.000000000000000, 0.377790521226704, 0.587803521443663, 0.842636353867568, 0.936846338676717, 1.000000000000000] - print("Jacobi error: {:.4e}".format(np.linalg.norm(x - xexact))) - - # Testing creating other jacobi data with matlab - alpha = np.random.rand(1)[0]*11 - 1. - beta = np.random.rand(1)[0]*11 - 1. - filename = 'jacobi_{:3.4f}_{:3.4f}.mat'.format(alpha, beta) - data = loadfile_jacobi(filename, alpha, beta, 2) - - # Testing half-line Freud evaluations - alpha = 1. - rho = 0. - filename = 'half_freud_{:3.4f}_{:3.4f}.mat'.format(alpha, rho) - data = loadfile_hfreud(filename, alpha, rho, np.max(n)) - x = fidistinv_hfreud(u, n, alpha, rho) - # Answer from matlab: - xexact = [ 0, 0.119552024763544, 1.230335315134000, 3.334709190393895, 6.400179446826883, 10.2875349395399, 18.458183625522008 , 23.995991765631384 , 29.564086690424123 , 35.880003534475335, 63.196084473861298] - print("Laguerre error: {:.4e}".format(np.linalg.norm(x - xexact))) - - # Testing full-line Freud evaluations - alpha = 2. - rho = 0. - x = fidistinv_freud(u, n, alpha, rho) - # Answer from matlab: - xexact = [ -5.042890705179727, -1.523421749424712 , -1.668998069614480 , -1.728340302085805 , -0.993630459736906, 0, 1.004265363591303, 2.206804803887973, 3.417302103995109, 4.003844362463767, 6.154799836463579] - - print("Hermite error: {:.4e}".format(np.linalg.norm(x - xexact))) - - # Testing random sampling from induced mixture (tensorial) - M = 10000 # Number of samples - d = 1 # Dimension - k = 22 # Degree - alpha = 0. # Jacobi parameter - beta = 0. # Jacobi parameter - x = idist_mixture_sampling_tensorial(M, d, k, "jacobi", alpha=alpha, beta=beta) - - plt.plot(np.sort(x), np.arange(x.size,dtype=float)/x.size) - plt.title('CDF for Legendre, k={:d}'.format(k)) - - k = 22 - alpha = 2. # Freud (Hermite) parameter - rho = 0. # Freud (Hermite) parameter - x = idist_mixture_sampling_tensorial(M, d, k, "freud", alpha=alpha, rho=rho) - plt.figure() - plt.plot(np.sort(x), np.arange(x.size,dtype=float)/x.size) - plt.title('CDF for Hermite, k={:d}'.format(k)) - - x = idist_mixture_sampling_tensorial(M, 5, k, "freud", alpha=alpha, rho=rho) - - # Testing that sampling like this is well-conditioned - M = 2000 - k = 30 - d = 2 - disttype = "freud" - alpha = 2. - rho = 0. - ab = recurrence.hermite_recurrence(k+1,rho=rho) - - # Sampler - x = idist_mixture_sampling_tensorial(M, d, k, disttype, alpha=alpha, rho=rho) - - # Generate tensor-product multi-indices - l = np.arange(k+1) - lx,ly = np.meshgrid(l,l) - L = np.concatenate((lx.reshape(lx.size,1), ly.reshape(ly.size,1)), axis=1) - # Vandermonde-like matrix - V = opolynd.opolynd_eval(x, L, ab) - # Christoffel preconditioner - V = (V.T* np.sqrt( (k+1.)**2. / np.sum(V**2, axis=1))).T - - plt.show() diff --git a/PythonLibrary/uncertainty/indexing.py b/PythonLibrary/uncertainty/indexing.py deleted file mode 100644 index 26aa448..0000000 --- a/PythonLibrary/uncertainty/indexing.py +++ /dev/null @@ -1,157 +0,0 @@ -import numpy as np -from scipy.misc import comb - -def hyperbolic_cross_indices(d, k): - """ - Returns indices associated with a d-dimensional (isotropic) - hyperbolic cross index space up to degree k. - """ - - from itertools import combinations - from scipy.misc import comb - - assert k >= 0 - assert d >= 1 - - if d == 1: - lambdas = list(range(k+1)) - return lambdas - - lambdas = np.zeros([1, d], dtype=int) - - # First add all indices with sparsity 1 - for q in range(d): - temp = np.zeros([k-1, d], dtype=int) - temp[:,q] = np.arange(1, k, dtype=int) - lambdas = np.vstack([lambdas, temp]) - - # Now determine the maximum 0-norm the entries can be. I.e., for - # which values of p is 2^p <= k+1? - pmax = int(np.floor(np.log(k+1)/np.log(2))) - - # For each sparsity p, populate with all possible indices of that - # sparsity - for p in range(2, pmax+1): - # Determine all possible locations where nonzero entries can occur - combs = combinations(list(range(d)), p) - combs = np.array( [row for row in combs], dtype=int) - - # Now we have 2^p < k+1, i.e., an index with nonzero entries - # np.ones([p 1]) is ok. - # Keep incrementing these entries until product exceeds k+1 - possible_indices = np.ones([1, p]); - ind = 0; - - while ind < possible_indices.shape[0]: - # Add any possibilities that are children of - # possible_indices[ind,:] - - lambd = possible_indices[ind,:] - for q in range(p): - temp = lambd.copy() - temp[q] += 1 - if np.prod(temp+1) <= k+1: - possible_indices = np.vstack([possible_indices, temp]) - - ind += 1 - - possible_indices = np.vstack({tuple(row) for row in possible_indices}) - arow = lambdas.shape[0] - lambdas = np.vstack([lambdas, np.zeros([combs.shape[0]*possible_indices.shape[0], d], dtype=int)]) - - # Now for each combination, we put in possible_indices - for c in range(combs.shape[0]): - i1 = arow - i2 = arow + possible_indices.shape[0] - - lambdas[i1:i2,combs[c,:]] = possible_indices; - - arow = i2 - - return lambdas - - -def total_degree_indices(d, k): - # Returns multi-indices associated with d-variate polynomials of - # degree less than or equal to k. Each row is a multi-index, ordered - # in total-degree-graded reverse lexicographic ordering. - - assert d > 0 - assert k >= 0 - - if d == 1: - return np.arange(k+1, dtype=int).reshape([k+1, 1]) - - # total degree indices up to degree k in d-1 dimensions: - lambdasd1 = total_degree_indices(d-1, k) - # lambdasd1 should already be sorted by total degree, which is - # assumed below - - lambdas = np.zeros([np.round(int(comb(d+k, d))), d], dtype=int) - - i0 = 0 - for qk in range(0, k+1): - - n = int(np.round(comb(d-1+(k-qk), d-1))) - i1 = i0 + n - - lambdas[i0:i1,0] = qk - lambdas[i0:i1,1:] = lambdasd1[:n,:] - i0 = i1 - - # My version of numpy < 1.12, so I don't have np.flip :( - #degrees = np.cumsum(np.flip(lambdas,axis=1), axis=1) - degrees = np.cumsum(np.fliplr(lambdas), axis=1) - - ind = np.lexsort(degrees.transpose()) - lambdas = lambdas[ind,:] - - return lambdas - -def degree_encompassing_N(d, N): - # Returns the smallest degree k such that nchoosek(d+k,d) >= N - - k = 0 - while np.round(comb(d+k,d)) < N: - k += 1 - - return k - -def total_degree_indices_N(d, N): - # Returns the first N ( > 0) d-dimensional multi-indices when ordered by - # total degree graded reverse lexicographic ordering. - - assert N > 0 - - return total_degree_indices(d, degree_encompassing_N(d,N))[:N,:] - -if __name__ == "__main__": - - from matplotlib import pyplot as plt - - d = 1 - k = 5 - - L1 = total_degree_indices(d, k) - - d = 2 - k = 7 - - L2 = total_degree_indices(d, k) - - d = 4 - k = 6 - - L4 = total_degree_indices(d,k) - - N = L4.shape[0] - 10 - L42 = total_degree_indices_N(d,N) - - err = np.linalg.norm( L42 - L4[:N,:]) - - ############## Hyperbolic cross - d, k = 2, 33 - lambdas = hyperbolic_cross_indices(d, k) - - plt.plot(lambdas[:,0], lambdas[:,1], 'r.') - plt.show() diff --git a/PythonLibrary/uncertainty/legendre_induced.py b/PythonLibrary/uncertainty/legendre_induced.py deleted file mode 100644 index fcbda92..0000000 --- a/PythonLibrary/uncertainty/legendre_induced.py +++ /dev/null @@ -1,188 +0,0 @@ -# Computes quantities assocated with sampling from an induced -# distribution mixture for the Legendre polynomials - -import numpy as np - -def induced_distribution_quadrule(n): - """ - Returns a Gaussian quadrature rule that would be used by - induced_distribution. - """ - - from recurrence import jacobi_recurrence - from quadrature import gauss_quadrature - - n = np.atleast_1d(n) - N = n.max() - ab = jacobi_recurrence(N+2, alpha=0., beta=0., probability=True) - return gauss_quadrature(ab, N+1) - -def induced_distribution(x, n, quadrule=None): - """ - Computes the induced distribution function, which is - - F_n(x) = 1/2 * \int_{-1}^x p_n^2(s) ds, - - where p_n is the degree-n orthonormal Legendre polynomial. With this - normalization, the endpoint values are F_n(-1) = 0, and F_n(1) = 1 - for all n. - - This function is vectorized in both x and n, and supports the - calling syntaxes - - induced_distribution(array, array) - induced_distribution(array, scalar) - - In the first syntax, both arrays must have the same number of - elements. - - If specified, the optional input quadrule is a list, [x,w], - containing a quadrature rule that is assumed accurate for all - polynomials up to degree 2*np.max(n.flatten()). If not given, this - quadrature rule is generated as an appropriate-sized Gaussian - quadrature rule. - """ - - from recurrence import jacobi_recurrence - from opoly1d import opoly1d_eval - - x = np.atleast_1d(x) - n = np.atleast_1d(n) - if np.size(x) != np.size(n): - if n.size != 1: - raise ValueError("If n is the not the same size as x, then n must be a scalar.") - - assert (n >= 0).all(), "Degrees n must be non-negative" - - N = n.max() - - if quadrule is not None: - xg, wg = quadrule[0], quadrule[1] - else: - xg, wg = induced_distribution_quadrule(n) - - # Output array - u = np.zeros(x.shape) - - ab = jacobi_recurrence(N+2, alpha=0., beta=0., probability=True) - - # Unfortunately, I don't see an efficient way to avoid a for loop here - if n.size > 1: - for ind,xv in np.ndenumerate(np.asarray(x)): - if xv <= -1: - u[ind] = 0. - elif xv >= 1: - u[ind] = 1. - else: - vg = (xg+1.)/2.*(xv+1) - 1. - u[ind] = (xv+1.)/2*np.dot((opoly1d_eval(vg, n[ind], ab)**2).T, wg) - else: - for ind,xv in np.ndenumerate(np.asarray(x)): - if xv <= -1: - u[ind] = 0. - elif xv >= 1: - u[ind] = 1. - else: - vg = (xg+1.)/2.*(xv+1) - 1. - u[ind] = (xv+1.)/2*np.dot((opoly1d_eval(vg, n, ab)**2).T, wg) - - return u - -def induced_distribution_inverse(u, n): - """ - Computes the inverse of the induced distribution function. Any - elements of u that are less than 0 get mapped to -1, and elements - bigger than 1 get mapped to 1. (This is essentially a silent error - correction.) - - Supports the same vectorization syntax as induced_distribution. - """ - - from scipy.optimize import bisect - optoptions = {'xtol':1e-10, 'rtol':1e-10} - - u = np.atleast_1d(u) - n = np.atleast_1d(n) - - x = np.zeros(u.shape) - - qrule = induced_distribution_quadrule(n) - - if n.size > 1: - for ind,uv in np.ndenumerate(u): - if uv <= 0: - x[ind] = -1. - elif uv >= 1: - x[ind] = 1. - else: - f = lambda xx: induced_distribution(xx, n[ind], qrule) - uv - x[ind] = bisect(f, -1., 1., **optoptions) - else: - for ind,uv in np.ndenumerate(u): - if uv <= 0: - x[ind] = -1. - elif uv >= 1: - x[ind] = 1. - else: - f = lambda xx: induced_distribution(xx, n, qrule) - uv - x[ind] = bisect(f, -1., 1., **optoptions) - - return x - -def induced_distribution_mixture_sampling(lambdas, M): - """ - Returns M d-variate samples from the order-lambdas induced - distribution. Each row of lambdas is a d-dimensional multi-index. - """ - - if lambdas.ndim == 1: - lambdas = np.reshape(lambdas, [lambdas.size, 1]) - - d = lambdas.shape[1] - u = np.random.uniform(0., 1., [M,d]) - - # Randomly sample M multi-indices - lambdas_sampled = lambdas[np.random.randint(0,lambdas.shape[0],M),:] - - return induced_distribution_inverse(u, lambdas_sampled) - - -if __name__ == "__main__": - - from matplotlib import pyplot as plt - - import pdb - from recurrence import jacobi_recurrence - from opoly1d import opoly1d_eval - import indexing - - n = 3 - x = np.linspace(-1., 1., 1e2) - - u = induced_distribution(x, n) - - qrule = induced_distribution_quadrule(n) - u2 = induced_distribution(x, n, quadrule=qrule) - uerr = np.linalg.norm(u-u2) - - x2 = induced_distribution_inverse(u, n) - xerr = np.linalg.norm(x-x2) - - # Now do multiple n's - N = 8 - ns = np.zeros(1000, dtype=int) - ns = np.around(8*np.random.uniform(0, 1, 1000)).astype(int) - xs = np.random.uniform(-1, 1, 1000) - us = induced_distribution(xs, ns) - xs2 = induced_distribution_inverse(us, ns) - xserr = np.linalg.norm(xs-xs2) - - plt.plot(x, u, 'r', linewidth=3) - plt.xlabel(r'$x$') - - plt.ylabel(r'$u = F_n(x)$') - plt.show() - - d, k = 2, 5 - lambdas = indexing.total_degree_indices(d, k) - x = induced_distribution_mixture_sampling(lambdas, 1e3) diff --git a/PythonLibrary/uncertainty/opoly1d.py b/PythonLibrary/uncertainty/opoly1d.py deleted file mode 100644 index efe6c62..0000000 --- a/PythonLibrary/uncertainty/opoly1d.py +++ /dev/null @@ -1,145 +0,0 @@ -import numpy as np -from scipy import special as sp - -def opoly1d_eval(x, n, ab, jac=0): - # Evaluates univariate orthonormal polynomials given their - # three-term recurrence coefficients ab. - # - # Evaluates the jac'th derivative. (Default = 0) - # - # Returns a numel(x) x numel(n) x numel(jac) array. - - n = np.asarray(n) - if n.size < 1 or x.size < 1: - return np.zeros(0) - - nmax = np.max(n) - assert nmax < ab.shape[0] - assert np.min(n) > -1 - assert jac >= 0 - - p = np.zeros( x.shape + (nmax+1,) ) - xf = x.flatten() - - p[:,0] = 1/ab[0,1] - - if nmax > 0: - p[:,1] = 1/ab[1,1] * ( (xf - ab[0,0])*p[:,0] ) - - for j in range(2, nmax+1): - p[:,j] = 1/ab[j,1] * ( (xf - ab[j-1,0])*p[:,j-1] - ab[j-1,1]*p[:,j-2] ) - - p = p[:,n.flatten()] - - if type(jac) == int: - if jac == 0: - return p - else: - jac = [jac] - - preturn = np.zeros([p.shape[0], p.shape[1], len(jac)]) - for (qi,qval) in enumerate(jac): - if qval == 0: - preturn[:,:,qi] = p - - for qd in range(1, max(jac)+1): - pd = np.zeros(p.shape) - - for qn in range(qd,nmax+1): - if qn == qd: - # The following is an over/underflow-resistant way to - # compute ( qd! * kappa_{qd} ), where qd is the - # derivative order and kappa_{qd} is the leading-order - # coefficient of the degree-qd orthogonal polynomial. - # The explicit formula for the lading coefficient of the - # degree-qd orthonormal polynomial is prod(1/b[j]) for - # j=0...qd. - pd[:,qn] = np.exp( sp.gammaln(qd+1) - np.sum( np.log( ab[:(qd+1),1] ) ) ) - else: - pd[:,qn] = 1/ab[qn,1] * ( ( xf - ab[qn-1,0] ) * pd[:,qn-1] - ab[qn-1,1] * pd[:,qn-2] ) - for (qi,qval) in enumerate(jac): - if qval == 0: - preturn[:,:,qi] = pd - - p = pd - - return preturn.flatten() - -def christoffel_function(x, k, ab): - # Computes the normalized (inverse) Christoffel function lambda, defined as - # - # lambda**2 = k / sum(p**2, axi=1), - # - # where p is a matrix containing evaluations of an orthonormal - # polynomial family up to degree k-1, defined by the recurrence - # coefficients ab. - - assert k > 0 - - p = opoly1d_eval(x, list(range(k)), ab) - return np.sqrt(float(k) / np.sum(p**2, axis=1)) - -def qpoly1d_eval(x, n, ab, jac=0): - # Evalutes Christoffel-function normalized polynomials. These are - # given by - # - # q_k(x) = p_k(x) / sqrt( sum_{j=0}^{n-1} p_j^2 ), k = 0, ..., n-1 - # - # The output is a x.size x n array - - assert n > 0 - - q = np.zeros((x.size, n)) - q[:,0] = 1. - qt = np.zeros(x.size) - - if n > 1: - qt = 1/ab[1,1] * (x - ab[0,0]) * q[:,0] - q[:,1] = qt / np.sqrt(1 + qt**2) - - for j in range(1, n-1): - qt = 1/ab[j+1,1] * ( (x - ab[j,0])*q[:,j] - ab[j,1] * q[:,j-1] / np.sqrt(1 + qt**2) ) - q[:,j+1] = qt / np.sqrt(1 + qt**2) - - if type(jac) == int: - if jac == 0: - return q - else: - jac = [jac] - - assert False - qreturn = np.zeros([q.shape[0], q.shape[1], len(jac)]) - for (qi,qval) in enumerate(jac): - if qval == 0: - qreturn[:,:,qi] = q - - for qd in range(1, max(jac)+1): - asdf - - return qreturn - -if __name__ == "__main__": - - from matplotlib import pyplot as plt - from recurrence import jacobi_recurrence - - alpha = 0. - beta = np.pi - nmax = 35 - probability_measure = True - - ab = jacobi_recurrence(nmax+1,alpha=alpha,beta=beta,probability=probability_measure) - x = np.linspace(-1, 1, 300) - - p = opoly1d_eval(x, np.arange(nmax), ab) - plt.plot(x, p[:,:10]) - plt.title('Polynomials') - - plt.figure() - q = qpoly1d_eval(x, nmax, ab) - plt.plot(x, q[:,:10]) - plt.title('Q polynomials') - - err = np.linalg.norm( q - p / np.sqrt( np.cumsum( p**2, axis=1 ) ) ) - - plt.show() diff --git a/PythonLibrary/uncertainty/opolynd.py b/PythonLibrary/uncertainty/opolynd.py deleted file mode 100644 index dc08337..0000000 --- a/PythonLibrary/uncertainty/opolynd.py +++ /dev/null @@ -1,54 +0,0 @@ -import numpy as np -import opoly1d - -def opolynd_eval(x, lambdas, ab): - # Evaluates tensorial orthonormal polynomials associated with the - # univariate recurrence coefficients ab. - - try: - M, d = x.shape - except Exception: - d = x.size - M = 1 - x = np.reshape(x, (M, d)) - - N, d2 = lambdas.shape - - assert d==d2, "Dimension 1 of x and lambdas must be equal" - - p = np.ones([M, N]) - - for qd in range(d): - p = p * opoly1d.opoly1d_eval(x[:,qd], lambdas[:,qd], ab) - - return p - -if __name__ == "__main__": - - import matplotlib.pyplot as plt - from matplotlib import cm - from mpl_toolkits.mplot3d import Axes3D - import opoly1d, indexing - - d = 2 - k = 4 - - ab = opoly1d.jacobi_recurrence(k+1, probability=True) - - N = 50 - x = np.linspace(-1, 1, N) - X,Y = np.meshgrid(x,x) - - XX = np.concatenate((X.reshape(X.size,1), Y.reshape(Y.size,1)), axis=1) - - lambdas = indexing.total_degree_indices(d, k) - - p = opolynd_eval(XX, lambdas, ab) - - j = 11 - assert j < lambdas.shape[0] - - fig = plt.figure() - ax = fig.gca(projection='3d') - ax.plot_surface(X, Y, p[:,j].reshape(N,N), cmap=cm.coolwarm, linewidth=0,antialiased=True) - plt.show() diff --git a/PythonLibrary/uncertainty/quadrature.py b/PythonLibrary/uncertainty/quadrature.py deleted file mode 100644 index 7e4ce75..0000000 --- a/PythonLibrary/uncertainty/quadrature.py +++ /dev/null @@ -1,36 +0,0 @@ -import numpy as np - -def gauss_quadrature(ab, N): - """ - Computes the N-point Gauss quadrature rule associated to the - recurrence coefficients ab. - """ - - from numpy.linalg import eigh - - n = ab.shape[0] - if n+1 < N: - raise IndexError('Require N+1 recurrence coefficients for an N-point rule.') - - J = np.diag(ab[1:N,1], k=1) + np.diag(ab[:N,0],k=0) + np.diag(ab[1:N,1], k=-1) - lamb,v = eigh(J) - - return lamb, v[0,:]**2 - -if __name__ == "__main__": - - from recurrence import jacobi_recurrence - from opoly1d import opoly1d_eval - - alpha = 0 - beta = 0 - - N = 12 - ab = jacobi_recurrence(N+1, alpha=alpha, beta=beta, probability=True) - - x,w = gauss_quadrature(ab,N) - - V = opoly1d_eval(x, list(range(N)), ab) - - G = np.dot(np.dot(V.T, np.diag(w)), V) - err = np.linalg.norm(G - np.eye(G.shape[0])) diff --git a/PythonLibrary/uncertainty/recurrence.py b/PythonLibrary/uncertainty/recurrence.py deleted file mode 100644 index 2b283c0..0000000 --- a/PythonLibrary/uncertainty/recurrence.py +++ /dev/null @@ -1,55 +0,0 @@ -import numpy as np -from scipy import special as sp - -def jacobi_recurrence(N, alpha=0., beta=0., probability=False): - # Returns the first N recurrence coefficient pairs for the Jacobi - # polynomial family. - - if N < 1: - return np.ones((0,2)) - - ab = np.ones((N,2)) * np.array([beta**2.- alpha**2., 1.]) - - # Special cases - ab[0,0] = (beta - alpha) / (alpha + beta + 2.) - ab[0,1] = np.exp( (alpha + beta + 1.) * np.log(2.) + - sp.gammaln(alpha + 1.) + sp.gammaln(beta + 1.) - - sp.gammaln(alpha + beta + 2.) - ) - - if N > 1: - ab[1,0] /= (2. + alpha + beta) * (4. + alpha + beta) - ab[1,1] = 4. * (alpha + 1.) * (beta + 1.) / ( - (alpha + beta + 2.)**2 * (alpha + beta + 3.) ) - - inds = np.arange(2.,N) - ab[2:,0] /= (2. * inds + alpha + beta) * (2 * inds + alpha + beta + 2.) - ab[2:,1] = 4 * inds * (inds + alpha) * (inds + beta) * (inds + alpha + beta) - ab[2:,1] /= (2. * inds + alpha + beta)**2 * (2. * inds + alpha + beta + 1.) * (2. * inds + alpha + beta - 1) - - ab[:,1] = np.sqrt(ab[:,1]) - - if probability: - ab[0,1] = 1. - - return ab - -def hermite_recurrence(N, rho=0., probability=False): - # Returns the first N recurrence coefficient pairs for the Hermite - # polynomial family. - - if N < 1: - return np.ones((0,2)) - - ab = np.zeros((N,2)) - ab[0,1] = sp.gamma(rho+0.5) - - ab[1:,1] = 0.5*np.arange(1., N) - ab[np.arange(N) % 2 == 1,1] += rho - - ab[:,1] = np.sqrt(ab[:,1]) - - if probability: - ab[0,1] = 1. - - return ab diff --git a/PythonLibrary/uncertainty/sensitivity.py b/PythonLibrary/uncertainty/sensitivity.py deleted file mode 100644 index bc1fedf..0000000 --- a/PythonLibrary/uncertainty/sensitivity.py +++ /dev/null @@ -1,85 +0,0 @@ -import numpy as np - -def pce_total_sensitivity(coeffs, lambdas, js): - # Computes total sensitivity associated to dimension js from PCE - # coefficients. Coeffs may be an array, and the sensitivity is - # computed across axis 0 (rows). js should be a list-type containing - # dimension indices. - # The output is len(js) x coeffs.shape[1] - - js = np.asarray(js,dtype=int) - - assert coeffs.shape[0] == lambdas.shape[0] - assert np.all(js >= 0) and np.all(js < lambdas.shape[1]) - - if len(np.shape(coeffs)) == 1: - coeffs = np.reshape(coeffs, [coeffs.size, 1]) - - unique_rows = np.vstack({tuple(row) for row in lambdas}) - # Just making sure - assert unique_rows.shape[0] == lambdas.shape[0] - - variance_rows = np.linalg.norm(lambdas, axis=1) > 0. - assert np.sum(np.invert(variance_rows)) == 1 - - variances = np.sum(coeffs[variance_rows,:]**2, axis=0) - total_sensitivities = np.zeros([js.size, coeffs.shape[1]]) - - for (qj,j) in enumerate(js): - total_sensitivities[qj,:] = np.sum(coeffs[lambdas[:,j]>0,:]**2, axis=0)/variances - - return total_sensitivities - -def pce_global_sensitivity(coeffs, lambdas, Js): - # Computes global sensitivity associated to dimensional indices js - # from PCE coefficients. Coeffs may be an array, and the sensitivity is - # computed across axis 0 (rows). - # Js should be a list of index lists. The global sensitivity for each - # index list is returned. - # The output is len(Js) x coeffs.shape[1] - - assert coeffs.shape[0] == lambdas.shape[0] - for j in Js: - j = np.asarray(j) - assert np.all(j >= 0) and np.all(j < lambdas.shape[1]) - - if len(np.shape(coeffs)) == 1: - coeffs = np.reshape(coeffs, [coeffs.size, 1]) - - unique_rows = np.vstack({tuple(row) for row in lambdas}) - # Just making sure - assert unique_rows.shape[0] == lambdas.shape[0] - - variance_rows = np.linalg.norm(lambdas, axis=1) > 0. - assert np.sum(np.invert(variance_rows)) == 1 - - variances = np.sum(coeffs[variance_rows,:]**2, axis=0) - global_sensitivities = np.zeros([len(Js), coeffs.shape[1]]) - for (qj,j) in enumerate(Js): - jc = np.setdiff1d(list(range(lambdas.shape[1])), j) - inds = np.logical_and( np.all(lambdas[:,j] > 0, axis=1), \ - np.all(lambdas[:,jc]==0, axis=1) ) - global_sensitivities[qj,:] = np.sum(coeffs[inds,:]**2, axis=0)/variances - - return global_sensitivities - -if __name__ == "__main__": - - import indexing - - d = 2 - k = 2 - - lambdas = indexing.total_degree_indices(d, k) - - M = 12 - - coeffs = np.random.normal(size=[lambdas.shape[0], M]) - - # Dimensional indices - js = list(range(d)) - T = pce_total_sensitivity(coeffs, lambdas, js) - - # Sets of dimensional indices - Js = [[0,], [1,], [0, 1]] - G = pce_global_sensitivity(coeffs, lambdas, Js) diff --git a/PythonLibrary/uncertainty/sparse_grids.py b/PythonLibrary/uncertainty/sparse_grids.py deleted file mode 100644 index 73bcdb8..0000000 --- a/PythonLibrary/uncertainty/sparse_grids.py +++ /dev/null @@ -1,84 +0,0 @@ -import os.path -import numpy as np - -def load_sparse_grid(dim, level): - """ - Loads sparse grid data from saved ascii files. Relative to this - file's path, searches in a subdirectory "sgdata" for a file whose - name is - - 'dim' + str(dim) + '_l' + str(level) + '.dat' - - This file should be plaintext file with dim+1 columns. The first - column contains quadrature weights and the remaining dim columns - contain nodal coordinates. - """ - - relative_path = os.path.dirname(os.path.realpath(__file__)) - filename = 'dim' + str(dim) + '_l' + str(level) + '.dat' - filename = os.path.join(relative_path, 'sgdata', filename) - - try: - wx = np.loadtxt(filename) - except IOError: - print(('Cannot load data: file ' + filename + ' does not exist')) - return - - return wx[:,1:], wx[:,0] - -if __name__ == "__main__": - - import sensitivity, indexing, test_functions, opoly1d, opolynd - - dim = 3 - level = 3; - - x,w = load_sparse_grid(dim, level) - - # Test on a multidimensional genz function - c = np.random.randn(dim) # Frequency parameter - r = np.random.randn(1) # phase pharameter - - f = test_functions.genz_oscillatory(c, r) - fx = f(x) - - # Compute integral of scalar function - Q_sparse_grid = np.sum(w*fx) - Q_exact = test_functions.genz_oscillatory_integral(c, r) - Q_relerror = np.abs(Q_sparse_grid - Q_exact)/np.abs(Q_exact) - - print(("Sparse grid integration error for Genz oscillatory test function is {:1.4e} using a level {:d} grid in {:d} dimensions".format(Q_relerror[0], level, dim))) - - # Compute a polynomial chaos expansion (PCE) assuming a uniform - # distribution - - order = level - - # Unifrom distribution - ab = opoly1d.jacobi_recurrence(order+1, alpha=0., beta = 0., probability=True) - lambdas = indexing.total_degree_indices(dim, order) - V = opolynd.opolynd_eval(x, lambdas, ab) - - # Test integration accuracy of sparse grid: - G = np.dot(np.dot(np.transpose(V), np.diag(w)), V) - print(("Sparse grid integration error for orthogonal polynomials up to degree {:d} is {:1.4e} using a level {:d} grid in {:d} dimensions".format(order, np.linalg.norm(G - np.eye(G.shape[0])), level, dim))) - - # Compute PCE coefficients - coeffs = np.dot(np.transpose(V), w*fx) - - # Now things like sensitivity can be computed: - - # Total sensitivity for each dimension: - pce_TS = sensitivity.pce_total_sensitivity(coeffs, lambdas, list(range(dim))) - # If you compare pce_TS with c, the qualitative trend in these - # vectors is similar - - # Global sensitivity for dimension 0, for dimensions [0,1], and for - # dimensions [0,2] - pce_GS = sensitivity.pce_global_sensitivity(coeffs, lambdas, [[0,], [0,1], [0,2]]) - - # All the global sensitivities in 3 dimensions - if dim == 3: - dim3_power_set = [[0,], [1,], [2,], [0,1], [1,2], [0,2], [0,1,2]] - pce_all_GS = sensitivity.pce_global_sensitivity(coeffs, lambdas, dim3_power_set) - # The global sensitivities satisfy np.sum(pce_all_GS) == 1. diff --git a/PythonLibrary/uncertainty/test_functions.py b/PythonLibrary/uncertainty/test_functions.py deleted file mode 100644 index 964124c..0000000 --- a/PythonLibrary/uncertainty/test_functions.py +++ /dev/null @@ -1,27 +0,0 @@ -import numpy as np - -def genz_oscillatory(c, r): - """ - Returns a multidimensional function evaluating the Genz - `oscillatory' test function, defined as - - f(x) = cos( 2*pi*r + sum( dot(x, c) ) ) - - where x has the same column dimension as c. - - c is a vector, and r is a scalar. The dimension of the input to the - function is inferred from the size of c. - """ - - return lambda x: np.cos( 2*np.pi*r + np.dot(x, c) ) - -def genz_oscillatory_integral(c, r): - """ - When c is a vector of size d, returns the value of the integral - - \int__{[-1,1]^d} f(x) 1/2^d dx, - - where f(x) is the function defined in genz_oscillatory. - """ - - return np.prod(np.sinc(c/np.pi)) * np.cos(2*np.pi*r) diff --git a/PythonLibrary/uncertainty/wafp.py b/PythonLibrary/uncertainty/wafp.py deleted file mode 100644 index 45cf124..0000000 --- a/PythonLibrary/uncertainty/wafp.py +++ /dev/null @@ -1,97 +0,0 @@ -# Routines for Weighted Approximate Fekete Points - -import numpy as np -from recurrence import jacobi_recurrence -from opolynd import opolynd_eval - -def legendre_wafp(lambdas, M=1e3, sampler=None): - """ - Generate M (= lambdas.shape[0]) weighted approximate Fekete points - using randomized sampling. - """ - - from scipy.linalg import qr - from legendre_induced import induced_distribution_mixture_sampling - - if lambdas.ndim == 1: - lambdas = np.reshape(lambdas, [lambdas.size, 1]) - - N, d = lambdas.shape - - ab = jacobi_recurrence(lambdas.max() + 1, alpha=0., beta=0., probability=True) - - if sampler is None: - sampler = lambda MM: induced_distribution_mixture_sampling(lambdas, MM) - - # Choose at least 2*N samples - M = max(M, 2*N) - - x = sampler(M) - V = opolynd_eval(x, lambdas, ab) - _, _, p = qr(V.T/np.sqrt(np.sum(V**2,axis=1)), pivoting=True, mode='economic') - - return x[p[:N], :] - -def legendre_wafp_enrichment(x, lambdas, M_enrich, sampler=None): - """ - Adds M_enrich points to the existing point set x by (approximate) - determinant maximization. - """ - - from legendre_induced import induced_distribution_mixture_sampling - - if lambdas.ndim == 1: - lambdas = np.reshape(lambdas, [lambdas.size, 1]) - - if sampler is None: - sampler = lambda MM: induced_distribution_mixture_sampling(lambdas, MM) - - M0 = x.shape[0] - N, d = lambdas.shape - ab = jacobi_recurrence(lambdas.max() + 1, alpha=0., beta=0., probability=True) - - M = max(M0, 2*N) - - while x.shape[0] < M0 + M_enrich: - V = opolynd_eval(x, lambdas, ab) - W = (V.T/np.sqrt(np.sum(V**2,axis=1))).T * np.sqrt(float(N)/float(x.shape[0])) - G = np.dot(W.T, W) - iG = np.linalg.inv(G) - - xs = sampler(M) - Vs = opolynd_eval(xs, lambdas, ab) - Ws = (Vs.T/np.sqrt(np.sum(Vs**2,axis=1))).T - dets = np.sum((Ws*np.dot(Ws, iG))**2, axis=1) - ind = np.argmax(dets) - - x = np.vstack([x, xs[ind,:]]) - - return x - -if __name__ == "__main__": - - from matplotlib import pyplot as plt - from indexing import total_degree_indices, hyperbolic_cross_indices - from recurrence import jacobi_recurrence - from opolynd import opolynd_eval - - d, k = 9, 7 - - #lambdas = total_degree_indices(d, k) - lambdas = hyperbolic_cross_indices(d, k) - N = lambdas.shape[0] - - x = legendre_wafp(lambdas, M=3e3) - - ab = jacobi_recurrence(lambdas.max() + 1, alpha=0., beta=0., probability=True) - - V = opolynd_eval(x, lambdas, ab) - W = (V.T/np.sqrt(np.sum(V**2,axis=1))).T * np.sqrt(float(N)/float(x.shape[0])) - - M_enrich = 20 - x2 = legendre_wafp_enrichment(x, lambdas, M_enrich, sampler=None) - V2 = opolynd_eval(x2, lambdas, ab) - W2 = (V2.T/np.sqrt(np.sum(V2**2,axis=1))).T * np.sqrt(float(N)/float(x2.shape[0])) - - # W: unenriched - # W2: enriched