In [1]:
import os, pdb
import numpy as np
import fitsio
from astropy.table import Table, hstack
import matplotlib.pyplot as plt

In [2]:
from desiutil.plots import plot_sky_binned, init_sky
from desimodel.footprint import radec2pix

In [3]:
%matplotlib inline

In [20]:
camera, ver = 'decam', '-v5-3'
allimlist = Table(fitsio.read('dr8-ondisk-{}{}.fits'.format(camera, ver)))
imlist = allimlist[allimlist['qkeep']]
print('Keeping {}/{} {}{} images.'.format(len(imlist), len(allimlist), camera, ver))


Keeping 137306/145141 decam-v5-3 images.

In [22]:
allzpts = Table(fitsio.read('survey-ccds-decam-dr8.fits.gz'))
_, uindx = np.unique(allzpts['image_filename'], return_index=True)
zpts = allzpts[uindx]
print('Keeping {}/{} {} zeropoints.'.format(len(zpts), len(allzpts), camera))


Keeping 121314/7311253 decam zeropoints.

In [40]:
imlist[:3]


Out[40]:
<Table length=3>
filenameobjectpropidexpnumobstypewcscalphotcalyshiftproctypeprodtypeexptimeradecdate_obsmjd_obsairmassfilterplverprocdateplprocidqkeepflag1flag2
bytes200bytes40bytes20int64bytes10bytes20bytes20float32bytes20bytes20float32float64float64bytes26float64float32bytes32bytes8bytes19bytes20boolint64bool
CPDES82/c4d_130911_062753_ooi_g_v1.fits.fzDES survey hex -28-4 tiling 22012B-0001232822objectSuccessfulemptynanInstCalimage90.0356.46112499999990.075083333333333342013-09-11T06:27:53.97353556546.269374691.23g DECam SDSS c0001 4720.0 1520.0V3.62015-02-13T14:17:1687c7a6fTrue0False
CPDES82/c4d_130911_063202_ooi_g_v1.fits.fzDES survey hex 4+16 tiling 22012B-0001232824objectSuccessfulemptynanInstCalimage90.0359.65179166666662.1047222222222222013-09-11T06:32:02.09146656546.272246431.24g DECam SDSS c0001 4720.0 1520.0V3.62015-02-13T14:17:2087c7a6fTrue0False
CPDES82/c4d_130928_015737_ooi_g_v1.fits.fzDES survey hex -12+6 tiling 12012B-0001238924objectSuccessfulemptynanInstCalimage90.0358.82654166666670.61805555555555562013-09-28T01:57:37.23682456563.081680981.4g DECam SDSS c0001 4720.0 1520.0V3.62015-02-13T14:20:3687c7a6fTrue0False

In [41]:
zpts[:3]


Out[41]:
<Table length=3>
image_filenameimage_hducameraexpnumplverprocdateplprocidccdnameobjectpropidfilterexptimemjd_obsairmassfwhmwidthheightra_boredec_borecrpix1crpix2crval1crval2cd1_1cd1_2cd2_1cd2_2yshiftradecskyrmssig1ccdzptzptccdraoffccddecoffccdskycountsccdskysbccdrarmsccddecrmsccdphrmsccdnastromccdnphotomccd_cuts
bytes120int16bytes9int64bytes8bytes19bytes7bytes5bytes35bytes10bytes1float32float64float32float32int16int16float64float64float32float32float64float64float32float32float32float32boolfloat64float64float32float32float32float32float32float32float32float32float32float32float32int16int16int32
decam/DECam_CP/CP20140810_g_v2/c4d_140815_235218_ooi_g_v2.fits.fz1decam348224V3.3.02014-09-05T08:06:568672821S29HexapodUpdate2014B-0404g30.056884.993733891.354.25304920464094240.1624166666666710.89102777777777813422.26306.333240.162428058510.89102382562-1.8234518e-077.285107e-05-7.2859635e-05-1.8833764e-07False239.8475422642826211.7957150007395430.119889330.01075656325.10138525.098503-0.070845425-0.082123961.238090823.4696250.079081330.101235390.0223986253533730
decam/DECam_CP/CP20140810_g_v2/c4d_140815_235550_ooi_g_v2.fits.fz1decam348225V3.3.02014-09-05T08:06:518672821S29DECaLS_15891_g2014B-0404g79.056884.995580841.354.41657420464094240.1574583333333510.8842513422.26306.333240.157450187710.88424111551-1.82367e-077.285161e-05-7.286044e-05-1.8725844e-07False239.842563249165611.7889356316047920.068250770.00618588525.10035725.09846-0.090344526-0.121096051.237617623.470040.0913071560.127626120.023497283503750
decam/DECam_CP/CP20140810_g_v2/c4d_140815_235730_ooi_g_v2.fits.fz1decam348226V3.3.02014-09-05T08:06:458672821S29DECaLS_15884_g2014B-0404g74.056884.996826591.324.32354520464094240.639749999999969.32972222222222313422.26306.333240.63976447519.329735747765-1.8300955e-077.2851886e-05-7.285927e-05-1.883075e-07False240.326559631493710.2344175021710250.0710753350.00634286825.11223425.10609-0.05237481-0.1135973861.236977523.4706020.0542201740.128891810.0257004463313570

