diff --git a/.gitattributes b/.gitattributes
index df44af6c217aff90daa671d5f79fe4617daae8a0..65e8cc953e3a138cdf10f6542507260c3cc4db44 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -5285,6 +5285,7 @@ SAS/XML_generator/test/test_regression.in_data/txt/lc4_019_1.txt -text
 SAS/XML_generator/test/test_regression.in_data/txt/old_Long_Baseline_test.txt -text
 SAS/XML_generator/test/test_regression.in_data/txt/old_input.txt -text
 SAS/XML_generator/test/test_regression.in_data/txt/old_pulsar_pipe_test.txt -text
+SAS/XML_generator/test/test_regression.in_data/txt/prefactor.txt -text
 SAS/XML_generator/test/test_regression.in_data/txt/test_LB.txt -text
 SAS/XML_generator/test/test_regression.in_data/txt/test_dysco.txt -text
 SAS/XML_generator/test/test_regression.in_data/txt/test_input.txt -text
@@ -5305,6 +5306,7 @@ SAS/XML_generator/test/test_regression.in_data/xml/Ticket_6923.xml -text
 SAS/XML_generator/test/test_regression.in_data/xml/hd156279b_reference.xml -text
 SAS/XML_generator/test/test_regression.in_data/xml/input.xml -text
 SAS/XML_generator/test/test_regression.in_data/xml/lc4_019_1.xml -text
+SAS/XML_generator/test/test_regression.in_data/xml/prefactor.xml -text
 SAS/XML_generator/test/test_regression.in_data/xml/pulsar_pipe_test.xml -text
 SAS/XML_generator/test/test_regression.in_data/xml/test_LB.xml -text
 SAS/XML_generator/test/test_regression.in_data/xml/test_dysco.xml -text
diff --git a/SAS/XML_generator/src/xmlgen.py b/SAS/XML_generator/src/xmlgen.py
index c9329e6be5816d800d052dc4210ed7c6bb40e07b..17a3fd0832ae83b59e66de8db0cb5dcbc363f8ce 100755
--- a/SAS/XML_generator/src/xmlgen.py
+++ b/SAS/XML_generator/src/xmlgen.py
@@ -26,7 +26,7 @@
 # Last change by : $Author: renting $
 # Change date	   : $Date: 2016-05-18 11:47:57 +0200 (wo, 18 mei 2016) $
 
-VERSION = "3.1.0"
+VERSION = "3.2.0"
 
 import sys, getopt, time
 from xml.sax.saxutils import escape as XMLescape
@@ -49,7 +49,7 @@ WHICH_CS = ['IQUV', 'I', 'XXYY']
 WEIGHTING_SCHEMES = ['uniform', 'superuniform', 'natural', 'briggs', 'briggsabs', 'radial']
 IMAGING_PIPELINE_TYPES = ['MSSS', 'standard', 'none']
 # MODES = ['Calobs','Calbeam','MultiObs']
-PROCESSING = ['Preprocessing', 'Calibration', 'Pulsar', 'Imaging', 'LongBaseline', 'none']
+PROCESSING = ['Preprocessing', 'Calibration', 'Pulsar', 'Imaging', 'LongBaseline', 'Prefactor', 'none']
 CALIBRATION_MODE = ['internal', 'external', 'none']
 ALL_STATIONS = 'CS001,CS002,CS003,CS004,CS005,CS006,CS007,CS011,CS013,CS017,CS021,CS024,CS026,CS028,CS030,CS031,CS032,CS101,CS103,CS201,CS301,CS302,CS401,CS501,RS106,RS205,RS208,RS210,RS305,RS306,RS307,RS310,RS406,RS407,RS409,RS503,RS508,RS509,DE601,DE602,DE603,DE604,DE605,FR606,SE607,UK608,DE609,PL610,PL611,PL612,IE613'
 CORE_STATIONS = 'CS001,CS002,CS003,CS004,CS005,CS006,CS007,CS011,CS013,CS017,CS021,CS024,CS026,CS028,CS030,CS031,CS032,CS101,CS103,CS201,CS301,CS302,CS401,CS501'
@@ -1841,6 +1841,9 @@ def checkSettings(settings, blockNr):
     elif settings["processing"] == 'Imaging' and settings["calibration_mode"] == "none":
         raise GenException(
             "processing=imaging requires calibration. While calibration is set to 'none' for BLOCK: %i" % blockNr)
+    elif settings["processing"] == 'Prefactor' and settings["calibration_mode"] == "none":
+        raise GenException(
+            "processing=prefactor requires calibration. While calibration is set to 'none' for BLOCK: %i" % blockNr)
     if settings["nr_beams"] == 0:
         raise GenException("no target beams have been specified for BLOCK: %i" % blockNr)
     elif settings["calibration_mode"] == "none":
@@ -1875,9 +1878,9 @@ def checkSettings(settings, blockNr):
         raise GenException(
             "FlysEye cannot be switched on when coherentStokesData is switched off, specified in BLOCK: %i" % blockNr)
 
-    if settings["processing"] == 'Imaging':
+    if (settings["processing"] == 'Imaging') or (settings["processing"] == 'Prefactor'):
         if "imagingPipeline" in settings:
-            if settings["imagingPipeline"] == 'none':
+            if settings["imagingPipeline"] == 'none': # We also allow this for Prefactor, to not over complicate things
                 settings["do_imaging"] = False
             else:
                 if not "nrSubbandsPerImage" in settings:
@@ -1893,14 +1896,18 @@ def checkSettings(settings, blockNr):
                 elif settings["imagingPipeline"] == 'MSSS':
                     settings["imaging_pipe_type"] = 'ImagingPipelineMSSSType'
                     settings["imaging_pipe_default_template"] = "MSSS Imaging Pipeline"
