desihub / desitarget

DESI Targeting
BSD 3-Clause "New" or "Revised" License
18 stars 23 forks source link

ensure that the QSO target densities aren't too low #192

Closed moustakas closed 6 years ago

moustakas commented 7 years ago

Opening an issue based on an off-list conversation with various QSO-aware team members.

The basic issue is that the QSOs target densities in the data challenge code are too low, especially for Lya QSOs.

Here's what currently happens in the code:

  1. Tracer QSOs are read from the Gaussian random field mock and assigned a g-band magnitudes (but not colors) from the Gaussian Mixture Models derived by @belaa from the DR2 imaging. The Lya QSOs are read from Jean-Marc's mocks and come with g-band magnitudes (although Jean-Marc's new mocks don't).

  2. I then use the desisim.templates.QSO class to generate spectra at the input redshift and normalized to the desired apparent magnitude. One of the outputs of this code is the synthesized DECaLS grz fluxes (but not WISE fluxes since the template spectra don't go red enough).

  3. Next, I add scatter to the (noiseless) photometry based on the brick that the QSO falls on and then apply the optical color cuts to select bona fide QSO targets. This is the point where we're loosing too many QSOs since targets (and thereby spectra) that don't pass these cuts are simply discarded.

  4. Finally the resulting target densities are compared to the desired target densities specified in the parameter file (120/deg2 and 50/deg2 for tracers and Lya, resp.) plus or minus the target density fluctuations model that @geordie666 has coded up. Targets are randomly subsampled if the "measured" density is above the desired density. If the "measured" density is too low then a warning is issued and the code keeps going (retaining all the targets, obviously).

It's obvious now that this sequence is both inefficient and insufficient because it leads to too few targets (especially Lya QSOs).

So what I'm going to do is to make steps 2-4 iterative and aware of one another until the desired target density is either achieved or exceeded.

moustakas commented 7 years ago

BTW here are the QSO target densities from the input mocks.

screen shot 2017-06-19 at 3 05 28 pm
moustakas commented 6 years ago

Going to track this issue in #252.