<jupyter_start><jupyter_text>Matching http://legacysurvey.org/viewer/?ra=244.6758&dec=7.3071&zoom=13&layer=decals-dr2<jupyter_code>from imaginglss.analysis import completeness
from imaginglss.analysis import targetselection

from imaginglss.utils.npyquery import Column as C
b = dr.brickindex.get_brick(dr.brickindex.search_by_name('2445p072'))
tractor = dr.catalogue.open(b)
sigma = {'r':5, 'z':5, 'g':5}
LRG = targetselection.LRG(tractor)
QSO = targetselection.QSO(tractor)
ELG = completeness.ELG(sigma)(targetselection.ELG(tractor))
BGS = completeness.BGS(sigma)(targetselection.BGS(tractor))
depth = dr.read_depths((tractor['RA'], tractor['DEC']), 'rgz')<jupyter_output><empty_output><jupyter_text>MW_TRANSMISION in Tractor Catalogue and from Tractor Images<jupyter_code>_ = hist(tractor['DECAM_MW_TRANSMISSION'][:, 4] /  depth['DECAM_MW_TRANSMISSION'][:, 4] - 1, range=(-.01, .01), bins=100, log=True)
xlabel('Relative Discrepency')<jupyter_output><empty_output><jupyter_text>DECAM_DEPTH in Tractor Catalogue and from Tractor Images<jupyter_code>_ = hist(tractor['DECAM_DEPTH'][:, 4] /  depth['DECAM_DEPTH'][:, 4] - 1, 
         range=(-0.04, 0.04), bins=100, log=True)
xlabel('Relative Discrepency')
#loglog()
#bad = abs(tractor['DECAM_DEPTH'][:, 4] /  depth['DECAM_FLUX_IVAR'][:, 4] - 1) > 0.01
#print bad.sum(), len(tractor)<jupyter_output>/anaconda/lib/python2.7/site-packages/IPython/kernel/__main__.py:1: RuntimeWarning: divide by zero encountered in divide
  if __name__ == '__main__':
/anaconda/lib/python2.7/site-packages/IPython/kernel/__main__.py:1: RuntimeWarning: invalid value encountered in divide
  if __name__ == '__main__':<jupyter_text>Slightly Mislocated Tycho starsAnd what's going on with the objects?<jupyter_code>figure(figsize=(8, 8))
rimg = dr.images['image']['r']
gimg = dr.images['image']['g']
zimg = dr.images['image']['z']

composite = array([
        zimg.open(b).clip(0, 0.05),
        rimg.open(b).clip(0, 0.05), 
        gimg.open(b).clip(0, 0.05), 
        ]).transpose((1,2,0))
composite /= composite.max()
#plot(tractor['RA'][bad], tractor['DEC'][bad], '+', mfc='none', mew=2, mec='yellow', label='bad')
plot(LRG['RA'], LRG['DEC'], 'o', mfc='none', mew=2, mec='cyan', label='LRG')
plot(QSO['RA'], QSO['DEC'], 'o', mfc='none', mew=2, mec='blue', label='QSO')
plot(ELG['RA'], ELG['DEC'], 'o', mfc='none', mew=2, mec='white', label='ELG')
plot(BGS['RA'], BGS['DEC'], 'o', mfc='none', mew=2, mec='green', label='BGS')
plot(decals.tycho['RA'], decals.tycho['DEC'], 'x', markersize=10, mew=2, mfc='none', mec='gray')
imshow(composite,       
       extent=(b.ra2, b.ra1, b.dec2, b.dec1))   
xlabel('RA')
ylabel('DEC')
legend()
%%bash
git stash
git pull
git add BrickInvestigation.ipynb
git commit -m "update BrickInvestigation.ipynb"
git push<jupyter_output>Saved working directory and index state WIP on master: 0094c2c update the COSMOS example (remove .data)
HEAD is now at 0094c2c update the COSMOS example (remove .data)
Already up-to-date.
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	.ipynb_checkpoints/
#	CompletenessRevisit.ipynb
#	imaginglss
nothing added to commit but untracked files present (use "git add" to track)
{'fraction_non_alphanumeric': 0.1824659231722429, 'fraction_numerical': 0.030359355638166045, 'mean_word_length': 6.143805309734513, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '294427', 'license': 'Artistic-2.0', 'n_tokens_mistral': 1327, 'n_tokens_neox': 1256, 'n_words': 253, 'path': 'BrickInvestigation.ipynb', 'repo_name': 'bccp/imaginglss-notebooks', 'size': '3228'}