Mock QA

This notebook visualizes the default set of mocks currently (as of 2018 August) being used in the DESI Data Challenges.


In [1]:
import os
import numpy as np
import matplotlib.pyplot as plt

In [2]:
import seaborn as sns
sns.set(style='white', font_scale=1.1, palette='Set2')

Dark-time targets: QSOs (tracer & Lya), LRGs, and ELGs

(Note that there's a bug in the Lya densities that needs to be tracked down.)


In [3]:
from desitarget.mock.mockmaker import QSOMaker, LYAMaker, LRGMaker, ELGMaker

In [4]:
for Maker in (QSOMaker, LYAMaker, LRGMaker, ELGMaker):
    M = Maker()
    data = M.read()
    M.qamock_sky(data)


INFO:mockmaker.py:1004:readmock: Reading the whole DESI footprint with nside = 16.
INFO:mockmaker.py:271:_get_radec: Reading /Users/ioannis/work/desi/mocks/GaussianRandomField/v0.0.8_2LPT/QSO.fits
INFO:mockmaker.py:276:_get_radec: Assigning healpix pixels with nside = 16.
INFO:mockmaker.py:1036:readmock: Trimmed to 5029926 QSOs in 1269 healpixel(s)
INFO:mockmaker.py:1576:readmock: Reading the whole DESI footprint with nside = 16.
INFO:mockmaker.py:1587:readmock: Reading /Users/ioannis/work/desi/mocks/lya_forest/london/v2.0/master.fits
INFO:mockmaker.py:1607:readmock: Assigning healpix pixels with nside = 16
INFO:mockmaker.py:1620:readmock: Trimmed to 2743384 LYAs in 1269 healpixel(s)
INFO:io.py:937:read_basis_templates: Reading /Users/ioannis/work/desi/spectro/templates/basis_templates/v2.6/lrg_templates_v2.0.fits
INFO:mockmaker.py:1004:readmock: Reading the whole DESI footprint with nside = 16.
INFO:mockmaker.py:271:_get_radec: Reading /Users/ioannis/work/desi/mocks/GaussianRandomField/v0.0.8_2LPT/LRG.fits
INFO:mockmaker.py:276:_get_radec: Assigning healpix pixels with nside = 16.
INFO:mockmaker.py:1036:readmock: Trimmed to 14241923 LRGs in 1269 healpixel(s)
INFO:io.py:937:read_basis_templates: Reading /Users/ioannis/work/desi/spectro/templates/basis_templates/v2.6/elg_templates_v2.0.fits
WARNING:mockmaker.py:3056:__init__: Using south ELG KD Tree for north photometry.
INFO:mockmaker.py:1004:readmock: Reading the whole DESI footprint with nside = 16.
INFO:mockmaker.py:271:_get_radec: Reading /Users/ioannis/work/desi/mocks/GaussianRandomField/v0.0.8_2LPT/ELG.fits
INFO:mockmaker.py:276:_get_radec: Assigning healpix pixels with nside = 16.
INFO:mockmaker.py:1036:readmock: Trimmed to 72072458 ELGs in 1269 healpixel(s)

Bright-time extragalactic targets: BGS


In [5]:
from desitarget.mock.mockmaker import BGSMaker

In [6]:
M = BGSMaker()
data = M.read(only_coords=True)
M.qamock_sky(data)


INFO:io.py:937:read_basis_templates: Reading /Users/ioannis/work/desi/spectro/templates/basis_templates/v2.6/bgs_templates_v2.1.fits
INFO:mockmaker.py:1761:readmock: Reading the whole DESI footprint with nside = 16.
INFO:mockmaker.py:1788:_read_mockfile: Assigning healpix pixels with nside = 16
INFO:mockmaker.py:1820:readmock: Trimmed to 41561531 BGSs in 1269 healpixel(s).

Bright-time stellar targets: MWS/100 pc and MWS/WD


In [7]:
from desitarget.mock.mockmaker import MWS_NEARBYMaker, WDMaker

In [8]:
for Maker in (MWS_NEARBYMaker, WDMaker):
    M = Maker()
    data = M.read()
    M.qamock_sky(data, nozhist=True)


INFO:io.py:937:read_basis_templates: Reading /Users/ioannis/work/desi/spectro/templates/basis_templates/v2.6/star_templates_v2.2.fits
INFO:mockmaker.py:2238:readmock: Reading the whole DESI footprint with nside = 16.
INFO:mockmaker.py:271:_get_radec: Reading /Users/ioannis/work/desi/mocks/mws/100pc/v0.0.3/mock_100pc.fits
INFO:mockmaker.py:276:_get_radec: Assigning healpix pixels with nside = 16.
INFO:mockmaker.py:2270:readmock: Trimmed to 138557 MWS_NEARBYs in 1269 healpixel(s).
INFO:io.py:937:read_basis_templates: Reading /Users/ioannis/work/desi/spectro/templates/basis_templates/v2.6/wd_templates_v2.1.fits
INFO:io.py:937:read_basis_templates: Reading /Users/ioannis/work/desi/spectro/templates/basis_templates/v2.6/wd_templates_v2.1.fits
INFO:mockmaker.py:2098:readmock: Reading the whole DESI footprint with nside = 16.
INFO:mockmaker.py:271:_get_radec: Reading /Users/ioannis/work/desi/mocks/mws/wd/v0.0.2/mock_wd.fits
INFO:mockmaker.py:276:_get_radec: Assigning healpix pixels with nside = 16.
INFO:mockmaker.py:2130:readmock: Trimmed to 189844 WDs in 1269 healpixel(s).

Sky targets


In [9]:
from desitarget.mock.mockmaker import SKYMaker

In [10]:
M = SKYMaker()
data = M.read()
M.qamock_sky(data, nozhist=True)


INFO:mockmaker.py:1166:readmock: Reading the whole DESI footprint with nside = 16.
INFO:mockmaker.py:271:_get_radec: Reading /Users/ioannis/work/desi/mocks/uniformsky/0.1/uniformsky-2048-0.1.fits
INFO:mockmaker.py:276:_get_radec: Assigning healpix pixels with nside = 16.
INFO:mockmaker.py:1198:readmock: Trimmed to 18335706 SKYs in 1269 healpixel(s).

In [ ]: