mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
correct handling of comoving-space coordinates in stacking
This commit is contained in:
parent
4c2ab2cce8
commit
5aba171bed
1 changed files with 27 additions and 20 deletions
|
@ -560,7 +560,7 @@ def launchVoidOverlap(sample1, sample2, sample1Dir, sample2Dir,
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
def launchStack(sample, stack, binPath, thisDataPortion=None, logDir=None,
|
def launchStack(sample, stack, binPath, thisDataPortion=None, logDir=None,
|
||||||
voidDir=None, freshStack=True, runSuffix=None,
|
voidDir=None, freshStack=True, runSuffix=None,
|
||||||
zobovDir=None,
|
zobovDir=None, useLightCone=None, useComoving=None,
|
||||||
INCOHERENT=False, ranSeed=None, summaryFile=None,
|
INCOHERENT=False, ranSeed=None, summaryFile=None,
|
||||||
continueRun=None, dataType=None, prefixRun="",
|
continueRun=None, dataType=None, prefixRun="",
|
||||||
idList=None, rescaleOverride=None):
|
idList=None, rescaleOverride=None):
|
||||||
|
@ -586,8 +586,15 @@ def launchStack(sample, stack, binPath, thisDataPortion=None, logDir=None,
|
||||||
centralRadius = stack.rMin * 0.25
|
centralRadius = stack.rMin * 0.25
|
||||||
|
|
||||||
# restrict to relevant ranges of sample
|
# restrict to relevant ranges of sample
|
||||||
zMin = max(sample.zRange[0],stack.zMin) * 3000
|
zMin = max(sample.zRange[0], stack.zMin)
|
||||||
zMax = min(sample.zRange[1],stack.zMax) * 3000
|
zMax = min(sample.zRange[1], stack.zMax)
|
||||||
|
if useComoving or not useLightCone:
|
||||||
|
zMin = 3000.*vp.angularDiameter(zMin, Om=0.27)
|
||||||
|
zMax = 3000.*vp.angularDiameter(zMax, Om=0.27)
|
||||||
|
print min(sample.zRange[1],stack.zMax)*3000, zMax
|
||||||
|
else:
|
||||||
|
zMin *= 3000
|
||||||
|
zMax *= 3000
|
||||||
|
|
||||||
if dataType == "observation":
|
if dataType == "observation":
|
||||||
obsFlag = "observation"
|
obsFlag = "observation"
|
||||||
|
@ -1230,23 +1237,23 @@ def launchFit(sample, stack, logFile=None, voidDir=None, figDir=None,
|
||||||
while badChain:
|
while badChain:
|
||||||
ntries += 1
|
ntries += 1
|
||||||
|
|
||||||
Rexpect = (stack.rMin+stack.rMax)/2
|
#Rexpect = (stack.rMin+stack.rMax)/2
|
||||||
Rtruncate = stack.rMin*3. + 1 # TEST
|
#Rtruncate = stack.rMin*3. + 1 # TEST
|
||||||
if sample.dataType == "observation":
|
#if sample.dataType == "observation":
|
||||||
ret,fits,args = vp.fit_ellipticity(voidDir,Rbase=Rexpect,
|
# ret,fits,args = vp.fit_ellipticity(voidDir,Rbase=Rexpect,
|
||||||
Niter=300000,
|
# Niter=300000,
|
||||||
Nburn=100000,
|
# Nburn=100000,
|
||||||
Rextracut=Rtruncate)
|
# Rextracut=Rtruncate)
|
||||||
else:
|
#else:
|
||||||
ret,fits,args = vp.fit_ellipticity(voidDir,Rbase=Rexpect,
|
# ret,fits,args = vp.fit_ellipticity(voidDir,Rbase=Rexpect,
|
||||||
Niter=300000,
|
# Niter=300000,
|
||||||
Nburn=100000,
|
# Nburn=100000,
|
||||||
Rextracut=Rtruncate)
|
# Rextracut=Rtruncate)
|
||||||
badChain = (args[0][0] > 0.5 or args[0][1] > 2.*stack.rMax or \
|
#badChain = (args[0][0] > 0.5 or args[0][1] > 2.*stack.rMax or \
|
||||||
args[0][2] > 2.*stack.rMax) and \
|
# args[0][2] > 2.*stack.rMax) and \
|
||||||
(ntries < maxtries)
|
# (ntries < maxtries)
|
||||||
#ret,fits,args = vp.compute_inertia(voidDir, stack.rMax, mode="2d", nBootstraps=500, rMaxInertia=0.7)
|
ret,fits,args = vp.compute_inertia(voidDir, stack.rMax, mode="2d", nBootstraps=500, rMaxInertia=0.7)
|
||||||
#badChain = False
|
badChain = False
|
||||||
|
|
||||||
#np.save(voidDir+"/chain.npy", ret)
|
#np.save(voidDir+"/chain.npy", ret)
|
||||||
np.savetxt(voidDir+"/fits.out", fits)
|
np.savetxt(voidDir+"/fits.out", fits)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue