From 2e9a3fd29c67873a18d495acf2101558df604630 Mon Sep 17 00:00:00 2001 From: "Joshua J. Cogliati" Date: Thu, 15 Jun 2023 14:01:14 -0600 Subject: [PATCH] Fixing things found in review. --- doc/user_manual/PostProcessors/SparseSensing.tex | 4 ++-- ravenframework/Models/PostProcessors/SparseSensing.py | 2 +- .../PostProcessors/SparseSensing/testSPSLOptiTwist.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/user_manual/PostProcessors/SparseSensing.tex b/doc/user_manual/PostProcessors/SparseSensing.tex index d865b3b9dc..5b8367097b 100644 --- a/doc/user_manual/PostProcessors/SparseSensing.tex +++ b/doc/user_manual/PostProcessors/SparseSensing.tex @@ -17,7 +17,7 @@ \subsubsection{SparseSensing} \item \xmlNode{Goal}, \xmlDesc{string, required field}, the goal of the sparse sensor optimization. User has to provide \xmlAttr{subType} which is a \xmlDesc{string, required field} representing the goal of the sparse sensing optimization; i.e., which goal function is used in the optimization? Examples for such goal functions are: \begin{itemize} - \item \textbf{Reconstruction} deals with predicting the values of a quantity of interest at different locations other than those where sensors are located. For example, one might predict the temperature at a point point in the middle of a fuel rod based on readings taken at various other positions. + \item \textbf{Reconstruction} deals with predicting the values of a quantity of interest at different locations other than those where sensors are located. For example, one might predict the temperature at a point in the middle of a fuel rod based on readings taken at various other positions. \item \textbf{Classification} is the problem of predicting which category an example belongs to, given a set of training data (e.g. determining whether digital photos are of dogs or cats). \end{itemize} @@ -26,7 +26,7 @@ \subsubsection{SparseSensing} \begin{itemize} \item \xmlNode{features}, \xmlDesc{comma separated strings, required field}, features/inputs of the data model, i.e., locations or time stamps we should sense \item \xmlNode{target}, \xmlDesc{comma separated strings, required field}, target of data model - \item \xmlNode{basis} , \xmlDesc{string, optional field}, the type of basis onto which the data are projected: \xmlString{Identity},\xmlString{ SVD}, \xmlString{Random}. \default{SVD} + \item \xmlNode{basis} , \xmlDesc{string, optional field}, the type of basis onto which the data are projected: \xmlString{Identity}, \xmlString{SVD}, \xmlString{Random}. \default{SVD} \item \xmlNode{nModes}, \xmlDesc{integer, required field}, the number of modes used to project the data. \item \xmlNode{nSensors}, \xmlDesc{integer, required field}, the number of sensors used \item \xmlNode{optimizer}, \xmlDesc{string, optional field}, the optimizer used to find the sensors: \xmlString{QR}, \xmlString{CCQR} for unconstrained and cost constrained respectively. diff --git a/ravenframework/Models/PostProcessors/SparseSensing.py b/ravenframework/Models/PostProcessors/SparseSensing.py index 4b0b6c7b0c..bf6bb45fb6 100644 --- a/ravenframework/Models/PostProcessors/SparseSensing.py +++ b/ravenframework/Models/PostProcessors/SparseSensing.py @@ -135,7 +135,7 @@ def _handleInput(self, paramInput): self.raiseAnError(IOError, '{} is not a recognized option, allowed options are {}'.format(child.getName(),self.goalsDict.keys())) _, notFound = paramInput.subparts[0].findNodesAndExtractValues(['nModes','nSensors','features','target']) # notFound must be empty - assert(not notFound) + assert not notFound, "Unexpected nodes in _handleInput" def run(self,inputIn): """ diff --git a/tests/framework/PostProcessors/SparseSensing/testSPSLOptiTwist.xml b/tests/framework/PostProcessors/SparseSensing/testSPSLOptiTwist.xml index bb20f62aa9..a988c56190 100644 --- a/tests/framework/PostProcessors/SparseSensing/testSPSLOptiTwist.xml +++ b/tests/framework/PostProcessors/SparseSensing/testSPSLOptiTwist.xml @@ -4,7 +4,7 @@ tests/framework/Postprocessors/SPSL Mohammad Abdo (@Jimmy-INL) 2022-07-18 - Postprocessors.SPSL + Models.Postprocessors.SparseSensing This test aims to check the ability of the Sparse Sensing Postprocessor to locate and plot the selected sensors to reconstruct the temperature field of the OPTI-TWIST prototype when perturbing the heater power.