Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/private/task_imhistory.py: 23%
13 statements
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 17:39 +0000
« prev ^ index » next coverage.py v7.6.4, created at 2024-10-31 17:39 +0000
2from casatools import image
3from .. import casalog
5def imhistory(
6 imagename, mode, verbose, origin, message
7):
8 _myia = image()
9 try:
10 casalog.origin('imhistory')
11 _myia.open(imagename)
12 if mode.startswith("l") or mode.startswith("L"):
13 return _myia.history(verbose)
14 elif mode.startswith("a") or mode.startswith("A"):
15 return _myia.sethistory(origin=origin, history=message)
16 raise ValueError("Unsopported mode " + mode)
18 finally:
19 _myia.done()