RegulatedDeconvolver

class kszx.RegulatedDeconvolver(zobs_vec, zerr_vec, zbin_width, soft_zmax=None)

A photo-z error deconvolver which avoids the oscillatory behavior of Lucy-Richardson.

The constructor takes a sequence of samples from the observed 2-d \((z_{obs}, z_{err})\) distribution, and builds a model for the 3-d \((z_{true}, z_{obs}, z_{err})\) distribution.

This 3-d distribution can be sampled with sample() or sample_parallel(). This is used in our DESILS-LRG pipeline, to generate triples \((z_{true}, z_{obs}, z_{err})\) for the random catalog, given pairs \((z_{obs}, z_{err})\) from the galaxy catalog.

  • zobs_vec: 1-d array containing observed (photometric) redshifts.

  • zerr_vec: 1-d array containing estimated photo-z errors.

  • zbin_width (scalar): used internally for binning. (Recommend ~0.01 for DESILS-LRG.)

  • soft_zmax (scalar): used internally; galaxies with (zobs > soft_zmax) are discarded. Should be chosen significantly larger than the max redshift of interest. (For DESILS-LRG with zmax=1, recommend soft_zmax=1.5. If this parameter is omitted, then you’ll get a tail of rare galaxies with z~5, which is annoying.)

sample(n, zobs_min=None, zobs_max=None)

Returns (ztrue, zobs, zerr), where all 3 arrays have shape (n,).

If n is large, you may want to call sample_parallel() instead.

sample_parallel(n, zobs_min=None, zobs_max=None, processes=None)

Returns (ztrue, zobs, zerr), where all 3 arrays are shape (n,).

Uses a multiprocessing Pool for speed. If processes is None, then a sensible default will be chosen.