@ -199,12 +199,18 @@ class TTC(unittest.TestCase):
@@ -199,12 +199,18 @@ class TTC(unittest.TestCase):
# Compare the generated lisfile MS with the known-good one
# We use the jplotter helper for this
#
# Select amp/phas vs freq from three different scans and sum them up.
# We expect the sum to be numerically identical between the known-good dataset
# and the newly created one
__es085a_comparison__ = " indexr; scan 18 19 33; pt anpfreq; avt sum; solint none; "
def testAA ( self ) :
rv = None
cmd = " {python} {compare} {gold_ms} es085a_cont.ms " . format (
python = options . binaries . python ,
compare = os . path . join ( TTC . __rootdir__ , " ../python " , " compare_MS_numerically.py " ) ,
gold_ms = os . path . join ( TTC . __rootdir__ , " es085a_cont.ms " ) )
cmd = " {python} {compare} ' {selection} ' {gold_ms} es085a_cont.ms " . format (
python = options . binaries . python ,
compare = os . path . join ( TTC . __rootdir__ , " ../python " , " compare_MS_numerically.py " ) ,
selection = TTC . __es085a_comparison__ ,
gold_ms = os . path . join ( TTC . __rootdir__ , " es085a_cont.ms " ) )
# we need to prepare the environment
jplEnv = copy . deepcopy ( os . environ )
# Make sure the pythonpath to jplotter is added
@ -257,10 +263,14 @@ class TTC(unittest.TestCase):
@@ -257,10 +263,14 @@ class TTC(unittest.TestCase):
def testBA ( self ) :
rv = None
cmd = " {python} {compare} {gold_ms} es085a.ms " . format (
python = options . binaries . python ,
compare = os . path . join ( TTC . __rootdir__ , " ../python " , " compare_MS_numerically.py " ) ,
#gold_ms = os.path.join(TTC.__rootdir__, "es085a-hack.ms") )
cmd = " {python} {compare} ' {selection} ' {gold_ms} es085a.ms " . format (
python = options . binaries . python ,
compare = os . path . join ( TTC . __rootdir__ , " ../python " , " compare_MS_numerically.py " ) ,
selection = TTC . __es085a_comparison__ ,
# this "-hack" MeasurementSet has one visibility modified (row 0, datapoint 0) by ~1x10-6
# and later had one row duplicated - i.e. one visibility extra on one baseline for
# one source for one spectral window
#gold_ms = os.path.join(TTC.__rootdir__, "es085a-hack.ms") )
gold_ms = os . path . join ( TTC . __rootdir__ , " es085a.ms " ) )
# we need to prepare the environment
jplEnv = copy . deepcopy ( os . environ )
@ -326,6 +336,13 @@ class TTC(unittest.TestCase):
@@ -326,6 +336,13 @@ class TTC(unittest.TestCase):
- - ms es085a_cont . ms - - ms es085a . ms - - idi ES085A_CONT . IDI - - idi ES085A . IDI " .format(
python = options . binaries . python ,
verify = os . path . join ( TTC . __rootdir__ , " ../jive-toolchain-verify/compare-ms-idi.py " ) ,
# the "-hack" MeasurementSet has one visibility modified (row 0, datapoint 0) by ~1x10-6
# and later had one row duplicated - i.e. one 2second visibility extra on one baseline for
# one source for one spectral window.
# This test should fail with a report showing 2s of data missing from the produced
# data sets compared to the "gold" MS on Baseline McIb source 3c345 ...
# (and reporting different number of integrations 156 in stead of 155)
#gold_ms = os.path.join(TTC.__rootdir__, "es085a-hack.ms"),
gold_ms = os . path . join ( TTC . __rootdir__ , " es085a_cont.ms " ) ,
gold_idi = os . path . join ( TTC . __rootdir__ , " ES085A_CONT.IDI " ) ,
)