Skip to content

Commit ecae707

Browse files
uvcontsub version restored in casaVisRoutines.py
1 parent bbed495 commit ecae707

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

phangsPipeline/casaVisRoutines.py

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import analysisUtils as au
1111
import numpy as np
12+
from packaging import version
1213
from scipy.ndimage import label
1314

1415
from . import casaStuff
@@ -445,12 +446,24 @@ def contsub(
445446
)
446447

447448
# uvcontsub, this outputs infile+'.contsub'
448-
uvcontsub_params = {
449-
'vis': infile,
450-
'outputvis': outfile,
451-
'fitspec': spw_flagging_string,
452-
'fitorder': fitorder,
453-
'fitmethod': 'gsl'} # or 'casacore'
449+
# Pre 6.5.2
450+
if version.parse(casaStuff.casa_version_str) < version.parse('6.5.2'):
451+
uvcontsub_params = {
452+
'vis': infile,
453+
'fitspw': spw_flagging_string,
454+
'excludechans': False, # now uses complement for channel selection.
455+
'combine': combine,
456+
'fitorder': fitorder,
457+
'solint': solint,
458+
'want_cont': False}
459+
# Post 6.5.2
460+
else:
461+
uvcontsub_params = {
462+
'vis': infile,
463+
'outputvis': outfile,
464+
'fitspec': spw_flagging_string,
465+
'fitorder': fitorder,
466+
'fitmethod': 'gsl'} # or 'casacore'
454467

455468
logger.info(
456469
"... running CASA "+'uvcontsub(' +

0 commit comments

Comments
 (0)