In [75]:
zpts_files = []
for ff in zpts['image_filename']:
    _ff = ff.strip().split('/')
    #zpts_files.append('/'.join((_ff[1], _ff[3])).upper())
    zpts_files.append(_ff[3])
zpts_files = np.hstack(zpts_files)
imlist_files = np.hstack([ff.strip().split('/')[1] for ff in imlist['filename']])
#imlist_files = np.array([ff.strip().upper() for ff in imlist['filename']])

In [76]:
zpts_files[:3], imlist_files[:3]


Out[76]:
(array(['c4d_140815_235218_ooi_g_v2.fits.fz',
        'c4d_140815_235550_ooi_g_v2.fits.fz',
        'c4d_140815_235730_ooi_g_v2.fits.fz'], dtype='<U34'),
 array(['c4d_130911_062753_ooi_g_v1.fits.fz',
        'c4d_130911_063202_ooi_g_v1.fits.fz',
        'c4d_130928_015737_ooi_g_v1.fits.fz'], dtype='<U34'))

In [81]:
print(np.sum(np.isin(zpts_files, imlist_files)))
print(np.sum(np.isin(imlist_files, zpts_files)))
np.intersect1d(['c4d_130911_062753_ooi_g_v1.fits.fz'], imlist_files)


0
0
Out[81]:
array(['c4d_130911_062753_ooi_g_v1.fits.fz'], dtype='<U34')

Read the sky and zeropoints catalogs


In [4]:
allcam = ('decam-g', 'decam-r', 'decam-z', '90prime-g', '90prime-r')

In [5]:
zpts = dict()
for band in allcam:
     zpts[band] = Table(fitsio.read('survey-ccds-{}.fits.gz'.format(band), ext=1))

In [15]:
sky = Table(fitsio.read('sky-hdrs.fits'))
sky.rename_column('camera', 'sky_camera')
sky.rename_column('ccdname', 'sky_ccdname')
sky.rename_column('expnum', 'sky_expnum')
sky.rename_column('sig1', 'sky_sig1')
print(len(sky))
#sky[:3]


4188289

Sky-subtraction


In [44]:
def match_sky_zpts(sky, zpts, filt='decam-z', write=False):
    """Match the sky statistics to a given zeropoint catalog (of a given bandpass)."""
    skyfile = np.array([os.path.basename(ff).replace('.fits', '').strip() for ff in sky['filename']])
    zptfile = np.array(['{}-{:08d}-{}'.format(cam.strip(), exp, ccd.strip())
                        for cam, exp, ccd in zip(zpts[filt]['camera'], zpts[filt]['expnum'], zpts[filt]['ccdname'])])
    
    _, wzpt, wsky = np.intersect1d(zptfile, skyfile, return_indices=True)
    out = hstack((sky[wsky], zpts[filt][wzpt]))
    if write:
        outfile = 'sky-hdrs-{}.fits'.format(filt)
        print('Writing {}'.format(outfile))
        out.write(outfile, overwrite=True)
    return out

In [46]:
if False:
    for cam in ('decam-g', 'decam-r', 'decam-z'):
        match_sky_zpts(sky, zpts, filt=cam, write=True)

