sp_validation.assembly.hats_collection

The v2 catalogue as one HATS collection: shapes, their ID index, PhotoPipe and spec-z.

COLLECTION/
├── shapes/                primary: the shape catalogue with OBJECT_ID
│                          (sp_validation.assembly.object_id)
├── shapes_OBJECT_ID/      index: OBJECT_ID -> pixel, the default index
├── photopipe/             extension data, a collection of its own, holding
│   ├── photopipe/         the PhotoPipe catalogue (sp_validation.assembly.photopipe_merge)
│   └── collection.properties
├── specz/                 extension data: the spec-z catalogue
│   ├── specz/             (sp_validation.assembly.specz_merge)
│   └── collection.properties
├── photopipe.properties   the extensions, each joined to the primary on OBJECT_ID
├── specz.properties
└── collection.properties

This is the layout hats_import’s extension split writes. Each extension file is on a pixel of the shapes. A PhotoPipe file holds the rows of the shape file in the same order; a spec-z file holds only the objects with a spectrum, in the same order, and a pixel without one has no file.

build writes it from a recipe (config/assembly/) naming the inputs and the collection:

  • shapes: the shape HATS catalogue;

  • photopipe_extract: the PhotoPipe column extract (scripts/assembly/extract_photopipe.py);

  • specz_matches, specz_compilation: PhotoPipe’s match of DR6 objects to spectra and the redshift compilation it used (sp_validation.assembly.specz_merge);

  • collection: the directory to write.

EXTENSIONS = {'photopipe': 'photometry', 'specz': 'redshifts'}

Each extension’s name and the kind of data it serves.

build(recipe, workers=1)[source]

Write the collection the recipe file recipe describes.

Writes the shapes with OBJECT_ID, then the PhotoPipe extension from them, then the spec-z extension from that, then the OBJECT_ID index and every properties file. A part already written (its catalogue’s hats.properties exists) is kept, so remove it to rewrite it and what is built from it.

index(collection, workers=1)[source]

Index COLLECTION/shapes on OBJECT_ID and list the extensions.

Writes the index and every properties file of the collection; the index is rebuilt on every run.