Skip to content
Snippets Groups Projects
Commit 92ab0094 authored by Ger van Diepen's avatar Ger van Diepen
Browse files

Task #3671 Added test script for demix selection

parent ee6e8cd6
No related branches found
No related tags found
No related merge requests found
...@@ -786,6 +786,7 @@ CEP/DP3/DPPP/src/taqlflagger -text ...@@ -786,6 +786,7 @@ CEP/DP3/DPPP/src/taqlflagger -text
CEP/DP3/DPPP/test/CS1_IDPPP.log_prop -text CEP/DP3/DPPP/test/CS1_IDPPP.log_prop -text
CEP/DP3/DPPP/test/CS1_IDPPP.parset -text CEP/DP3/DPPP/test/CS1_IDPPP.parset -text
CEP/DP3/DPPP/test/tNDPPP.in_MS.tgz -text svneol=unset#application/x-compressed-tar CEP/DP3/DPPP/test/tNDPPP.in_MS.tgz -text svneol=unset#application/x-compressed-tar
CEP/DP3/DPPP/test/testdemixfilter -text
CEP/DP3/DPPP/test/tmwflagger.in_cd -text CEP/DP3/DPPP/test/tmwflagger.in_cd -text
CEP/DP3/DPPP/test/tmwflagger.in_vd -text CEP/DP3/DPPP/test/tmwflagger.in_vd -text
CEP/GSM/bremen/Makefile -text CEP/GSM/bremen/Makefile -text
......
#!/bin/sh
# This script tests if selection in a demix gives the same result as demixing
# a selection.
# Make a selection of the MS (core stations only)
msselect in=L29067_SAP000_SB069_uv.MS out=demix.sel.ms baseline='CS*&'
# Do simple averaging of the rest of the MS.
cat > demix.avg.ps <<EOF
msin = L29067_SAP000_SB069_uv.MS
msin.startchan = 2
msin.nchan=60
msin.baseline=!CS*&
msout=demix.avg.ms
msout.overwrite=true
steps=[avg]
avg.type=averager
avg.freqstep=30
avg.timestep=5
EOF
NDPPP demix.avg.ps
# Do the demixing of the MS selection.
# Create an empty instrument model.
parmdbm <<EOF
create table='demix.inst.pdb1'
adddef gain values=1
EOF
cat > demix.sel.demix.ps <<EOF
msin = demix.sel.ms
msin.startchan = 2
msin.nchan=60
msout=demix.sel.demix.ms
msout.overwrite=true
steps=[demix]
demix.type=demixer
demix.subtractsources=[CasA,CygA]
#demix.targetsource=3C196
demix.skymodel=sky.pdb
demix.instrumentmodel=demix.inst.pdb1
demix.demixfreqstep=60
demix.demixtimestep=10
demix.freqstep=30
demix.timestep=5
demix.ntimechunk=4
EOF
NDPPP demix.sel.demix.ps
# Do the demixing of the entire MS using a selection.
# Create an empty instrument model.
parmdbm <<EOF
create table='demix.inst.pdb2'
adddef gain values=1
EOF
cat > demix.demixsel.ps <<EOF
msin = L29067_SAP000_SB069_uv.MS
msin.startchan = 2
msin.nchan=60
msout=demix.demixsel.ms
msout.overwrite=true
steps=[demix]
demix.type=demixer
demix.subtractsources=[CasA,CygA]
demix.skymodel=sky.pdb
demix.instrumentmodel=demix.inst.pdb2
demix.baseline=CS*&
demix.demixfreqstep=60
demix.demixtimestep=10
demix.freqstep=30
demix.timestep=5
demix.ntimechunk=2
EOF
NDPPP demix.demixsel.ps
# Select the baselines from the last demix result and check if equal to first demix.
msselect in=demix.demixsel.ms out=demix.demixsel.sel.ms baseline='CS*&'
taql 'select t1.DATA,t2.DATA as td from demix.sel.demix.ms t1, demix.demixsel.sel.ms t2 where !all((isnan(t1.DATA) && isnan(t2.DATA)) or t1.DATA=t2.DATA) limit 10'
taql 'select t1.DATA,t2.DATA as td from demix.sel.demix.ms t1, demix.demixsel.sel.ms t2 where t1.ANTENNA1 != t2.ANTENNA1 or t1.ANTENNA2 != t2.ANTENNA2'
# Select the non-demixed baselines from the last demix result and check if equal
# to the averaged selection.
msselect in=demix.demixsel.ms out=demix.demixsel.rest.ms baseline='!CS*&'
taql 'select t1.DATA,t2.DATA as td from demix.avg.ms t1, demix.demixsel.rest.ms t2 where !all((isnan(t1.DATA) && isnan(t2.DATA)) or t1.DATA=t2.DATA) limit 10'
taql 'select t1.DATA,t2.DATA as td from demix.avg.ms t1, demix.demixsel.rest.ms t2 where t1.ANTENNA1 != t2.ANTENNA1 or t1.ANTENNA2 != t2.ANTENNA2'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment