mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
removed mock particle tracking, since that is no longer used
This commit is contained in:
parent
fc2d7157f4
commit
d9efa15474
8 changed files with 71 additions and 173 deletions
|
@ -49,7 +49,6 @@ def loadPart(sampleDir):
|
|||
ranges[2][0] = getattr(File, 'range_z_min')
|
||||
ranges[2][1] = getattr(File, 'range_z_max')
|
||||
isObservation = getattr(File, 'is_observation')
|
||||
maskIndex = getattr(File, 'mask_index')
|
||||
File.close()
|
||||
mul = np.zeros((3))
|
||||
mul[:] = ranges[:,1] - ranges[:,0]
|
||||
|
@ -100,24 +99,8 @@ def loadPart(sampleDir):
|
|||
uniqueID = np.fromfile(File, dtype=np.int64,count=Np)
|
||||
chk = np.fromfile(File, dtype=np.int32,count=1)
|
||||
|
||||
## TEST - outputting of mock particles is temporary for debugging
|
||||
mockPart = []
|
||||
if isObservation == 1:
|
||||
mockPartx = x[maskIndex+1:Np]
|
||||
mockParty = y[maskIndex+1:Np]
|
||||
mockPartz = z[maskIndex+1:Np]
|
||||
|
||||
x = x[0:maskIndex]# * 100/300000
|
||||
y = y[0:maskIndex]# * 100/300000
|
||||
z = z[0:maskIndex]# * 100/300000
|
||||
RA = RA[0:maskIndex]
|
||||
Dec = Dec[0:maskIndex]
|
||||
redshift = redshift[0:maskIndex]
|
||||
uniqueID = uniqueID[0:maskIndex]
|
||||
|
||||
partData = np.column_stack((x,y,z))
|
||||
extraData = np.column_stack((RA,Dec,redshift,uniqueID))
|
||||
mockPart = np.column_stack((mockPartx, mockParty, mockPartz))
|
||||
|
||||
boxLen = mul
|
||||
|
||||
|
@ -144,7 +127,7 @@ def loadPart(sampleDir):
|
|||
|
||||
isObservationData = isObservation == 1
|
||||
|
||||
return partData, boxLen, volNorm, isObservationData, ranges, extraData, mockPart
|
||||
return partData, boxLen, volNorm, isObservationData, ranges, extraData
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
def getVolNorm(sampleDir):
|
||||
|
@ -161,7 +144,6 @@ def getVolNorm(sampleDir):
|
|||
ranges[2][0] = getattr(File, 'range_z_min')
|
||||
ranges[2][1] = getattr(File, 'range_z_max')
|
||||
isObservation = getattr(File, 'is_observation')
|
||||
maskIndex = getattr(File, 'mask_index')
|
||||
File.close()
|
||||
mul = np.zeros((3))
|
||||
mul[:] = ranges[:,1] - ranges[:,0]
|
||||
|
@ -193,7 +175,7 @@ def getVolNorm(sampleDir):
|
|||
selectionFuncFile=sample.selFunFile,
|
||||
useComoving=sample.useComoving)
|
||||
boxVol = props[0]
|
||||
volNormObs = maskIndex/boxVol
|
||||
volNormObs = Np/boxVol
|
||||
|
||||
return volNorm, volNormObs
|
||||
|
||||
|
@ -457,11 +439,10 @@ def loadVoidCatalog(sampleDir, dataPortion="central", loadParticles=True,
|
|||
|
||||
if loadParticles:
|
||||
print("Loading all particles...")
|
||||
partData, boxLen, volNorm, isObservationData, ranges, extraData, mockPart = loadPart(sampleDir)
|
||||
partData, boxLen, volNorm, isObservationData, ranges, extraData = loadPart(sampleDir)
|
||||
numPartTot = len(partData)
|
||||
catalog.numPartTot = numPartTot
|
||||
catalog.partPos = partData
|
||||
catalog.mockPart = mockPart
|
||||
catalog.part = []
|
||||
for i in range(len(partData)):
|
||||
catalog.part.append(Bunch(x = partData[i][0],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue