sortAstropyTable¶
- lsst.daf.butler.cli.utils.sortAstropyTable(table, dimensions, sort_first=None)¶
Sort an astropy table, with prioritization given to columns in this order: 1. the provided named columns 2. spatial and temporal columns 3. the rest of the columns
The table is sorted in-place, and is also returned for convenience.
- Parameters:
- table
astropy.table.Table
The table to sort
- dimensions
list
[Dimension
] The dimensions of the dataIds in the table (the dimensions should be the same for all the dataIds). Used to determine if the column is spatial, temporal, or neither.
- sort_first
list
[str
] The names of columns that should be sorted first, before spatial and temporal columns.
- table
- Returns:
astropy.table.Table
For convenience, the table that has been sorted.