Usage of splitListIntoContiguousLists

Return to directory of Todd's CASA extensions

Converts a list of integers into a list of contiguous lists, and optionally trim and recombine. Called by copyweights. See also splitListIntoHomogeneousLists.


au.splitListIntoContiguousLists(mylist, trim=0, recombine=False)
  • mylist: a python list
  • trim: the number of entries to trim from each edge of each contiguous list
  • recombine: if True, the recombine the contiguous lists (only relevant after trimming)


CASA <29>: au.splitListIntoContiguousLists([1,2,3,5,6,7])
  Out[29]: [[1, 2, 3], [5, 6, 7]]

-- Main.ToddHunter - 2013-09-08
Topic revision: r3 - 2015-08-07, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback