Example #1
0
if __name__=="__main__":
    nstart = args.input
    nend = args.output
    dataDDnf = correlation.openDataFront('data/galaxies_DR9_CMASS_North.fits', nstart, nend)
    dataRRnf = correlation.openDataFront('data/randoms_DR9_CMASS_North.fits', nstart, nend)
    dataDDnb = correlation.openDataBack('data/galaxies_DR9_CMASS_North.fits', nstart, nend)
    dataRRnb = correlation.openDataBack('data/randoms_DR9_CMASS_North.fits', nstart, nend)
#    dataDDs = correlation.openData('../Downloads/galaxies_DR9_CMASS_South.fits', npoints)
#    dataRRs = correlation.openData('../Downloads/randoms_DR9_CMASS_South.fits', npoints)
    print "Concat Now"
    DpRnf = dataDDnf + dataRRnf
    DpRnb = dataDDnb + dataRRnb
#    DpRs = dataDDs + dataRRs
    print "First hist"
    histDDnf = correlation.histBB(dataDDnf)
    histDpRnf = correlation.histBB(DpRnf)
    histRRnf = correlation.histBB(dataRRnf)
    histDDnb = correlation.histBB(dataDDnb)
    histDpRnb = correlation.histBB(DpRnb)
    histRRnb = correlation.histBB(dataRRnb)

    histDDn = histDDnf.Clone("histDDn")
    histDDn.Reset()
    histDDn.Add(histDDnf)
    histDDn.Add(histDDnb)
    histDpRn = histDDnf.Clone("histDDn")
    histDpRn.Reset()
    histDpRn.Add(histDpRnf)
    histDpRn.Add(histDpRnb)
    histRRn = histDDnf.Clone("histDDn")
Example #2
0
def renameData(table):
    return [correlation.cartesian(row) for row in table]

if __name__=="__main__":
    td1 = cuts(resize(openTable('data/galaxies_DR9_CMASS_North.fits')), 205, 207, 0, 2)
    tr1 = cuts(openTable('data/randoms_DR9_CMASS_North.fits'), 205, 207, 0, 2)
    tdpr1 = vstack([td1, tr1])
    td = renameData(td1)
    tdpr = renameData(tdpr1)
    tr = renameData(tr1)
    print "Concat"
    print len(td)
    print len(tr)
    print len(tdpr)
    histDD = correlation.histBB(td)
    histDpR = correlation.histBB(tdpr)
    histRR = correlation.histBB(tr)
    print "correlation done"
    histD = histDD.Clone("histD")
    histD.Reset()
    histD.Add(histDD)
    histDR = histDD.Clone("histD")
    histDR.Reset()
    histDR.Add(histDpR)
    histR = histDD.Clone("histD")
    histR.Reset()
    histR.Add(histRR)

    corrhist = correlationHistogram(histD, histDR, histR)