In [17]:
out = match_sky_zpts(sky, zpts, filt='decam-z')
out[:3]


Out[17]:
<Table length=3>
filenamesky_camerasky_ccdnamesky_expnumlegpipevplverimgdsumprocdatesky_sig1s_modes_meds_cmeds_johns_p0s_p10s_p20s_p30s_p40s_p50s_p60s_p70s_p80s_p90s_p100s_fmaskds_fineimage_filenameimage_hducameraexpnumccdnameobjectpropidfilterexptimemjd_obsairmassfwhmwidthheightra_boredec_borecrpix1crpix2crval1crval2cd1_1cd1_2cd2_1cd2_2yshiftradecskyrmssig1ccdzptzptccdraoffccddecoffccdskycountsccdskymagccdrarmsccddecrmsccdphrmsccdnmatchccd_cuts
bytes54bytes5bytes3int32bytes21bytes8int64bytes19float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32bytes120int16bytes9int64bytes5bytes35bytes10bytes1float32float64float32float32int16int16float64float64float32float32float64float64float32float32float32float32boolfloat64float64float32float32float32float32float32float32float32float32float32float32float32int16int32
decam/splinesky/00292/00292594/decam-00292594-N1.fitsdecamN1292594dr8-sky-23-gb530baaV3.1.142357294732014-06-18T16:51:2013.983541776.33776.57654776.36566775.9702-140.39929-18.0141-11.847168-7.38501-3.56359860.00262451173.57165537.39752211.87976118.10766672.7254640.128913950.09888925decam/NonDECaLS/CP20140316/c4d_140317_083408_ooi_z_v1.fits.fz31decam292594N1hexapod update2013B-0612z30.056733.356058041.267.071429320464094242.304833333333336.20575-104.200114825.0242.30481439486.205741087661-1.9446065e-077.285809e-05-7.286214e-05-1.9358878e-07False241.367603389073856.1250980722479180.4704917713.98238224.92675624.927584-0.07492185-0.2043710425.8831120.0429650.0849809940.207965640.0195222012790
decam/splinesky/00292/00292594/decam-00292594-N10.fitsdecamN10292594dr8-skyV3.1.118181480872014-06-18T16:51:2013.965536775.6102775.929775.66907775.2322-75.68335-17.904541-11.779724-7.343872-3.54199220.00372314453.56121837.367535611.834167518.03906273.911380.143573950.10999491decam/NonDECaLS/CP20140316/c4d_140317_083408_ooi_z_v1.fits.fz40decam292594N10hexapod update2013B-0612z30.056733.356058041.267.28089120464094242.304833333333336.20575-2358.64176.667242.30481439486.205741087661-1.9446065e-077.285809e-05-7.286214e-05-1.9358878e-07False242.147672546884025.9589926996621540.4710488313.964869524.92423624.927584-0.114977-0.11334944525.84529320.0445540.122150950.119167990.0202893193250
decam/splinesky/00292/00292594/decam-00292594-N11.fitsdecamN11292594dr8-sky-23-gb530baaV3.1.124883536362014-06-18T16:51:2013.925859776.0188776.3717776.0575775.5574-75.27081-17.880371-11.76427-7.343811-3.54650880.00384521483.55267337.34912111.80621317.99774272.4030760.165124580.16153845decam/NonDECaLS/CP20140316/c4d_140317_083408_ooi_z_v1.fits.fz41decam292594N11hexapod update2013B-0612z30.056733.356058041.267.635136620464094242.304833333333336.20575-2358.6-82.66665242.30481439486.205741087661-1.9446065e-077.285809e-05-7.286214e-05-1.9358878e-07False242.46072255168445.9580386577737520.4656551213.92514324.92527624.927584-0.13090084-0.1076571425.86196320.0438520.132371870.1145223160.0177841372590

In [31]:
xmed = np.log10(out['s_med'])
ratio = np.log10((out['s_p90']-out['s_p50'])/(out['s_p50']-out['s_p10']))
plt.hexbin(xmed, ratio, mincnt=1, bins='log')
plt.axhline(y=0.1, lw=2, ls='--')
plt.axhline(y=-0.1, lw=2, ls='--')


