sortAstropyTable¶
-
lsst.daf.butler.cli.utils.
sortAstropyTable
(table: Table, dimensions: list[Dimension], sort_first: list[str] | None = None) → Table¶ 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.
Returns: astropy.table.Table
For convenience, the table that has been sorted.
- table :