Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/private/task_imstat.py: 18%
17 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 18:48 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 18:48 +0000
3from casatools import image, regionmanager, coordsys
4from casatasks import casalog
7def imstat(
8 imagename, axes, region, box, chans,
9 stokes, listit, verbose, mask, stretch,
10 logfile, append, algorithm, fence, center,
11 lside, zscore, maxiter, clmethod, niter
12):
13 _myia = image()
14 _myrg = regionmanager()
15 _mycs = coordsys()
16 try:
17 casalog.origin('imstat')
18 _myia.open(imagename)
19 _mycs = _myia.coordsys()
20 csrec = _mycs.torecord()
21 shape = _myia.shape()
22 reg = _myrg.frombcs(
23 csrec, shape,
24 box, chans, stokes, "a", region
25 )
26 return _myia.statistics(
27 axes=axes, region=reg, list=listit,
28 verbose=verbose, robust=True, mask=mask,
29 stretch=stretch, logfile=logfile, append=append,
30 algorithm=algorithm, fence=fence, center=center,
31 lside=lside, zscore=zscore, maxiter=maxiter,
32 clmethod=clmethod, niter=niter
33 )
35 finally:
36 _myia.done()
37 _myrg.done()
38 _mycs.done()