def lsms(musthave=[], mspat="*[-_.][Mm][Ss]", combine='or', remind=True,
Summarize measurement sets matching certain criteria.
musthave: A list of columns, subtables, or keywords that must be in the MS.
If [] (default), the list of optional columns, subtables, and
keywords of each MS will be printed. Any entries will be
mspat: A filename pattern, relative to the current directory, that the
directory names matching of the MSes must match.
Default: '*[-_.][Mm][Ss]'
Tip: Try '**/*.ms' to find *.ms in . and all its subdirectories.
combine : Controls whether the conditions of musthave are combined with
remind: If True (default), print all columns and keywords of optional
subtables, not just the optional ones.
sortfirst: If sortfirst=True, print the matching MSes in alphabetical order.
Otherwise, print each one as soon as it is found.
Note that to fit in better with *sh behavior the argument order is reversed
when calling from a non-python shell. i.e. if you enter
lsms \*_MS source polarization
in a *sh session, it will run with
mspat='*_MS' and musthave=['SOURCE', 'POLARIZATION'].
(remember to quote wildcards to avoid sh expansion)
if type(musthave) == str:
musthave = [s.replace(',', '') for s in musthave.split()]
msdict, use_tb = matchingMSes(musthave, mspat, combine, remind,
not sortfirst, not sortfirst)
locale.setlocale(locale.LC_ALL, '')
mses.sort(locale.strcoll)