From 1fdaa0ec70c8308088c3c1df9e43b4e8354360cf Mon Sep 17 00:00:00 2001
From: Marcel Loose <loose@astron.nl>
Date: Thu, 17 Jan 2013 12:36:08 +0000
Subject: [PATCH] Task #4052: The top-level pre-processing pipeline scripts now
 read the demix_always and demix_if_needed keys from the parset and pass them
 on as arguments to the call of the dppp recipe

---
 CEP/Pipeline/recipes/sip/bin/calibration_pipeline.py     | 4 ++++
 CEP/Pipeline/recipes/sip/bin/msss_calibrator_pipeline.py | 6 +++++-
 CEP/Pipeline/recipes/sip/bin/msss_target_pipeline.py     | 4 ++++
 CEP/Pipeline/recipes/sip/bin/preprocessing_pipeline.py   | 4 ++++
 CEP/Pipeline/recipes/sip/tasks.cfg.in                    | 2 --
 5 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/CEP/Pipeline/recipes/sip/bin/calibration_pipeline.py b/CEP/Pipeline/recipes/sip/bin/calibration_pipeline.py
index efd28a1951f..abd6d489a1b 100644
--- a/CEP/Pipeline/recipes/sip/bin/calibration_pipeline.py
+++ b/CEP/Pipeline/recipes/sip/bin/calibration_pipeline.py
@@ -190,6 +190,10 @@ class calibration_pipeline(control):
                 input_data_mapfile,
                 data_start_time=vdsinfo['start_time'],
                 data_end_time=vdsinfo['end_time'],
+                demix_always=
+                    py_parset.getStringVector('PreProcessing.demix_always'),
+                demix_if_needed=
+                    py_parset.getStringVector('PreProcessing.demix_if_needed'),
                 parset=ndppp_parset)['mapfile']
 
         # *********************************************************************
diff --git a/CEP/Pipeline/recipes/sip/bin/msss_calibrator_pipeline.py b/CEP/Pipeline/recipes/sip/bin/msss_calibrator_pipeline.py
index 1a30f32d197..6a9ca3014ba 100755
--- a/CEP/Pipeline/recipes/sip/bin/msss_calibrator_pipeline.py
+++ b/CEP/Pipeline/recipes/sip/bin/msss_calibrator_pipeline.py
@@ -235,11 +235,15 @@ class msss_calibrator_pipeline(control):
                 data_mapfile,
                 data_start_time=vdsinfo['start_time'],
                 data_end_time=vdsinfo['end_time'],
+                demix_always=
+                    py_parset.getStringVector('PreProcessing.demix_always'),
+                demix_if_needed=
+                    py_parset.getStringVector('PreProcessing.demix_if_needed'),
                 parset=ndppp_parset,
                 parmdb_mapfile=parmdb_mapfile,
                 sourcedb_mapfile=sourcedb_mapfile)['mapfile']
 
-        demix_mapfile = dppp_mapfile
+#        demix_mapfile = dppp_mapfile
 
 #        # Old Demixing method: performed now by ndppp
 #        # Demix the relevant A-team sources
diff --git a/CEP/Pipeline/recipes/sip/bin/msss_target_pipeline.py b/CEP/Pipeline/recipes/sip/bin/msss_target_pipeline.py
index e3674e949a7..a3c8b49da1e 100755
--- a/CEP/Pipeline/recipes/sip/bin/msss_target_pipeline.py
+++ b/CEP/Pipeline/recipes/sip/bin/msss_target_pipeline.py
@@ -335,6 +335,10 @@ class msss_target_pipeline(control):
                 data_mapfile,
                 data_start_time=vdsinfo['start_time'],
                 data_end_time=vdsinfo['end_time'],
+                demix_always=
+                    py_parset.getStringVector('PreProcessing.demix_always'),
+                demix_if_needed=
+                    py_parset.getStringVector('PreProcessing.demix_if_needed'),
                 parset=ndppp_parset,
                 parmdb_mapfile=parmdb_mapfile,
                 sourcedb_mapfile=sourcedb_mapfile,
diff --git a/CEP/Pipeline/recipes/sip/bin/preprocessing_pipeline.py b/CEP/Pipeline/recipes/sip/bin/preprocessing_pipeline.py
index cd482ba9070..96335a15e06 100644
--- a/CEP/Pipeline/recipes/sip/bin/preprocessing_pipeline.py
+++ b/CEP/Pipeline/recipes/sip/bin/preprocessing_pipeline.py
@@ -188,6 +188,10 @@ class preprocessing_pipeline(control):
                 (input_data_mapfile, output_data_mapfile),
                 data_start_time=vdsinfo['start_time'],
                 data_end_time=vdsinfo['end_time'],
+                demix_always=
+                    py_parset.getStringVector('PreProcessing.demix_always'),
+                demix_if_needed=
+                    py_parset.getStringVector('PreProcessing.demix_if_needed'),
                 parset=ndppp_parset)
 
         # *********************************************************************
diff --git a/CEP/Pipeline/recipes/sip/tasks.cfg.in b/CEP/Pipeline/recipes/sip/tasks.cfg.in
index f0022552dcf..a0180c3a984 100644
--- a/CEP/Pipeline/recipes/sip/tasks.cfg.in
+++ b/CEP/Pipeline/recipes/sip/tasks.cfg.in
@@ -4,8 +4,6 @@ executable = %(lofarroot)s/bin/NDPPP
 dry_run = False
 mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/dppp.mapfile
 parset = %(runtime_directory)s/%(job_name)s/parsets/NDPPP.parset
-#demix_always =
-#demix_if_needed = CasA
 nproc = 1
 nthreads = 8
 clobber = False
-- 
GitLab