-                settings[
-                    "imaging_pipe_duration"] = 0  # img pipeline duration placeholder, MoM rejects <duration></duration>
+                #TODO: Will need to be uncommented when a 'PREFACTOR' default template goes into production.
+                #elif settings["imagingPipeline"] == 'Prefactor':
+                #    settings["imaging_pipe_type"] = 'Prefactor'
+                #    settings["imaging_pipe_default_template"] = "PREFACTOR"
+                settings["imaging_pipe_duration"] = 0  # img pipeline duration placeholder, MoM rejects <duration></duration>
                 # determine nrImages
                 settings["nrImages"] = determineNrImages(settings["targetBeams"], settings["nrSubbandsPerImage"],
                                                          "nrSubbandsPerImage")
         else:
             raise GenException(
-                "the 'imagingPipeline' type parameter has not been specified while processing is set to Imaging. imagingPipeline should be one of: MSSS, standard or none");
+                "the 'imagingPipeline' type parameter has not been specified while processing is set to %s" % settings["processing"] +
+                ". imagingPipeline should be one of: MSSS, standard or none");
     else:
         settings["do_imaging"] = False
 
@@ -2002,6 +2009,7 @@ def writeRepeat(ofile, projectName, blockTopo, repeatNr, settings, imaging_pipe_
     tar_obs_uv_data_topologies = []
     tar_obs_bf_data_topologies = []
     tar_pipe_topologies = []
+    tar_prepipe_topologies = []
     LB_preproc_pipe_predecessor = []
     LB_preproc_pipe_topologies = []
     LB_preproc_pipe_output_MS_topologies = []
@@ -2018,6 +2026,10 @@ def writeRepeat(ofile, projectName, blockTopo, repeatNr, settings, imaging_pipe_
     cal_pipe_calibrator_topology = repeatTopo + '.CPC'  # 1.CPC
     cal_pipe_target_topology = repeatTopo + '.CPT'  # 1.CPT
 
+    #To identify the preprocessor pipelines for PREFACTOR
+    prepipe_calibrator_topology = repeatTopo + '.CPCP'  # 1.CPCP
+    prepipe_target_topology = repeatTopo + '.CPTP'  # 1.CPTP
+
     if processing == 'Imaging':
         if settings['calibration_mode'] == "internal":
             cal_obs_pipe_default_template = "Calibrator Pipeline (export)"
@@ -2065,6 +2077,24 @@ def writeRepeat(ofile, projectName, blockTopo, repeatNr, settings, imaging_pipe_
             cal_pipe_target_description = "Cal Pipe Target"
             tar_pipe_predecessor = tar_obs_topology + ',' + cal_pipe_calibrator_topology  # 1.T,1.CPC
             tar_pipe_input_INST_topo = cal_pipe_calibrator_topology + '.inst.dps'  # 1.CPC.inst.dps
+    elif processing == 'Prefactor':
+        if settings['calibration_mode'] == "internal":
+            raise GenException('Prefactor mode currently does not support an internal calibration beam.')
+        cal_prepipe_default_template = "Preprocessing Pipeline"
+        tar_prepipe_default_template = "Preprocessing Pipeline"
+        prepipe_calibrator_description = "Preprocessing"
+        prepipe_target_description = "Preprocessing"
+        prepipe_target_predecessor = tar_obs_topology  # 1.T
+        prepipe_calibrator_predecessor = cal_obs_topology  # 1.C
+
+        cal_obs_pipe_default_template = "Calibration Pipeline"
+        cal_tar_pipe_default_template = "Calibration Pipeline"
+        cal_pipe_calibrator_description = "Cal Pipe Calibrator"
+        cal_pipe_target_description = "Cal Pipe Target"
+        cal_pipe_predecessor = prepipe_calibrator_topology #1.CPCP
+        tar_pipe_predecessor = prepipe_target_topology + ',' + cal_pipe_calibrator_topology  # 1.CPCT,1.CPC
+        tar_pipe_input_INST_topo = cal_pipe_calibrator_topology + '.inst.dps'  # 1.CPC.inst.dps
+        tar_pipe_output_INST_topo = cal_pipe_target_topology + '.inst.dps'  # 1.CPT.inst.dps
 
     bfDataExtension = determineBfDataExtension(coherentStokesData, incoherentStokesData)
 
@@ -2085,6 +2115,7 @@ def writeRepeat(ofile, projectName, blockTopo, repeatNr, settings, imaging_pipe_
         tar_obs_uv_data_topologies.append(tar_obs_beam_topologies[beamNr] + ".uv.dps")
 
         tar_pipe_topologies.append(repeatTopo + ".PT" + beam_nr_str)
+        tar_prepipe_topologies.append(repeatTopo + ".PPT" + beam_nr_str)
 
         if processing == 'LongBaseline':
             LB_preproc_pipe_topologies.append(repeatTopo + ".PTLB" + beam_nr_str)
@@ -2273,6 +2304,53 @@ def writeRepeat(ofile, projectName, blockTopo, repeatNr, settings, imaging_pipe_
                             nr_cores_per_task,
                             miscParameters)
 
+        elif processing == 'Prefactor':
+            calibratorBBS = settings['calibratorBBS']
+            if not calibratorBBS:
+                raise GenException("BBS SkyModel is not specified for pipeline coupled to calibrator beam")
+            calibratorDemix = settings['calibratorDemix']
+            if len(calibratorDemix) > 1:
+                raise GenException("calibratorDemix > 1 not supported in Prefactor right now.")
+            writeXMLAvgPipeline(ofile,
+                                prepipe_calibrator_topology,
+                                cal_obs_topology,
+                                cal_pipe_name + "P",
+                                prepipe_calibrator_description,
+                                cal_prepipe_default_template,
+                                settings['flaggingStrategy'],
+                                settings['calibratorBeam'][8],
+                                calibratorDemix[0],
+                                cal_obs_beam0_topology + '.uv.dps',
+                                prepipe_calibrator_topology + '.uv.dps',
+                                settings['cluster'],
+                                status,
+                                nr_tasks,
+                                nr_cores_per_task,
+                                miscParameters)
+
+            # TODO ['', '', '', '', '', '', ''] is really ugly, this will break the regression test
+            writeXMLCalPipe(ofile,
+                            cal_pipe_calibrator_topology,
+                            cal_pipe_predecessor,
+                            cal_pipe_name,
+                            cal_pipe_calibrator_description,
+                            cal_obs_pipe_default_template,
+                            settings['flaggingStrategy'],
+                            settings['calibratorBeam'][8],
+                            calibratorBBS[0][0],
+                            settings['calibratorDemix'][0],
+                            ['', '', '', '', '', '', ''],
+                            cal_pipe_predecessor + '.uv.dps',
+                            cal_pipe_calibrator_topology + '.inst.dps',
+                            cal_pipe_calibrator_topology + '.inst.dps',
+                            cal_pipe_calibrator_topology + '.uv.dps',
+                            settings['cluster'],
+                            status,
+                            nr_tasks,
+                            nr_cores_per_task,
+                            miscParameters)
+
+
     if not settings['split_targets']:
         if settings['writePackageTag']:
             tar_obs_name = settings['packageTag'] + "/" + settings['targetBeams'][0][2] + "/" + str(repeatNr) + "/TO"
@@ -2478,6 +2556,53 @@ def writeRepeat(ofile, projectName, blockTopo, repeatNr, settings, imaging_pipe_
                                     nr_tasks,
                                     nr_cores_per_task,
                                     miscParameters)
+
+                elif processing == 'Prefactor':
+                    # The code probably never gets here as this is for "internal" calibration mode.
+                    calibratorBBS = settings['calibratorBBS']
+                    if not calibratorBBS:
+                        raise GenException("BBS SkyModel is not specified for pipeline coupled to calibration beam")
+
+                    calibratorDemix = settings['calibratorDemix']
+                    if len(calibratorDemix) > 1:
+                        raise GenException("calibratorDemix > 1 not supported in Prefactor right now.")
+                    writeXMLAvgPipeline(ofile,
+                                        prepipe_calibrator_topology,
+                                        cal_obs_topology,
+                                        cal_pipe_name + "P",
+                                        prepipe_calibrator_description,
+                                        cal_prepipe_default_template,
+                                        settings['flaggingStrategy'],
+                                        settings['calibratorBeam'][8],
+                                        calibratorDemix[0],
+                                        tar_obs_uv_data_topologies[nr_beams] + '.uv.dps',
+                                        prepipe_calibrator_topology + '.uv.dps',
+                                        settings['cluster'],
+                                        status,
+                                        nr_tasks,
+                                        nr_cores_per_task,
+                                        miscParameters)
+
+                    writeXMLCalPipe(ofile,
+                                    cal_pipe_target_topology,
+                                    cal_pipe_predecessor,
+                                    cal_pipe_target_name,
+                                    cal_pipe_target_description,  # FIXME: Might be undefined
+                                    cal_tar_pipe_default_template,  # FIXME: Might be undefined
+                                    settings['flaggingStrategy'],
+                                    calibratorBeam[8],
+                                    calibratorBBS[0][0],
+                                    settings['calibratorDemix'][0],
+                                    calibratorBBS[0][1:],
+                                    cal_pipe_predecessor  + '.uv.dps',
+                                    cal_pipe_target_topology + '.inst.dps',
+                                    cal_pipe_target_topology + '.inst.dps',
+                                    cal_pipe_target_topology + '.uv.dps',
+                                    settings['cluster'],
+                                    status,
+                                    nr_tasks,
+                                    nr_cores_per_task,
+                                    miscParameters)
         else:
             writeXMLObsEnd(ofile)
 
@@ -2572,6 +2697,9 @@ def writeRepeat(ofile, projectName, blockTopo, repeatNr, settings, imaging_pipe_
             elif processing == 'LongBaseline':
                 tar_pipe_default_template = "Calibration Pipeline Target"
                 tar_pipe_description = "Target Pipeline"
+            elif processing == 'Prefactor':
+                tar_pipe_default_template = "Calibration Pipeline Target"
+                tar_pipe_description = "Target Pipeline"
 
             if settings['writePackageTag']:
                 tar_pipe_name = settings['packageTag'] + "/" + targetBeams[beamNr][2] + "/" + str(repeatNr) + "." + \
@@ -2658,6 +2786,53 @@ def writeRepeat(ofile, projectName, blockTopo, repeatNr, settings, imaging_pipe_
                                 nr_cores_per_task,
                                 miscParameters)
 
+            elif processing == 'Prefactor':  # Should work I hope?
+                targetBBS = settings['targetBBS']
+                if targetBBS[beamNr][0][0] == '':
+                    raise GenException(
+                        "BBS SkyModel is not specified for pipeline coupled to target beam " + str(beamNr))
+
+                targetDemix = settings['targetDemix']
+                if len(targetDemix[beamNr]) > 1:
+                    raise GenException("targetDemix > 1 not supported in Prefactor right now.")
+                writeXMLAvgPipeline(ofile,
+                                    tar_prepipe_topologies[beamNr],
+                                    prepipe_target_predecessor,
+                                    tar_pipe_name + "P",
+                                    prepipe_target_description,
+                                    tar_prepipe_default_template,
+                                    settings['flaggingStrategy'],
+                                    targetBeams[beamNr][8],
+                                    targetDemix[beamNr][0],
+                                    tar_obs_uv_data_topologies[beamNr],
+                                    tar_prepipe_topologies[beamNr] + ".uv.dps",
+                                    settings['cluster'],
+                                    status,
+                                    nr_tasks,
+                                    nr_cores_per_task,
+                                    miscParameters)
+
+                writeXMLCalPipe(ofile,
+                                tar_pipe_topologies[beamNr],
+                                tar_pipe_predecessor,
+                                tar_pipe_name,
+                                tar_pipe_description,
+                                tar_pipe_default_template,
+                                settings['flaggingStrategy'],
+                                targetBeams[beamNr][8],
+                                targetBBS[beamNr][0][0],
+                                settings['targetDemix'][beamNr][0],
+                                targetBBS[beamNr][0][1:],
+                                tar_prepipe_topologies[beamNr] + ".uv.dps",
+                                tar_pipe_topologies[beamNr] + ".inst.dps",
+                                tar_pipe_topologies[beamNr] + ".inst.dps",
+                                tar_pipe_topologies[beamNr] + ".uv.dps",
+                                settings['cluster'],
+                                status,
+                                nr_tasks,
+                                nr_cores_per_task,
+                                miscParameters)
+
             elif processing == 'Pulsar':
                 # tar_obs_topology_MultiObs = tar_obs_topology + '.' + str(beamNr)
                 tar_pipe_predecessor = tar_obs_topology
diff --git a/SAS/XML_generator/test/test_regression.in_data/txt/prefactor.txt b/SAS/XML_generator/test/test_regression.in_data/txt/prefactor.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c9b6ce299f1836314a78d90d34c5a654a544a7c3
--- /dev/null
+++ b/SAS/XML_generator/test/test_regression.in_data/txt/prefactor.txt
@@ -0,0 +1,98 @@
+################################################################################
+## Parameters for project: PREFACTOR
+################################################################################
+
+
+################################################################################
+## RUN 06: 2 targets -- duration:  21600s (  6.00h)
+## HD 156279, 17:12:23.19,+63:20:8.0
+## 3C380, 18:29:31.72,+48:44:46.95
+ 
+## PARAMETER FILE SETUP 
+projectName=PREFACTOR
+mainFolderName=HD152679
+mainFolderDescription=LBA outer 8ch/sb 1s Dutch
+
+BLOCK
+
+split_targets = F # T/F
+calibration = external # internal / external / none
+create_calibrator_observations = T # create cal-observations before target (T/F ignored if calibration is none)
+create_target_cal_beam = F # create cal-beam in target observation (T/F ignored if calibration is none)
+processing=Prefactor # can be one of Calibration, Preprocessing, Imaging, Pulsar, LongBaseline, none
+imagingPipeline=standard # can be one of MSSS, standard, none
+nrSubbandsPerImage=10
+repeat=1 # the number of repeats of this block
+
+packageName=20190616 # name of package folder containing observation/pipelines
+packageDescription=Prefactor observation
+packageTag= # optional tag to be prepended before every obs/pipeline name/description (max 8 chars)
+
+antennaMode=LBA Outer
+clock=200 MHz
+instrumentFilter=30-90 MHz
+numberOfBitsPerSample=8 # Change to 16 if requested
+integrationTime=1.0
+channelsPerSubband=64
+stationList=nl
+tbbPiggybackAllowed=F
+aartfaacPiggybackAllowed=F
+
+###### Which data types should be produced: ######
+
+correlatedData=T
+coherentStokesData=F
+incoherentStokesData=F
+flysEye=F
+coherentDedisperseChannels=False
+
+###### Coherent Stokes parameters ######
+#subbandsPerFileCS=
+#numberCollapsedChannelsCS=
+#stokesDownsamplingStepsCS=
+#whichCS=
+###### Coherent Stokes parameters ######
+#subbandsPerFileIS=
+#numberCollapsedChannelsIS=
+#stokesDownsamplingStepsIS=
+#whichIS=
+
+flaggingStrategy=LBAdefault
+calibratorDuration_s=21600                      # duration of calibration observations in seconds
+targetDuration_s=21600                       # duration of target observations in seconds
+
+# startTimeUTC, the start time of the first observation. format: yyyy-MM-dd hh:mm:ss
+# un-comment the startTimeUTC to have the observation start times generated
+startTimeUTC=2015-06-16 20:00:00
+# timeStep in seconds
+timeStep1=60
+timeStep2=60
+
+###### Pipeline settings ######
+## GENERAL INFO
+## Processing mode: Calibration
+## Demixing requested: CygA CasA
+
+Global_Demix=8;1;8;1;CygA,CasA
+
+##targetBeams=  ## MAKE SURE TO SELECT THIS PROPERLY
+calibratorBeam=
+18:29:31.72;+48:44:46.95;3C380;154..397;244;;;T;43200
+BBS:3C380;;;T
+
+# BBS: Add parameters if BBS needed
+# Pulsar: Add parameters if pulsar pipeline needed
+
+
+targetBeams=
+17:12:23.20;+63:21:07.5;HD156279;154..393;240;;;T;43200
+BBS:3C380;;;T
+
+# BBS: Add parameters if BBS needed
+# Pulsar: Add parameters if pulsar pipeline needed
+
+## Demixing requested: CygA CasA
+
+
+
+################################################################################
diff --git a/SAS/XML_generator/test/test_regression.in_data/xml/prefactor.xml b/SAS/XML_generator/test/test_regression.in_data/xml/prefactor.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4033e85829df48b51f53965c91e1506f5c062d80
--- /dev/null
+++ b/SAS/XML_generator/test/test_regression.in_data/xml/prefactor.xml
@@ -0,0 +1,551 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <lofar:project xmlns:lofar="http://www.astron.nl/MoM2-Lofar" xmlns:mom2="http://www.astron.nl/MoM2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.astron.nl/MoM2-Lofar http://lofar.astron.nl:8080/mom3/schemas/LofarMoM2.xsd http://www.astron.nl/MoM2 http://lofar.astron.nl:8080/mom3/schemas/MoM2.xsd ">
+  <version>3.2.0</version>
+  <template version="3.2.0" author="Alwin de Jong,Adriaan Renting" changedBy="Adriaan Renting">
+  <description>XML Template generator version 3.2.0</description>
+  </template>
+  <name>PREFACTOR</name>
+  <children>
+   <item index="0">
+    <lofar:folder topology_parent="false">
+    <name>HD152679</name>
+    <description>LBA outer 8ch/sb 1s Dutch</description>
+    <children>
+   <item index="0">
+        <lofar:folder topology_parent="true">
+          <topology>0</topology>
+          <name>20190616</name>
+          <description>Prefactor observation (Prefactor)</description>
+          <children>
+          <item index="0">
+                <lofar:observation>
+                  <name>3C380/1/CO</name>
+                  <description>3C380/1/CO (Calibration Observation)</description>
+                  <topology>B0.1.C</topology>
+                  <predecessor_topology></predecessor_topology>
+                  <currentStatus>
+                    <mom2:openedStatus/>
+                  </currentStatus>
+                  <lofar:observationAttributes>
+                    <observationId>
+                    </observationId>
+                    <name>3C380/1/CO</name>
+                    <projectName>PREFACTOR</projectName>
+                    <instrument>Beam Observation</instrument>
+                    <defaultTemplate>BeamObservation</defaultTemplate>
+                    <tbbPiggybackAllowed>false</tbbPiggybackAllowed>
+                    <aartfaacPiggybackAllowed>false</aartfaacPiggybackAllowed>
+                    <userSpecification>
+                      <correlatedData>true</correlatedData>
+                      <coherentStokesData>false</coherentStokesData>
+                      <incoherentStokesData>false</incoherentStokesData>
+                      <antenna>LBA Outer</antenna>
+                      <clock mode="200 MHz"/>
+                      <instrumentFilter>30-90 MHz</instrumentFilter>
+                      <integrationInterval>1.0</integrationInterval>
+                      <channelsPerSubband>64</channelsPerSubband>
+                      <coherentDedisperseChannels>false</coherentDedisperseChannels>
+                      <tiedArrayBeams>
+                        <flyseye>false</flyseye>
+                      </tiedArrayBeams>
+                      <stokes>
+                        <integrateChannels>false</integrateChannels>
+                        <subbandsPerFileCS></subbandsPerFileCS>
+                        <numberCollapsedChannelsCS></numberCollapsedChannelsCS>
+                        <stokesDownsamplingStepsCS></stokesDownsamplingStepsCS>
+                        <whichCS></whichCS>
+                        <subbandsPerFileIS></subbandsPerFileIS>
+                        <numberCollapsedChannelsIS></numberCollapsedChannelsIS>
+                        <stokesDownsamplingStepsIS></stokesDownsamplingStepsIS>
+                        <whichIS></whichIS>
+                      </stokes>
+                      <stationSet>Custom</stationSet>
+                      <stations>CS001,CS002,CS003,CS004,CS005,CS006,CS007,CS011,CS013,CS017,CS021,CS024,CS026,CS028,CS030,CS031,CS032,CS101,CS103,CS201,CS301,CS302,CS401,CS501,RS106,RS205,RS208,RS210,RS305,RS306,RS307,RS310,RS406,RS407,RS409,RS503,RS508,RS509</stations>
+                      <timeFrame>UT</timeFrame>
+                      <startTime>2015-06-16T20:00:00</startTime>
+                      <endTime>2015-06-17T02:00:00</endTime>
+                      <duration>21600</duration>
+                      <bypassPff>false</bypassPff>
+                      <enableSuperterp>false</enableSuperterp>
+                      <numberOfBitsPerSample>8</numberOfBitsPerSample>
+                    </userSpecification>
+                  </lofar:observationAttributes>
+                  <children>
+<item index="0">
+                      <lofar:measurement xsi:type="lofar:BFMeasurementType">
+                        <name>3C380</name>
+                        <description>3C380</description>
+                        <topology>B0.1.C.SAP000</topology>
+                        <currentStatus>
+                          <mom2:openedStatus/>
+                        </currentStatus>
+                        <lofar:bfMeasurementAttributes>
+                          <measurementType>Calibration</measurementType>
+                          <specification>
+                            <targetName>3C380</targetName>
+                            <ra>277.382166667</ra>
+                            <dec>48.746375</dec>
+                            <equinox>J2000</equinox>
+                            <duration>0</duration>
+                            <subbandsSpecification>
+                              <subbands>154..397</subbands>
+                            </subbandsSpecification>
+                          <tiedArrayBeams>
+                            <flyseye>false</flyseye>
+                          <nrTabRings></nrTabRings>
+                          <tabRingSize></tabRingSize>
+                            <tiedArrayBeamList>
+                              
+                            </tiedArrayBeamList>
+                          </tiedArrayBeams>
+                          </specification>
+                        </lofar:bfMeasurementAttributes>
+                        <resultDataProducts>
+                                          <item>
+                    <lofar:uvDataProduct>
+                    <name>B0.1.C.SAP000.uv.dps</name>
+                    <topology>B0.1.C.SAP000.uv.dps</topology>
+                    <status>no_data</status>
+                    <storageCluster>
+                      <name>CEP4</name>
+                      <partition>/data/projects/</partition>
+                    </storageCluster>
+                    </lofar:uvDataProduct>
+                  </item>
+                        </resultDataProducts>
+                      </lofar:measurement>
+                    </item>
+</children>
+                </lofar:observation>
+                </item>
+        <item index="0">
+              <lofar:pipeline xsi:type="lofar:AveragingPipelineType">
+                <topology>B0.1.CPCP</topology>
+                <predecessor_topology>B0.1.C</predecessor_topology>
+                <name>3C380/1/CPCP</name>
+                <description>3C380/1/CPCP (Preprocessing)</description>
+                <currentStatus>
+                  <mom2:openedStatus/>
+                </currentStatus>
+  <processingCluster>
+                    <name>CEP4</name>
+                    <partition>cpu</partition>
+                    <numberOfTasks>110</numberOfTasks>
+                    <minRAMPerTask unit="byte">1000000000</minRAMPerTask>
+                    <minScratchPerTask unit="byte">100000000</minScratchPerTask>
+                    <maxDurationPerTask>P7DT0S</maxDurationPerTask>
+                    <numberOfCoresPerTask>2</numberOfCoresPerTask>
+                    <runSimultaneous>true</runSimultaneous>
+                  </processingCluster>
+                <pipelineAttributes>
+                  <defaultTemplate>Preprocessing Pipeline</defaultTemplate>
+                  <flaggingStrategy>LBAdefault</flaggingStrategy>
+                  <duration>43200</duration>
+                  <demixingParameters>
+                    <averagingFreqStep>8</averagingFreqStep>
+                    <averagingTimeStep>1</averagingTimeStep>
+                    <demixFreqStep>8</demixFreqStep>
+                    <demixTimeStep>1</demixTimeStep>
+                    <demixAlways>CygA,CasA</demixAlways>
+                    <demixIfNeeded></demixIfNeeded>
+                    <ignoreTarget></ignoreTarget>
+                  </demixingParameters>
+<misc>{"storagemanager": "dysco"}</misc>
+</pipelineAttributes>
+                <usedDataProducts>
+                  <item>
+                    <lofar:uvDataProduct topology="B0.1.C.SAP000.uv.dps">
+                    </lofar:uvDataProduct>
+                  </item>
+                </usedDataProducts>
+                <resultDataProducts>
+                  <item>
+                    <lofar:uvDataProduct>
+                      <name>B0.1.CPCP.uv.dps</name>
+                      <topology>B0.1.CPCP.uv.dps</topology>
+                      <status>no_data</status>
+                      <storageCluster>
+                      <name>CEP4</name>
+                      <partition>/data/projects/</partition>
+                    </storageCluster>
+                    </lofar:uvDataProduct>
+                  </item>
+                </resultDataProducts>
+              </lofar:pipeline>
+            </item>
+        <item index="0">
+              <lofar:pipeline xsi:type="lofar:CalibrationPipelineType">
+                <topology>B0.1.CPC</topology>
+                <predecessor_topology>B0.1.CPCP</predecessor_topology>
+                <name>3C380/1/CPC</name>
+                <description>3C380/1/CPC (Cal Pipe Calibrator)</description>
+                <currentStatus>
+                  <mom2:openedStatus/>
+                </currentStatus>
+  <processingCluster>
+                    <name>CEP4</name>
+                    <partition>cpu</partition>
+                    <numberOfTasks>110</numberOfTasks>
+                    <minRAMPerTask unit="byte">1000000000</minRAMPerTask>
+                    <minScratchPerTask unit="byte">100000000</minScratchPerTask>
+                    <maxDurationPerTask>P7DT0S</maxDurationPerTask>
+                    <numberOfCoresPerTask>2</numberOfCoresPerTask>
+                    <runSimultaneous>true</runSimultaneous>
+                  </processingCluster>
+                <pipelineAttributes>
+                  <defaultTemplate>Calibration Pipeline</defaultTemplate>
+                  <flaggingStrategy>LBAdefault</flaggingStrategy>
+                  <duration>43200</duration>
+                  <skyModelDatabase>3C380</skyModelDatabase>
+                  <demixingParameters>
+                    <averagingFreqStep>8</averagingFreqStep>
+                    <averagingTimeStep>1</averagingTimeStep>
+                    <demixFreqStep>8</demixFreqStep>
+                    <demixTimeStep>1</demixTimeStep>
+                    <demixAlways>CygA,CasA</demixAlways>
+                    <demixIfNeeded></demixIfNeeded>
+                    <ignoreTarget></ignoreTarget>
+                  </demixingParameters>
+            <bbsParameters>
+              <baselines></baselines>
+              <correlations></correlations>
+              <beamModelEnable></beamModelEnable>
+              <solveParms></solveParms>
+              <solveUVRange></solveUVRange>
+              <strategyBaselines></strategyBaselines>
+              <strategyTimeRange></strategyTimeRange>
+            </bbsParameters>
+<misc>{"storagemanager": "dysco"}</misc>
+</pipelineAttributes>
+                <usedDataProducts>
+                  <item>
+                    <lofar:uvDataProduct topology="B0.1.CPCP.uv.dps">
+                    </lofar:uvDataProduct>
+                  </item>
+                </usedDataProducts>
+                <resultDataProducts>
+                  <item>
+                    <lofar:instrumentModelDataProduct>
+                      <name>B0.1.CPC.inst.dps</name>
+                      <topology>B0.1.CPC.inst.dps</topology>
+                      <status>no_data</status>
+                      <storageCluster>
+                      <name>CEP4</name>
+                      <partition>/data/projects/</partition>
+                    </storageCluster>
+                    </lofar:instrumentModelDataProduct>
+                  </item>
+                  <item>
+                    <lofar:uvDataProduct>
+                      <name>B0.1.CPC.uv.dps</name>
+                      <topology>B0.1.CPC.uv.dps</topology>
+                      <status>no_data</status>
+                      <storageCluster>
+                      <name>CEP4</name>
+                      <partition>/data/projects/</partition>
+                    </storageCluster>
+                    </lofar:uvDataProduct>
+                  </item>
+                </resultDataProducts>
+              </lofar:pipeline>
+            </item>
+          <item index="0">
+                <lofar:observation>
+                  <name>HD156279/1/TO</name>
+                  <description>HD156279/1/TO (Target Observation)</description>
+                  <topology>B0.1.T</topology>
+                  <predecessor_topology>B0.1.C</predecessor_topology>
+                  <currentStatus>
+                    <mom2:openedStatus/>
+                  </currentStatus>
+                  <lofar:observationAttributes>
+                    <observationId>
+                    </observationId>
+                    <name>HD156279/1/TO</name>
+                    <projectName>PREFACTOR</projectName>
+                    <instrument>Beam Observation</instrument>
+                    <defaultTemplate>BeamObservation</defaultTemplate>
+                    <tbbPiggybackAllowed>false</tbbPiggybackAllowed>
+                    <aartfaacPiggybackAllowed>false</aartfaacPiggybackAllowed>
+                    <userSpecification>
+                      <correlatedData>true</correlatedData>
+                      <coherentStokesData>false</coherentStokesData>
+                      <incoherentStokesData>false</incoherentStokesData>
+                      <antenna>LBA Outer</antenna>
+                      <clock mode="200 MHz"/>
+                      <instrumentFilter>30-90 MHz</instrumentFilter>
+                      <integrationInterval>1.0</integrationInterval>
+                      <channelsPerSubband>64</channelsPerSubband>
+                      <coherentDedisperseChannels>false</coherentDedisperseChannels>
+                      <tiedArrayBeams>
+                        <flyseye>false</flyseye>
+                      </tiedArrayBeams>
+                      <stokes>
+                        <integrateChannels>false</integrateChannels>
+                        <subbandsPerFileCS></subbandsPerFileCS>
+                        <numberCollapsedChannelsCS></numberCollapsedChannelsCS>
+                        <stokesDownsamplingStepsCS></stokesDownsamplingStepsCS>
+                        <whichCS></whichCS>
+                        <subbandsPerFileIS></subbandsPerFileIS>
+                        <numberCollapsedChannelsIS></numberCollapsedChannelsIS>
+                        <stokesDownsamplingStepsIS></stokesDownsamplingStepsIS>
+                        <whichIS></whichIS>
+                      </stokes>
+                      <stationSet>Custom</stationSet>
+                      <stations>CS001,CS002,CS003,CS004,CS005,CS006,CS007,CS011,CS013,CS017,CS021,CS024,CS026,CS028,CS030,CS031,CS032,CS101,CS103,CS201,CS301,CS302,CS401,CS501,RS106,RS205,RS208,RS210,RS305,RS306,RS307,RS310,RS406,RS407,RS409,RS503,RS508,RS509</stations>
+                      <timeFrame>UT</timeFrame>
+                      <startTime>2015-06-17T02:01:00</startTime>
+                      <endTime>2015-06-17T08:01:00</endTime>
+                      <duration>21600</duration>
+                      <bypassPff>false</bypassPff>
+                      <enableSuperterp>false</enableSuperterp>
+                      <numberOfBitsPerSample>8</numberOfBitsPerSample>
+                    </userSpecification>
+                  </lofar:observationAttributes>
+                  <children>
+<item index="0">
+                      <lofar:measurement xsi:type="lofar:BFMeasurementType">
+                        <name>HD156279</name>
+                        <description>HD156279</description>
+                        <topology>B0.1.T.SAP000</topology>
+                        <currentStatus>
+                          <mom2:openedStatus/>
+                        </currentStatus>
+                        <lofar:bfMeasurementAttributes>
+                          <measurementType>Target</measurementType>
+                          <specification>
+                            <targetName>HD156279</targetName>
+                            <ra>258.096666667</ra>
+                            <dec>63.3520833333</dec>
+                            <equinox>J2000</equinox>
+                            <duration>0</duration>
+                            <subbandsSpecification>
+                              <subbands>154..393</subbands>
+                            </subbandsSpecification>
+                          <tiedArrayBeams>
+                            <flyseye>false</flyseye>
+                          <nrTabRings>0</nrTabRings>
+                          <tabRingSize></tabRingSize>
+                            <tiedArrayBeamList>
+                              
+                            </tiedArrayBeamList>
+                          </tiedArrayBeams>
+                          </specification>
+                        </lofar:bfMeasurementAttributes>
+                        <resultDataProducts>
+                                          <item>
+                    <lofar:uvDataProduct>
+                    <name>B0.1.T.SAP000.uv.dps</name>
+                    <topology>B0.1.T.SAP000.uv.dps</topology>
+                    <status>no_data</status>
+                    <storageCluster>
+                      <name>CEP4</name>
+                      <partition>/data/projects/</partition>
+                    </storageCluster>
+                    </lofar:uvDataProduct>
+                  </item>
+                        </resultDataProducts>
+                      </lofar:measurement>
+                    </item>
+</children>
+                </lofar:observation>
+                </item>
+        <item index="0">
+              <lofar:pipeline xsi:type="lofar:AveragingPipelineType">
+                <topology>B0.1.PPT0</topology>
+                <predecessor_topology>B0.1.T</predecessor_topology>
+                <name>HD156279/1.0/TPP</name>
+                <description>HD156279/1.0/TPP (Preprocessing)</description>
+                <currentStatus>
+                  <mom2:openedStatus/>
+                </currentStatus>
+  <processingCluster>
+                    <name>CEP4</name>
+                    <partition>cpu</partition>
+                    <numberOfTasks>110</numberOfTasks>
+                    <minRAMPerTask unit="byte">1000000000</minRAMPerTask>
+                    <minScratchPerTask unit="byte">100000000</minScratchPerTask>
+                    <maxDurationPerTask>P7DT0S</maxDurationPerTask>
+                    <numberOfCoresPerTask>2</numberOfCoresPerTask>
+                    <runSimultaneous>true</runSimultaneous>
+                  </processingCluster>
+                <pipelineAttributes>
+                  <defaultTemplate>Preprocessing Pipeline</defaultTemplate>
+                  <flaggingStrategy>LBAdefault</flaggingStrategy>
+                  <duration>43200</duration>
+                  <demixingParameters>
+                    <averagingFreqStep>8</averagingFreqStep>
+                    <averagingTimeStep>1</averagingTimeStep>
+                    <demixFreqStep>8</demixFreqStep>
+                    <demixTimeStep>1</demixTimeStep>
+                    <demixAlways>CygA,CasA</demixAlways>
+                    <demixIfNeeded></demixIfNeeded>
+                    <ignoreTarget></ignoreTarget>
+                  </demixingParameters>
+<misc>{"storagemanager": "dysco"}</misc>
+</pipelineAttributes>
+                <usedDataProducts>
+                  <item>
+                    <lofar:uvDataProduct topology="B0.1.T.SAP000.uv.dps">
+                    </lofar:uvDataProduct>
+                  </item>
+                </usedDataProducts>
+                <resultDataProducts>
+                  <item>
+                    <lofar:uvDataProduct>
+                      <name>B0.1.PPT0.uv.dps</name>
+                      <topology>B0.1.PPT0.uv.dps</topology>
+                      <status>no_data</status>
+                      <storageCluster>
+                      <name>CEP4</name>
+                      <partition>/data/projects/</partition>
+                    </storageCluster>
+                    </lofar:uvDataProduct>
+                  </item>
+                </resultDataProducts>
+              </lofar:pipeline>
+            </item>
+        <item index="0">
+              <lofar:pipeline xsi:type="lofar:CalibrationPipelineType">
+                <topology>B0.1.PT0</topology>
+                <predecessor_topology>B0.1.CPTP,B0.1.CPC</predecessor_topology>
+                <name>HD156279/1.0/TP</name>
+                <description>HD156279/1.0/TP (Target Pipeline)</description>
+                <currentStatus>
+                  <mom2:openedStatus/>
+                </currentStatus>
+  <processingCluster>
+                    <name>CEP4</name>
+                    <partition>cpu</partition>
+                    <numberOfTasks>110</numberOfTasks>
+                    <minRAMPerTask unit="byte">1000000000</minRAMPerTask>
+                    <minScratchPerTask unit="byte">100000000</minScratchPerTask>
+                    <maxDurationPerTask>P7DT0S</maxDurationPerTask>
+                    <numberOfCoresPerTask>2</numberOfCoresPerTask>
+                    <runSimultaneous>true</runSimultaneous>
+                  </processingCluster>
+                <pipelineAttributes>
+                  <defaultTemplate>Calibration Pipeline Target</defaultTemplate>
+                  <flaggingStrategy>LBAdefault</flaggingStrategy>
+                  <duration>43200</duration>
+                  <skyModelDatabase>3C380</skyModelDatabase>
+                  <demixingParameters>
+                    <averagingFreqStep>8</averagingFreqStep>
+                    <averagingTimeStep>1</averagingTimeStep>
+                    <demixFreqStep>8</demixFreqStep>
+                    <demixTimeStep>1</demixTimeStep>
+                    <demixAlways>CygA,CasA</demixAlways>
+                    <demixIfNeeded></demixIfNeeded>
+                    <ignoreTarget></ignoreTarget>
+                  </demixingParameters>
+            <bbsParameters>
+              <baselines></baselines>
+              <correlations></correlations>
+              <beamModelEnable>true</beamModelEnable>
+              <solveParms></solveParms>
+              <solveUVRange></solveUVRange>
+              <strategyBaselines></strategyBaselines>
+              <strategyTimeRange></strategyTimeRange>
+            </bbsParameters>
+<misc>{"storagemanager": "dysco"}</misc>
+</pipelineAttributes>
+                <usedDataProducts>
+                  <item>
+                    <lofar:uvDataProduct topology="B0.1.PPT0.uv.dps">
+                    </lofar:uvDataProduct>
+                  </item>
+                </usedDataProducts>
+                <resultDataProducts>
+                  <item>
+                    <lofar:instrumentModelDataProduct>
+                      <name>B0.1.PT0.inst.dps</name>
+                      <topology>B0.1.PT0.inst.dps</topology>
+                      <status>no_data</status>
+                      <storageCluster>
+                      <name>CEP4</name>
+                      <partition>/data/projects/</partition>
+                    </storageCluster>
+                    </lofar:instrumentModelDataProduct>
+                  </item>
+                  <item>
+                    <lofar:uvDataProduct>
+                      <name>B0.1.PT0.uv.dps</name>
+                      <topology>B0.1.PT0.uv.dps</topology>
+                      <status>no_data</status>
+                      <storageCluster>
+                      <name>CEP4</name>
+                      <partition>/data/projects/</partition>
+                    </storageCluster>
+                    </lofar:uvDataProduct>
+                  </item>
+                </resultDataProducts>
+              </lofar:pipeline>
+            </item>
+<item index="0">
+        <lofar:pipeline xsi:type="lofar:ImagingPipelineType">
+          <topology>B0.PI0</topology>
+          <predecessor_topology>B0.1.PT0</predecessor_topology>
+          <name>HD156279/IM</name>
+          <description>HD156279/IM (Imaging pipeline beam 0)</description>
+          <currentStatus>
+            <mom2:openedStatus/>
+          </currentStatus>
+  <processingCluster>
+                    <name>CEP4</name>
+                    <partition>cpu</partition>
+                    <numberOfTasks>110</numberOfTasks>
+                    <minRAMPerTask unit="byte">1000000000</minRAMPerTask>
+                    <minScratchPerTask unit="byte">100000000</minScratchPerTask>
+                    <maxDurationPerTask>P7DT0S</maxDurationPerTask>
+                    <numberOfCoresPerTask>2</numberOfCoresPerTask>
+                    <runSimultaneous>true</runSimultaneous>
+                  </processingCluster>
+                <imagingPipelineAttributes>
+            <defaultTemplate>Imaging Pipeline LBA</defaultTemplate>
+            <duration>0</duration>
+            <nrOfOutputSkyImage>24</nrOfOutputSkyImage>
+            <imagingParameters>
+              <nrSlicesPerImage>1</nrSlicesPerImage>
+              <nrSubbandsPerImage>10</nrSubbandsPerImage>
+              <maxBaseline></maxBaseline>
+              <fieldOfView></fieldOfView>
+              <weight></weight>
+              <robust></robust>
+              <iterations></iterations>
+              <threshold></threshold>
+              <uvMin></uvMin>
+              <uvMax></uvMax>
+              <stokes></stokes>
+            </imagingParameters>
+
+          </imagingPipelineAttributes>
+                <usedDataProducts>
+                <item>
+              <lofar:uvDataProduct topology="B0.1.PT0.uv.dps">
+                <name>B0.1.PT0.uv.dps</name>
+              </lofar:uvDataProduct>
+            </item>
+               </usedDataProducts>
+                <resultDataProducts>
+                  <item>
+                    <lofar:skyImageDataProduct>
+                      <name>B0.PI0.dps</name>
+                      <topology>B0.PI0.dps</topology>
+                      <status>no_data</status>
+                      <storageCluster>
+                      <name>CEP4</name>
+                      <partition>/data/projects/</partition>
+                    </storageCluster>
+                    </lofar:skyImageDataProduct>
+                  </item>
+                </resultDataProducts>
+              </lofar:pipeline>
+            </item>
+</children>
+  </lofar:folder>
+  </item>
+</children>
+  </lofar:folder>
+  </item>
+          </children>
+  </lofar:project>