diff --git a/.gitattributes b/.gitattributes index feb40a736850b88dd4e856b04d0fb63e711235b4..ea236e68000cbb062b626a9926bf19b382f7dc20 100644 --- a/.gitattributes +++ b/.gitattributes @@ -749,6 +749,7 @@ CEP/DP3/DPPP/include/DPPP/SourceDBUtil.h -text CEP/DP3/DPPP/include/DPPP/Stokes.h -text CEP/DP3/DPPP/include/DPPP/SubtractMixed.h -text CEP/DP3/DPPP/package.dox -text +CEP/DP3/DPPP/share/LBAdefault -text CEP/DP3/DPPP/src/Apply.cc -text CEP/DP3/DPPP/src/BandpassCorrector.cc -text CEP/DP3/DPPP/src/ComplexMedianFlagger.cc -text diff --git a/CEP/DP3/DPPP/CMakeLists.txt b/CEP/DP3/DPPP/CMakeLists.txt index 65009d6ac003cb48a0895f753af401b8abd901a3..d016b93227f1777302c83527fc40c5572d28c55c 100644 --- a/CEP/DP3/DPPP/CMakeLists.txt +++ b/CEP/DP3/DPPP/CMakeLists.txt @@ -7,4 +7,5 @@ lofar_find_package(Casacore COMPONENTS casa ms tables REQUIRED) add_subdirectory(include/DPPP) add_subdirectory(src) +add_subdirectory(share) add_subdirectory(test) diff --git a/CEP/DP3/DPPP/share/CMakeLists.txt b/CEP/DP3/DPPP/share/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..be25d40163202acd3b44af80392a324916baa639 --- /dev/null +++ b/CEP/DP3/DPPP/share/CMakeLists.txt @@ -0,0 +1,6 @@ +# $Id$ + +# Data files +install(FILES + LBAdefault + DESTINATION share/rfistrategies) diff --git a/CEP/DP3/DPPP/share/LBAdefault b/CEP/DP3/DPPP/share/LBAdefault new file mode 100644 index 0000000000000000000000000000000000000000..200dc2f961748cd3b7ea90b75ae4afc4a5f3c0c5 --- /dev/null +++ b/CEP/DP3/DPPP/share/LBAdefault @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- This is a Strategy configuration file for the +rfi detector by André Offringa (offringa@astro.rug.nl). +It is the default strategy for LBA observations. +--> +<rfi-strategy format-version="3.7" reader-version-required="3.4"> + <action type="Strategy"> + <children> + <action type="SetFlaggingAction"> + <new-flagging>0</new-flagging> + </action> + <action type="ForEachPolarisationBlock"> + <on-xx>1</on-xx> + <on-xy>1</on-xy> + <on-yx>1</on-yx> + <on-yy>1</on-yy> + <on-stokes-i>0</on-stokes-i> + <on-stokes-q>0</on-stokes-q> + <on-stokes-u>0</on-stokes-u> + <on-stokes-v>0</on-stokes-v> + <children> + <action type="ForEachComplexComponentAction"> + <on-amplitude>1</on-amplitude> + <on-phase>0</on-phase> + <on-real>0</on-real> + <on-imaginary>0</on-imaginary> + <restore-from-amplitude>0</restore-from-amplitude> + <children> + <action type="IterationBlock"> + <iteration-count>2</iteration-count> + <sensitivity-start>4</sensitivity-start> + <children> + <action type="SumThresholdAction"> + <base-sensitivity>1</base-sensitivity> + <time-direction-flagging>1</time-direction-flagging> + <frequency-direction-flagging>0</frequency-direction-flagging> + </action> + <action type="CombineFlagResults"> + <children> + <action type="FrequencySelectionAction"> + <threshold>3</threshold> + </action> + <action type="TimeSelectionAction"> + <threshold>3.5</threshold> + </action> + </children> + </action> + <action type="SetImageAction"> + <new-image>1</new-image> + </action> + <action type="ChangeResolutionAction"> + <time-decrease-factor>3</time-decrease-factor> + <frequency-decrease-factor>3</frequency-decrease-factor> + <restore-revised>1</restore-revised> + <restore-masks>0</restore-masks> + <children> + <action type="HighPassFilterAction"> + <horizontal-kernel-sigma-sq>2.5</horizontal-kernel-sigma-sq> + <vertical-kernel-sigma-sq>5</vertical-kernel-sigma-sq> + <window-width>21</window-width> + <window-height>31</window-height> + <mode>1</mode> + </action> + </children> + </action> + </children> + </action> + <action type="SumThresholdAction"> + <base-sensitivity>1</base-sensitivity> + <time-direction-flagging>1</time-direction-flagging> + <frequency-direction-flagging>0</frequency-direction-flagging> + </action> + </children> + </action> + </children> + </action> + <action type="PlotAction"> + <plot-kind>5</plot-kind> + <logarithmic-y-axis>0</logarithmic-y-axis> + </action> + <action type="SetFlaggingAction"> + <new-flagging>4</new-flagging> + </action> + <action type="StatisticalFlagAction"> + <enlarge-frequency-size>0</enlarge-frequency-size> + <enlarge-time-size>0</enlarge-time-size> + <max-contaminated-frequencies-ratio>0.5</max-contaminated-frequencies-ratio> + <max-contaminated-times-ratio>0.5</max-contaminated-times-ratio> + <minimum-good-frequency-ratio>0.2</minimum-good-frequency-ratio> + <minimum-good-time-ratio>0.2</minimum-good-time-ratio> + </action> + <action type="TimeSelectionAction"> + <threshold>3.5</threshold> + </action> + <action type="BaselineSelectionAction"> + <preparation-step>1</preparation-step> + <flag-bad-baselines>0</flag-bad-baselines> + <threshold>8</threshold> + <smoothing-sigma>0.6</smoothing-sigma> + <abs-threshold>0.4</abs-threshold> + <make-plot>0</make-plot> + </action> + <action type="SetFlaggingAction"> + <new-flagging>6</new-flagging> + </action> + <action type="WriteFlagsAction" /> + <action type="PlotAction"> + <plot-kind>0</plot-kind> + <logarithmic-y-axis>0</logarithmic-y-axis> + </action> + <action type="PlotAction"> + <plot-kind>1</plot-kind> + <logarithmic-y-axis>0</logarithmic-y-axis> + </action> + </children> + </action> +</rfi-strategy> diff --git a/CEP/DP3/DPPP/src/MSWriter.cc b/CEP/DP3/DPPP/src/MSWriter.cc index 3885e81de0e716f83b3b5782b8c0b93e54236d69..5a3f6b5cf9f382d80d02cfec564a4acbb1fd3284 100644 --- a/CEP/DP3/DPPP/src/MSWriter.cc +++ b/CEP/DP3/DPPP/src/MSWriter.cc @@ -64,7 +64,7 @@ namespace LOFAR { NSTimer::StartStop sstime(itsTimer); // Get tile size (default 1024 KBytes). uint tileSize = parset.getUint (prefix+"tilesize", 1024); - uint tileNChan = parset.getUint (prefix+"tilenchan", info.nchan()); + uint tileNChan = parset.getUint (prefix+"tilenchan", 0); itsOverwrite = parset.getBool (prefix+"overwrite", false); itsCopyCorrData = parset.getBool (prefix+"copycorrecteddata", false); itsCopyModelData = parset.getBool (prefix+"copymodeldata", false); @@ -75,6 +75,9 @@ namespace LOFAR { ASSERTSTR (itsDataColName == "DATA", "Currently only the DATA column" " can be used as output"); // Create the MS. + if (tileNChan <= 0) { + tileNChan = info.nchan(); + } createMS (outName, info, tileSize, tileNChan); // Write the parset info into the history. writeHistory (itsMS, parset.parameterSet());