mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
changed some things around for getting volume normalization to support reading old catalog files
This commit is contained in:
parent
40d7793e54
commit
f8f960d7dd
4 changed files with 7 additions and 6 deletions
|
@ -26,6 +26,7 @@ import healpy as healpy
|
|||
import os
|
||||
from backend import *
|
||||
from backend.cosmologyTools import *
|
||||
import pickle
|
||||
|
||||
from netCDF4 import Dataset
|
||||
NetCDFFile = Dataset
|
||||
|
@ -101,9 +102,10 @@ def getSurveyProps(sample):
|
|||
# returns the volume normalization factors:
|
||||
# normalization used by zobov (assumes cubmic volume)
|
||||
# normalization used in galaxy survey volume for observations
|
||||
def getVolNorm(sample):
|
||||
def getVolNorm(sampleDir):
|
||||
|
||||
sampleDir = sample.outputDir
|
||||
with open(sampleDir+"/sample_info.dat", 'rb') as input:
|
||||
sample = pickle.load(input)
|
||||
|
||||
infoFile = sampleDir+"/zobov_slice_"+sample.fullName+".par"
|
||||
File = NetCDFFile(infoFile, 'r')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue