sp_validation.nz.inputs

Inputs of the SOM n(z): source photometry and the spectroscopic calibrators.

Both come from PhotoPipe’s run on Stephen Gwyn’s DR6 detections, so sources and calibrators share one photometry. Sources are the rows of a calibrated shear catalogue; each takes its photometry from the v2 collection (shapes with their PhotoPipe extension, sp_validation.assembly.hats_collection) by its DR6 object ID. Calibrators are the objects of the same collection that its spec-z extension gives a spectrum from the recipe’s surveys.

@sc [decision:nz.photometry_as_delivered]

NO_ID = -2

status of a source the photometry was not looked up for or lacks.

UNMATCHED = -1

status of a source the photometry was not looked up for or lacks.

calibrators(photometry, surveys, field, z_min, offset, workers=1)[source]

Return the calibration sample: spectra from surveys in field with complete ugriz.

photometry is the collection, whose spec-z extension gives each object its matched spectrum (Z_SPEC, Z_SPEC_SURVEY, and the spectrum’s own position Z_SPEC_RA, Z_SPEC_DEC). field bounds that position, {"ra": [min, max], "dec": [min, max]} in degrees: a survey can observe several fields, selected differently. Z_B and the magnitudes come from the PhotoPipe extension of the same collection (the reader joins the extensions on OBJECT_ID). A spectrum matched to several objects, as in overlapping tiles, is kept once, at the lowest OBJECT_ID; the copies are told apart by their position, which the extension carries bit for bit from the compilation. Missing z is filled from z2 + offset, as for sources. Rows come in OBJECT_ID order.

@sc [decision:nz.calibrator_set]

sources(catalogue, photometry, workers=1)[source]

Return PhotoPipe magnitudes, BPZ and w_des for every catalogue row.

catalogue is a calibrated shear catalogue with TILE_ID, NUMBER and w_des; photometry is the collection holding OBJECT_ID and the PhotoPipe columns. status is PhotoPipe’s join state for the object (0 photometry, 1 its tile has PhotoPipe but not the object, 2 its tile has no PhotoPipe), NO_ID for a row with no DR6 number and UNMATCHED for an ID the collection lacks; both keep NaN photometry.

@sc [decision:nz.source_photometry_join] @sc [label:convention] sources-row-aligned Every returned array is in the catalogue’s row order, rows without photometry included: tom_bin.parquet is written in this order, and row order is the only key it has for rows with no OBJECT_ID.

match_report(status, mag, weight)[source]

Return where the shear weight without complete photometry is lost.

Fractions of the total shear weight, exclusive and in this order: rows with no object ID, IDs absent from the photometry, objects in a tile without PhotoPipe, objects PhotoPipe lacks in a tile it has, and objects with photometry but a band undetected (incomplete); the rest is complete. undetected gives, of the total, the weight of objects with photometry undetected in each band (an object can miss several); z there is z and z2 both.