File tree Expand file tree Collapse file tree 1 file changed +19
-6
lines changed
Expand file tree Collapse file tree 1 file changed +19
-6
lines changed Original file line number Diff line number Diff line change 99
1010import analysisUtils as au
1111import numpy as np
12+ from packaging import version
1213from scipy .ndimage import label
1314
1415from . 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(' +
You can’t perform that action at this time.
0 commit comments