Skip to content

Commit

Permalink
Fix politsiyakat (#611)
Browse files Browse the repository at this point in the history
- Add tests for politsiyakat to kat 7 reduction
- fixes for politsiyakat run.py files

Co-authored-by: sphemakh <[email protected]>
  • Loading branch information
bennahugo and SpheMakh authored May 11, 2020
1 parent 733cef3 commit b036a01
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stimela/cargo/cab/politsiyakat_autocorr_amp/src/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"-s antenna_mod",
kwargs]

_runc = " ".join([cab['binary']] + ARGS)
_runc = " ".join([cab['binary']] + ARGS)
try:
subprocess.check_call(shlex.split(_runc))
finally:
Expand Down
3 changes: 1 addition & 2 deletions stimela/cargo/cab/politsiyakat_cal_phase/src/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import json
import yaml
import subprocess
import shutil
import shlex
import shutil
import glob

CONFIG = os.environ["CONFIG"]
Expand Down Expand Up @@ -35,7 +35,6 @@
kwargs]

_runc = " ".join([cab['binary']] + ARGS)

try:
subprocess.check_call(shlex.split(_runc))
finally:
Expand Down
23 changes: 23 additions & 0 deletions stimela/tests/acceptance_tests/stimela-test-kat7.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,16 @@ def testEndToEndReduction(self):
time_out=300)

# Flag the autocorrelations
recipe.add("cab/politsiyakat_autocorr_amp", "flag_autopower", {
"msname": MS,
"field": "0,1,2",
"cal_field": "0,2",
"nrows_chunk": 5000,
"scan_to_scan_threshold": 1.5,
"antenna_to_group_threshold": 4,
"nio_threads": 1,
"nproc_threads": 32,
},input=INPUT, output=OUTPUT, label="flag_autopower")

recipe.add('cab/casa_flagdata', 'autocorr_flagging', {
"vis": MS,
Expand Down Expand Up @@ -271,6 +281,19 @@ def testEndToEndReduction(self):
label='applycal_bp:: Apply calibration to Bandpass Calibrator',
time_out=1800)

# Flag the phase
recipe.add("cab/politsiyakat_cal_phase", "flag_calphase", {
"msname": MS,
"field": ",".join(["0","1","2"]),
"cal_field": ",".join(["0","2"]),
"nrows_chunk": 5000,
"data_column": "CORRECTED_DATA",
"scan_to_scan_threshold": 1.5,
"baseline_to_group_threshold": 4,
"nio_threads": 1,
"nproc_threads": 32,
},input=INPUT, output=OUTPUT, label="flag_calphase")

recipe.run()

recipe = stimela.Recipe('KAT reduction script 2',
Expand Down
1 change: 1 addition & 0 deletions stimela/tests/acceptance_tests/stimela-test-meerkat.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def testEndToEndReduction(self):
global INPUT, OUTPUT, MSDIR, MS, LABEL
recipe = stimela.Recipe('Test reduction script',
ms_dir=MSDIR, JOB_TYPE="docker", log_dir="logs")

imname1 = "deep2.1gc"
imname2 = "deep2.2gc"
recipe.add("cab/ddfacet", "ddfacet_test1",
Expand Down

0 comments on commit b036a01

Please sign in to comment.