changed some things around for getting volume normalization to support reading old catalog files

This commit is contained in:
Paul M. Sutter 2025-04-23 15:57:04 -04:00
parent 40d7793e54
commit f8f960d7dd
4 changed files with 7 additions and 6 deletions

View file

@ -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')