Commits
Wataru Kawasaki authored and Ville Suoranta committed 08d63374fd0 Merge
30 30 | |
31 31 | try: |
32 32 | # CAS-12985 requests the following params be given case insensitively, |
33 33 | # so they need to be converted to lowercase here (2021/1/28 WK) |
34 34 | blfunc = blfunc.lower() |
35 35 | blmode = blmode.lower() |
36 36 | fftmethod = fftmethod.lower() |
37 37 | if isinstance(fftthresh, str): |
38 38 | fftthresh = fftthresh.lower() |
39 39 | |
40 + | if (spw == ''): |
41 + | spw = '*' |
42 + | |
40 43 | if not os.path.exists(infile): |
41 44 | raise ValueError("infile='" + str(infile) + "' does not exist.") |
42 45 | if (outfile == '') or not isinstance(outfile, str): |
43 46 | outfile = infile.rstrip('/') + '_bs' |
44 47 | casalog.post("outfile is empty or non-string. set to '" + outfile + "'") |
45 48 | if (not overwrite) and dosubtract and os.path.exists(outfile): |
46 49 | raise ValueError("outfile='%s' exists, and cannot overwrite it." % (outfile)) |
47 - | |
48 - | if (maskmode == 'interact'): |
49 - | raise ValueError("maskmode='%s' is not supported yet" % maskmode) |
50 50 | if (blfunc == 'variable') and not os.path.exists(blparam): |
51 51 | raise ValueError("input file '%s' does not exists" % blparam) |
52 52 | |
53 - | if (spw == ''): |
54 - | spw = '*' |
55 - | |
56 53 | if (blmode == 'fit'): |
57 54 | temp_outfile = _do_fit(infile, datacolumn, antenna, field, spw, timerange, scan, |
58 55 | pol, intent, reindex, maskmode, thresh, avg_limit, minwidth, |
59 56 | edge, dosubtract, blformat, bloutput, blfunc, order, npiece, |
60 57 | applyfft, fftmethod, fftthresh, addwn, rejwn, clipthresh, |
61 58 | clipniter, blparam, verbose, updateweight, sigmavalue, |
62 59 | outfile, overwrite) |
63 60 | elif (blmode == 'apply'): |
64 61 | _do_apply(infile, datacolumn, antenna, field, spw, timerange, scan, pol, intent, |
65 62 | reindex, bltable, updateweight, sigmavalue, outfile, overwrite) |