# run North rmin=0 rmax=200. nbins=50 log=False region='North' outdir=dirbase+'Pairs/' galtools.loop_mocks(dirbase,region,outdir,rmin=rmin,rmax=rmax,nbins=nbins,log=log) #south southfiles=glob.glob(outdir+'South/pairs_*.txt') rs,lss,siglss,covlss,corlss=galtools.read_many_pairs(southfiles) rs,dds,rrs,drs,ngs,nrs=galtools.read_pairs('dr10_V6_South_pairs_forxi.txt') xilss=(dds-2*drs+rrs)/rrs clf() subplot(121) errorbar(rs,lss*rs*rs,yerr=siglss*rs*rs,fmt='ro') plot(rs,xilss*rs*rs) subplot(122) pcolor(rs,rs,corlss) colorbar() #north northfiles=glob.glob(outdir+'North/pairs_*.txt') rn,lsn,siglsn,covlsn,corlsn=galtools.read_many_pairs(northfiles) rn,ddn,rrn,drn,ngn,nrn=galtools.read_pairs('dr10_V6_North_pairs_forxi.txt')
import scipy.io from Cosmology import cosmology from Homogeneity import galtools from scipy import integrate from scipy import interpolate from matplotlib import rc import copy import glob import pyfits rc('text', usetex=False) rc('font',**{'family':'sans-serif','sans-serif':['Helvetica']}) ##### read data rds,dds,rrs,drs,ngs,nrs=galtools.read_pairs('dr10South_pairs_weighted.txt') ns=galtools.scalednr(dds,rrs,2.) rhs=galtools.rhomo_nr(rds,ns) d2sd=galtools.d2(rds,dds,rrs,2.) rhd2sd=galtools.rhomo_d2(rds,d2sd) # get error bars from mocks dirbase='/Users/hamilton/SDSS/Data/DR10/PTHaloMocks/' outdir=dirbase+'Pairs_Log/' southfiles=glob.glob(outdir+'South/pairs_*.txt') rs,nrs,signrs,d2sd,sigd2s,covmatnrs,covmatd2s,cormatnrs,cormatd2s,rhnrs,rhd2s,sigrhnrs,sigrhd2s=galtools.homogeneity_many_pairs(southfiles,2.)
import scipy.io from Cosmology import cosmology from Homogeneity import galtools from scipy import integrate from scipy import interpolate from matplotlib import rc import copy import glob import pyfits rc('text', usetex=False) rc('font', **{'family': 'sans-serif', 'sans-serif': ['Helvetica']}) ##### read data rds, dds, rrs, drs, ngs, nrs = galtools.read_pairs( 'dr10South_pairs_weighted.txt') ns = galtools.scalednr(dds, rrs, 2.) rhs = galtools.rhomo_nr(rds, ns) d2sd = galtools.d2(rds, dds, rrs, 2.) rhd2sd = galtools.rhomo_d2(rds, d2sd) # get error bars from mocks dirbase = '/Users/hamilton/SDSS/Data/DR10/PTHaloMocks/' outdir = dirbase + 'Pairs_Log/' southfiles = glob.glob(outdir + 'South/pairs_*.txt') rs, nrs, signrs, d2sd, sigd2s, covmatnrs, covmatd2s, cormatnrs, cormatd2s, rhnrs, rhd2s, sigrhnrs, sigrhd2s = galtools.homogeneity_many_pairs( southfiles, 2.) #save savez('save4pierre.npz', rds=rds, d2sd=d2sd, covmatd2s=covmatd2s)