sp_validation.assembly.object_id¶
The DR6 object ID as one column, and the collection’s shapes that carry it.
Stephen Gwyn’s DR6 numbers objects within a tile: TILE_ID (a double such as
194.248, the tile 194.248) and NUMBER. OBJECT_ID packs the pair into
one int64, 10**6 * 194248 + NUMBER, so a HATS index can be built on it. Rows
with no DR6 number (NUMBER < 0) have a null OBJECT_ID.
write_shapes writes the shape catalogue into the collection as
COLLECTION/shapes, each pixel file with OBJECT_ID after NUMBER.
- object_id(tile_id, number)[source]¶
Return the
OBJECT_IDarray ofTILE_IDandNUMBERarrays.The tile is
TILE_IDtimes 1000 rounded to the nearest integer, so a tile such as 24.237, stored as 24.236999…, gives 24237.
- _encodings(file)[source]¶
Return the
ParquetWriterarguments that reproduce the column encodings offile, withOBJECT_IDencoded as_healpix_29is.
- add_to_pixel(source, output)[source]¶
Rewrite one pixel file with
OBJECT_ID, keeping its rows, row groups, column encodings and schema metadata.
- write_shapes(source, collection, workers=1)[source]¶
Write the shape HATS catalogue
sourceasCOLLECTION/shapes.Each pixel file gains
OBJECT_IDand keeps its rows in order. The partitioning, sky maps and properties are those ofsource, namedshapes, withOBJECT_IDamong the default columns, whichlsdb’sid_searchneeds.