Commits
1 - | from __future__ import absolute_import |
2 1 | import os |
3 2 | import math |
4 3 | import shutil |
5 4 | import string |
6 5 | import time |
7 6 | import re |
8 7 | import copy |
9 8 | from typing import TYPE_CHECKING |
10 - | from casatasks.private.casa_transition import is_CASA6 |
11 - | |
12 - | if is_CASA6: |
13 - | from casatools import ( |
14 - | synthesisimager, |
15 - | synthesisdeconvolver, |
16 - | synthesisnormalizer, |
17 - | iterbotsink, |
18 - | ctsys, |
19 - | table, |
20 - | image, |
21 - | ) |
22 - | from casatasks import casalog |
23 - | from casatasks.private.imagerhelpers.summary_minor import SummaryMinor |
24 - | if TYPE_CHECKING: |
25 - | from casatasks.private.imagerhelpers.input_parameters import ImagerParameters |
26 - | |
27 - | ctsys_hostinfo = ctsys.hostinfo |
28 - | _tb = table() |
29 - | _ia = image() |
30 - | else: |
31 - | from taskinit import * |
32 - | from imagerhelpers.summary_minor import SummaryMinor |
33 - | if TYPE_CHECKING: |
34 - | from imagerhelpers.input_parameters import ImagerParameters |
35 - | |
36 - | synthesisimager = casac.synthesisimager |
37 - | synthesisdeconvolver = casac.synthesisdeconvolver |
38 - | synthesisnormalizer = casac.synthesisnormalizer |
39 - | # make it look like the CASA6 version even though it's using the CASA5 named tool not present in CASA6 |
40 - | iterbotsink = casac.synthesisiterbot |
41 - | |
42 - | ctsys_hostinfo = casac.cu.hostinfo |
43 - | |
44 - | _tb = tb |
9 + | |
10 + | from casatools import ( |
11 + | synthesisimager, |
12 + | synthesisdeconvolver, |
13 + | synthesisnormalizer, |
14 + | iterbotsink, |
15 + | ctsys, |
16 + | table, |
17 + | image, |
18 + | ) |
19 + | from casatasks import casalog |
20 + | from casatasks.private.imagerhelpers.summary_minor import SummaryMinor |
21 + | if TYPE_CHECKING: |
22 + | from casatasks.private.imagerhelpers.input_parameters import ImagerParameters |
23 + | |
24 + | ctsys_hostinfo = ctsys.hostinfo |
25 + | _tb = table() |
26 + | _ia = image() |
27 + | |
45 28 | """ |
46 29 | A set of helper functions for tclean. |
47 30 | |
48 31 | Summary... |
49 32 | |
50 33 | """ |
51 34 | |
52 35 | ############################################# |
53 36 | class PySynthesisImager: |
54 37 | |