Out[31]:
<matplotlib.lines.Line2D at 0x18930d6a0>

In [39]:
cut = np.abs(ratio) > 0.1
plt.hexbin(out['ra'], out['dec'], mincnt=1, bins='log')
plt.scatter(out['ra'][cut], out['dec'][cut], color='orange', s=10)


Out[39]:
<matplotlib.collections.PathCollection at 0x18b9f4a90>

In [40]:
out[cut]


Out[40]:
<Table length=502>
filenamesky_camerasky_ccdnamesky_expnumlegpipevplverimgdsumprocdatesky_sig1s_modes_meds_cmeds_johns_p0s_p10s_p20s_p30s_p40s_p50s_p60s_p70s_p80s_p90s_p100s_fmaskds_fineimage_filenameimage_hducameraexpnumccdnameobjectpropidfilterexptimemjd_obsairmassfwhmwidthheightra_boredec_borecrpix1crpix2crval1crval2cd1_1cd1_2cd2_1cd2_2yshiftradecskyrmssig1ccdzptzptccdraoffccddecoffccdskycountsccdskymagccdrarmsccddecrmsccdphrmsccdnmatchccd_cuts
bytes54bytes5bytes3int32bytes21bytes8int64bytes19float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32float32bytes120int16bytes9int64bytes5bytes35bytes10bytes1float32float64float32float32int16int16float64float64float32float32float64float64float32float32float32float32boolfloat64float64float32float32float32float32float32float32float32float32float32float32float32int16int32
decam/splinesky/00347/00347148/decam-00347148-N29.fitsdecamN29347148dr8-skyV3.3.013596204262014-09-05T10:21:1035.413554926.73244933.1624927.2774921.9507-4413.624-68.72119-41.627342-26.962402-15.474121-5.204594.726855315.20214827.14990243.643066168.874020.8167792414.88214decam/DECam_CP/CP20140810_z_v2/c4d_140812_095310_ooi_z_v2.fits.fz59decam347148N29DECaLS_4872_z2014B-0404z142.056881.409704921.645.88085272046409428.94820833333333421.76311111111111-11376.26306.33328.9481928327721.76310738499-4.066853e-087.285967e-05-7.288153e-05-5.307347e-08False28.61540867926945720.8587021177460880.3049701835.41356725.01723725.0126080.04161468-0.1417799934.78624719.7219870.0459911080.142810520.018228518750
decam/splinesky/00347/00347155/decam-00347155-S4.fitsdecamS4347155dr8-skyV3.3.02371345802014-09-05T10:21:4336.874075286.12065330.0275294.99565265.959-4877.47-72.55859-44.20586-28.809082-16.75-6.01171884.45507815.41162128.0087945.3081052613.46480.8350466691.4678decam/DECam_CP/CP20140810_z_v2/c4d_140812_101321_ooi_z_v2.fits.fz27decam347155S4DECaLS_4908_z2014B-0404z144.056881.423674551.725.723792046409431.78437500000000423.4338333333333322150.22047.031.7843847384823.4338357289-3.1902093e-087.286079e-05-7.2884824e-05-4.6135817e-08False31.7847699385523523.516380618118812.129081536.8765525.01020425.0032270.061708733-0.1152957938.091619.6234340.064520940.1215182540.030714942650
decam/splinesky/00348/00348026/decam-00348026-N1.fitsdecamN1348026dr8-sky-4-ge95edd1V3.3.035303912442014-09-05T10:50:3636.0289154777.5834862.95074784.7544718.542-4993.5522-345.0345-125.07988-58.16445-34.392773-17.862793-3.558593810.40136725.73046946.099612215.07760.9244698771.4342decam/DECam_CP/CP20140810_z_v2/c4d_140815_065059_ooi_z_v2.fits.fz31decam348026N1DECaLS_40030_z2014B-0404z173.056884.282812831.934.714435620464094346.956291666666728.21077777777778-104.200114825.0346.956277206528.21077050779-1.2175622e-077.285786e-05-7.289416e-05-1.353328e-07False345.899734408534428.1261456008400651.118773936.0290524.91485224.9255960.006705028-0.09679510428.71669819.930170.0206976780.099511960.038279682660
decam/splinesky/00426/00426127/decam-00426127-S17.fitsdecamS17426127dr8-sky-7-gb1d1e64V3.6.125492482042015-03-31T11:14:1016.237684961.8667975.7658960.36804952.515-1212.706-34.0653-19.008228-11.901654-6.4564576-1.60253913.1128548.12852214.1079122.8843881954.20580.70988923164.57248decam/DECam_CP/CP20150326/c4d_150330_042423_ooi_z_v1.fits.fz15decam426127S17DECaLS_9763_z2014B-0404z67.057111.18223311.224.60935320464094193.825833333333322.92408333333333346659.0-82.66665193.82581878962.924070838674-1.528167e-077.285435e-05-7.2857634e-05-1.5087925e-07False193.98260195560223.3355032648136060.4591311216.2112124.86973624.884968-0.1577122-0.11667208414.70767820.6566470.156974820.12168610.033127304690
decam/splinesky/00431/00431298/decam-00431298-N31.fitsdecamN31431298dr8-sky-7-gb1d1e64V3.6.235795929062015-04-25T00:51:2931.896054137.70954155.2944138.79154130.4067-12375.215-104.79993-50.275734-31.68042-19.020508-8.3681641.62158211.79736323.40136739.196777341.36620.799199041855.3706decam/DECam_CP/CP20150407/c4d_150410_071746_ooi_z_v1.fits.fz60decam431298N31DECaLS_238_z2014B-0404z127.057122.301931091.985.71869520464094220.7849583333333527.98275-11376.2-2212.333220.784960513527.98275801775-1.8182928e-077.285634e-05-7.289016e-05-2.056203e-07False221.1311601486228827.0769861137160070.274102531.88207824.9468124.9320030.03896806-0.1038139532.63087519.7914350.0490211470.105591430.02057876450
decam/splinesky/00483/00483816/decam-00483816-N29.fitsdecamN29483816dr8-sky-7-gb1d1e64V3.810640888392015-10-17T14:54:4532.7719543738.6763774.6293741.30473709.1218-5663.168-77.191284-43.28711-28.058594-16.606445-6.5194093.11962913.2299824.839640.801271978.40230.7112079367.8055decam/DECam_CP/CP20151010/c4d_151011_085417_ooi_z_v1.fits.fz59decam483816N29DECaLS_42110_z2014B-0404z208.057306.368050641.515.5746952046409445.741833333333334.951611111111111-11376.26306.33345.741830964124.9516217771961.5760724e-087.286418e-05-7.2864554e-05-6.5561263e-09False45.4307753376710154.0475103746855630.2220651532.77131324.9443124.926540.06608002-0.119577517.84443920.4467490.068121540.125741850.032719918600
decam/splinesky/00536/00536297/decam-00536297-N14.fitsdecamN14536297dr8-sky-9-g3ee1cf2V3.9819374992016-04-12T21:14:1143.9796750.07024.3036864.0886832.7246-45561.145-828.3799-176.44434-61.557617-34.2583-14.7441412.704296820.77636742.86767683.739263117.67680.6555631872.6017decam/DECam_CP/CP20160407/c4d_160411_002516_ooi_z_v1.fits.fz44decam536297N14DECaLS_47437_z2014B-0404z228.057489.014322411.244.490153320464094134.512833333333336.357166666666667-4613.012695.33134.51282409676.357155309894-2.5127585e-087.284526e-05-7.2851515e-05-2.4359693e-08False133.732065233323855.9459488575304630.7305355744.27570324.49778724.48238-0.044714436-0.0983287130.85159919.8523120.0481411220.100116710.0459377021230
decam/splinesky/00553/00553752/decam-00553752-S25.fitsdecamS25553752dr8-sky-9-g3ee1cf2V3.9.226273157662016-07-27T20:28:1430.8778722742.95173779.70043774.78983764.8457-33876.53-985.451-100.85757-43.18999-23.610107-9.7385252.63037115.3850130.866759.1783213154.4430.67968081086.9233decam/DECam_CP/CP20160720/c4d_160722_043112_ooi_z_v1.fits.fz3decam553752S25DECaLS_15311_z2016A-0190z154.057591.185983711.915.82137120464094260.63587517.31505555555555611167.88436.0260.635863494417.31506393548-1.8992515e-077.28635e-05-7.2871844e-05-2.3081884e-07False260.147938149602718.056051154428990.3021616330.89926524.89892424.905352-0.027669426-0.1169816424.63839120.0964760.032551180.120616430.0193509593010
decam/splinesky/00553/00553773/decam-00553773-S27.fitsdecamS27553773dr8-sky-9-g3ee1cf2V3.9.22339609552016-07-27T20:32:1845.3447650.08802.2268802.8048795.49-28375.818-309.41974-68.28223-40.84082-22.25-6.3662118.91601625.33691445.6845783.084966651.79150.60751003541.54944decam/DECam_CP/CP20160720/c4d_160722_054936_ooi_z_v1.fits.fz5decam553773S27DECaLS_44359_z2016A-0190z171.057591.240244371.716.0081352046409410.933083333333334-11.35091666666666711167.8-82.6666510.93308680539-11.35091863175-1.0250246e-077.287895e-05-7.286145e-05-8.264903e-08False11.09244071490999-10.6106173393703570.3519186745.35993224.8411624.8326030.16607767-0.1328626151.60844819.2937050.168012130.135437190.022549067590
decam/splinesky/00553/00553841/decam-00553841-S12.fitsdecamS12553841dr8-sky-9-g3ee1cf2V3.9.232092493022016-07-27T20:44:0928.7128682626.3673243.2563238.98273227.541-42643.703-1037.8564-261.2434-69.94814-34.88633-17.685059-3.744384810.16479527.671192152.4119120233.0530.71905637845.79004decam/DECam_CP/CP20160720/c4d_160722_083246_ooi_z_v1.fits.fz22decam553841S12DECaLS_34058_z2016A-0190z143.057591.353871111.316.1781162046409411.7543333333333337.33813888888888854404.6-4342.011.754338500047.338147715562-1.01808304e-077.286008e-05-7.286725e-05-9.510413e-08False12.2257032307006617.5844142503072970.3703529528.73737124.95593324.9639320.09798843-0.0842478622.91670820.1751250.100977720.091446510.028474588610
......................................................................................................................................................................................................
decam/splinesky/00768/00768895/decam-00768895-N10.fitsdecamN10768895dr8-sky-26-ga25adbbcV4.113869052302018-09-09T20:39:0323.04864-17.211482005.49712005.1664-68.02595-2436.141-1039.6752-217.32481-127.649506-83.49322-53.657227-32.609833-16.184082-0.1145019520.6594242047.66590.4973861378.7458decam/DECam_CP/CP20180903/c4d_180904_095634_ooi_z_v1.fits.fz41decam768895N10DECaLS_26240_z2014B-0404z91.058365.414291611.225.0775062046409446.845251.6871666666666667-2358.64176.66746.845234730761.6871711753211.0431639e-097.2857925e-05-7.2861134e-05-4.6521866e-09False46.689584046041951.440096695965217511.64704823.3429924.07190925.0933950.017808767-0.01728228322.10563320.2142490.121205250.771045863.25712781033168
decam/splinesky/00768/00768896/decam-00768896-N10.fitsdecamN10768896dr8-sky-26-ga25adbbcV4.136595256182018-09-09T20:39:0522.48181-8.8226521913.76751913.5723-57.36648-2587.165-357.54883-98.83154-56.02143-29.822632-11.2414555.92944923.98779352.812134200.873252645.86910.5019843375.80582decam/DECam_CP/CP20180903/c4d_180904_095922_ooi_z_v1.fits.fz41decam768896N10DECaLS_26269_z2014B-0404z80.058365.416235151.155.1032832046409447.019125-4.801277777777778-2358.64176.66747.0191162697-4.801281469717-3.8942107e-097.2858275e-05-7.2858005e-05-6.610647e-09False46.86289240606688-5.04831126265889612.58654522.77728324.81566625.0957340.023463158-0.02748658124.00056520.1249520.213609580.76196133.0051355903104
decam/splinesky/00768/00768897/decam-00768897-N10.fitsdecamN10768897dr8-sky-26-ga25adbbcV4.113719516352018-09-09T20:39:1924.535220.160745262288.20652287.8286-57.140953-3343.514-1000.6557-230.76294-115.19706-73.90634-43.399025-22.839111-4.424804716.41308654.179812764.54080.50098205565.003decam/DECam_CP/CP20180903/c4d_180904_100124_ooi_z_v1.fits.fz41decam768897N10DECaLS_42157_z2014B-0404z84.058365.417641991.145.3811922046409446.66008333333333-6.354694444444444-2358.64176.66746.66008107951-6.354701312657-3.013986e-097.285719e-05-7.285697e-05-6.922203e-09False46.50342343501529-6.60173856430313814.30065224.84590124.749625.0983810.028684346-0.01892024527.33561519.9836850.0613966550.65933993.1403453953104
decam/splinesky/00768/00768898/decam-00768898-N10.fitsdecamN10768898dr8-sky-26-ga25adbbcV4.122825794282018-09-09T20:39:2626.1138234.1360642591.84992591.7466-60.6621-2928.9023-1104.8163-256.17813-144.30136-96.613754-59.15088-34.93162-15.399175.0385535.3671883155.50540.5024437407.6728decam/DECam_CP/CP20180903/c4d_180904_100317_ooi_z_v1.fits.fz41decam768898N10DECaLS_40241_z2014B-0404z80.058365.418955531.124.9487782046409447.706041666666664-7.905861111111111-2358.64176.66747.70605923822-7.905859181701-2.6211149e-097.285734e-05-7.285595e-05-5.7313243e-09False47.54885591638619-8.1528991592552217.21540626.38491824.30787725.0922970.033110425-0.02414243932.4747419.7966420.0707116950.801513.243385973168
decam/splinesky/00768/00768899/decam-00768899-N10.fitsdecamN10768899dr8-sky-26-ga25adbbcV4.111307426532018-09-09T20:39:3430.1342160.03454.52053454.3354-71.4288-3571.6904-1887.6244-365.48453-263.13672-152.61494-113.1201-69.04245-40.211914-17.1213878.2766111746.4460.50557345593.1286decam/DECam_CP/CP20180903/c4d_180904_100506_ooi_z_v1.fits.fz41decam768899N10DECaLS_42174_z2014B-0404z86.058365.420212811.135.2561922046409446.034-7.927027777777778-2358.64176.66746.03398886976-7.927015179242-3.4918977e-097.285652e-05-7.2858544e-05-7.4295423e-09False45.876771610463145-8.1740356842859120.82501230.41385824.92323725.0984270.019589972-0.02645271540.21225419.564610.159325730.918399163.1337488903072
decam/splinesky/00768/00768900/decam-00768900-N10.fitsdecamN10768900dr8-sky-26-ga25adbbcV4.115336072782018-09-09T20:39:3635.69915462.7491724830.454830.435-91.31108-5359.631-1732.8473-463.41943-263.2767-171.33472-107.5073-58.99756-29.507324-1.893554737.5332035994.89650.5583569931.6385decam/DECam_CP/CP20180903/c4d_180904_100700_ooi_z_v1.fits.fz41decam768900N10DECaLS_42173_z2014B-0404z92.058365.421536831.155.11210442046409445.022125-6.356638888888889-2358.64176.66745.0221105247-6.356641005081-3.944393e-097.2857576e-05-7.285746e-05-9.032827e-09False44.86544034316755-6.60366856286377840.7895735.8820123.62847525.0914550.0097169710.001350398252.34194619.2783810.098516980.327139143.4755466733168
decam/splinesky/00774/00774555/decam-00774555-N10.fitsdecamN10774555dr8-sky-26-ga25adbbcV4.141786593262018-09-19T17:37:5131.7837430.03812.81743811.2033808.0444-6887.7812-55.684864-33.503174-21.33496-11.791748-3.20581055.11987313.92309624.0683637.9836431408.81250.70256181041.5668decam/DECam_CP/CP20180916/c4d_180916_234309_ooi_z_v1.fits.fz41decam774555N10DECaLS_18789_z2014B-0404z120.058377.988305671.994.715332520464094273.841458333333329.455555555555556-2358.64176.667273.841444474229.45555421703-2.537345e-077.284926e-05-7.28892e-05-2.6555574e-07False273.6621959707751429.2088054181981521.81531331.78284524.95366724.960610.0001928170.01468630331.21062919.839750.0174686460.0309168790.0260903913320
decam/splinesky/00776/00776286/decam-00776286-N8.fitsdecamN8776286dr8-sky-26-ga25adbbcV4.16459606432018-09-23T08:22:3964.8217411524.22612446.44311752.54811157.45-78405.13-568.4595-258.07715-140.64697-76.25391-29.28222712.53808657.660645118.09766224.585454633.19040.77938588010.3decam/DECam_CP/CP20180921/c4d_180922_004432_ooi_z_v1.fits.fz39decam776286N8DECaLS_15275_z2014B-0404z250.058383.030932432.04.826189520464094259.355958333333314.640833333333333-2358.612695.33259.355976168214.64084054082-1.9852351e-077.286525e-05-7.2868716e-05-2.4444122e-07False258.553275010852114.3953097246294381.766202463.9202324.80267724.985188-0.03832536-0.03867507745.0366419.4415910.0471612740.054392370.1177080941691024
decam/splinesky/00784/00784234/decam-00784234-S3.fitsdecamS3784234dr8-sky-26-ga25adbbcV4.137390189102018-10-25T00:10:1847.039498006.56058043.41368002.4767964.773-8213.233-668.38104-120.99483-59.730858-34.768066-16.2675780.3007812517.07812536.41123265.441414661.13670.82064027452.21893decam/DECam_CP/CP20181016/c4d_181017_032113_ooi_z_v1.fits.fz27decam784234S3DECaLS_36541_z2014B-0404z250.058408.139737172.076.899632046409410.24587530.749888888888892150.26306.33310.2458620306830.74989602514-8.7430145e-087.2851624e-05-7.289798e-05-8.01899e-08False9.88360603391817930.832079389058830.536618147.0069524.90785824.929350.014589417-0.02783535432.54527719.7942870.04802360.0430544760.045301921070
decam/splinesky/00784/00784241/decam-00784241-S8.fitsdecamS8784241dr8-sky-26-ga25adbbcV4.125943894642018-10-25T00:10:5742.567970.07134.22077133.3877106.6-13421.521-108.92139-53.98535-34.402832-20.187988-7.8823243.86474616.0483430.04589849.1357421726.250.39134684981.9286decam/DECam_CP/CP20181016/c4d_181017_035404_ooi_z_v1.fits.fz19decam784241S8DECaLS_36579_z2014B-0404z250.058408.162553892.158.9686382046409417.6037916666666731.938527777777784404.612695.3317.6037897805731.93851554544-6.866348e-087.285375e-05-7.2906805e-05-5.965639e-08False16.68673393588353832.182859026898010.1804810842.5644124.9143824.9163670.027062217-0.005255485428.54647619.9366250.039443130.0343225340.0158681141310

