Coverage for /wheeldirectory/casa-6.7.0-12-py3.10.el8/lib/py/lib/python3.10/site-packages/casatasks/private/task_listobs.py: 16%
25 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
1import os
3from casatools import ms
4from casatasks import casalog
6def listobs(
7 vis, selectdata, spw, field, antenna, uvrange,
8 timerange, correlation, scan, intent, feed,
9 array, observation, verbose, listfile,
10 listunfl, cachesize, overwrite
11):
13 """List data set summary in the logger:
15 Lists following properties of a measurement set:
16 scan list, field list, spectral window list with
17 correlators, antenna locations, ms table information.
19 Keyword arguments:
20 vis -- Name of input visibility file
21 default: none. example: vis='ngc5921.ms'
22 selectdata -- select data from the MS
23 verbose -- level of detail
24 verbose=True: (default); scan and antenna lists
25 verbose=False: less information
26 listfile -- save the output in a file
27 default: none. Example: listfile="mylist.txt"
29 """
31 casalog.origin('listobs')
33 try:
34 myms = ms()
35 myms.open(thems=vis, check=True)
37 sel = {}
38 if (selectdata):
39 sel['spw'] = spw
40 sel['time'] = timerange
41 sel['field'] = field
42 sel['baseline'] = antenna
43 sel['scan'] = scan
44 sel['scanintent'] = intent
45 sel['polarization'] = correlation
46 sel['uvdist'] = uvrange
47 sel['observation'] = str(observation)
48 sel['array'] = array
49 sel['feed'] = feed
51 # Select the data. Only-parse is set to false.
52 myms.msselect(sel, False)
53 obs_dict = myms.summary(
54 verbose=verbose, listfile=listfile, listunfl=listunfl,
55 cachesize=cachesize, overwrite=overwrite, wantreturn=True
56 )
57 return obs_dict
58 finally:
59 myms.close()