sortAstropyTable¶
- lsst.daf.butler.cli.utils.sortAstropyTable(table: Table, dimensions: list[Dimension], sort_first: list[str] | None = None) Table ¶
Sort an astropy table.
Prioritization is given to columns in this order:
the provided named columns
spatial and temporal columns
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.