From 62fb4c8d76722cce50cd9b5b86b82e97c8c39c81 Mon Sep 17 00:00:00 2001
From: Ger van Diepen <diepen@astron.nl>
Date: Wed, 20 Apr 2011 14:31:23 +0000
Subject: [PATCH] bug 1614: Use I shapelet for undefined other shapelets

---
 CEP/ParmDB/src/makesourcedb.cc | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/CEP/ParmDB/src/makesourcedb.cc b/CEP/ParmDB/src/makesourcedb.cc
index dd7c356356d..38430048c7d 100644
--- a/CEP/ParmDB/src/makesourcedb.cc
+++ b/CEP/ParmDB/src/makesourcedb.cc
@@ -737,13 +737,22 @@ void fillShapelet (SourceInfo& srcInfo,
   double scaleV = 0;
   Array<double> coeffI, coeffQ, coeffU, coeffV;
   readShapelet (shpI, coeffI, scaleI);
-  if (! shpQ.empty()) {
+  if (shpQ.empty()) {
+    coeffQ = coeffI;
+    scaleQ = scaleI;
+  } else {
     readShapelet (shpQ, coeffQ, scaleQ);
   }
-  if (! shpU.empty()) {
+  if (shpU.empty()) {
+    coeffU = coeffI;
+    scaleU = scaleI;
+  } else {
     readShapelet (shpU, coeffU, scaleU);
   }
-  if (! shpV.empty()) {
+  if (shpV.empty()) {
+    coeffV = coeffI;
+    scaleV = scaleI;
+  } else {
     readShapelet (shpV, coeffV, scaleV);
   }
   srcInfo.setShapeletCoeff (coeffI, coeffQ, coeffU, coeffV);
-- 
GitLab