In [18]:
fig, ax = plt.subplots()
ax.hexbin(np.log10(out['s_mode']), np.log10(out['s_med']), mincnt=1, bins='log')


/usr/local/anaconda3/envs/desi/lib/python3.6/site-packages/ipykernel_launcher.py:2: RuntimeWarning: divide by zero encountered in log10
  
/usr/local/anaconda3/envs/desi/lib/python3.6/site-packages/ipykernel_launcher.py:2: RuntimeWarning: invalid value encountered in log10
  
Out[18]:
<matplotlib.collections.PolyCollection at 0x1916e4780>

In [ ]:
stop

In [ ]:
out

In [ ]:


In [ ]:
sky[sky['sig1'] > 10**2.1]

Zeropoints


In [ ]:
data['decam-r'].dtype.names

In [ ]:
for ii, band in enumerate(('decam-g', 'decam-r', 'decam-z')):

In [ ]:
fig, ax = plt.subplots(1, 3, figsize=(14, 10))
for ii, band in enumerate(('decam-g', 'decam-r', 'decam-z')):
    basemap = init_sky(galactic_plane_color='k', ax=ax[ii])
    plot_sky_binned(data[band]['ra'], data[band]['dec'], max_bin_area=0.5, 
                clip_lo='!1', #clip_hi='95%', 
                cmap='viridis', plot_type='healpix', basemap=basemap, label=band)

In [ ]: