fixed some dependency calls with new layout

This commit is contained in:
Paul M. Sutter 2024-06-04 08:57:09 +02:00
parent 438407be74
commit d48d740b78
22 changed files with 32 additions and 49 deletions

View file

@ -24,7 +24,7 @@ import numpy as np
import scipy.integrate as integrate
import healpy as healpy
import os
from vide.backend import *
from backend import *
__all__=['expansion', 'angularDiameter', 'aveExpansion', 'getSurveyProps']

View file

@ -34,8 +34,8 @@ import subprocess
import sys
from pylab import figure
from netCDF4 import Dataset
from vide.backend.classes import *
from vide.backend.cosmologyTools import *
from backend.classes import *
from backend.cosmologyTools import *
import pickle
import scipy.interpolate as interpolate

View file

@ -30,5 +30,5 @@ setup(
version='3.0',
include_dirs = [np.get_include()],
packages=
['vide','vide.backend','vide.voidUtil'],
['backend','voidUtil'],
)

View file

@ -1,21 +0,0 @@
#+
# VIDE -- Void IDentification and Examination -- ./python_tools/vide/__init__.py
# Copyright (C) 2010-2014 Guilhem Lavaux
# Copyright (C) 2011-2014 P. M. Sutter
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#+
from .backend import *
from .voidUtil import *

View file

@ -23,8 +23,8 @@
# Stage 2 : find voids
# Stage 3 : prune catalog
from vide.backend import *
import vide
from backend import *
import voidUtil
import imp
import os
import pickle
@ -44,10 +44,10 @@ if (len(sys.argv) > 1):
parms = imp.load_source("name", filename)
regenerateFlag = False
globals().update(vars(parms))
void_path = os.path.split(vide.__file__)[0]
ZOBOV_PATH=f'{void_path}/bin/'
void_path = os.path.split(voidUtil.__file__)[0]
ZOBOV_PATH=f'{void_path}/../vide/bin/' # this needs to be cleaned up
CTOOLS_PATH=ZOBOV_PATH
print(f"ZOBOV_PATH is {ZOBOV_PATH}")
#print(f"ZOBOV_PATH is {ZOBOV_PATH}")
else:
print(" Using default parameters")
@ -105,7 +105,8 @@ for sample in dataSampleList:
launchZobov(sample, ZOBOV_PATH, zobovDir=zobovDir, logDir=logDir,
continueRun=continueRun, numZobovDivisions=numZobovDivisions,
numZobovThreads=numZobovThreads, mergingThreshold=mergingThreshold)
numZobovThreads=numZobovThreads,
mergingThreshold=mergingThreshold)
# -------------------------------------------------------------------------
if (startCatalogStage <= 3) and (endCatalogStage >= 3) and not sample.isCombo:
@ -119,7 +120,8 @@ for sample in dataSampleList:
launchPrune(sample, PRUNE_PATH,
logFile=logFile, zobovDir=zobovDir,
useComoving=sample.useComoving, continueRun=continueRun, mergingThreshold=mergingThreshold)
useComoving=sample.useComoving, continueRun=continueRun,
mergingThreshold=mergingThreshold)
# -------------------------------------------------------------------------
if (startCatalogStage <= 4) and (endCatalogStage >= 4):

View file

@ -22,7 +22,7 @@
import numpy as np
import os
import sys
import vide as vp
import backend as vp
import argparse
import imp
import subprocess
@ -53,7 +53,7 @@ parser.add_argument('--parm', dest='parm',
args = parser.parse_args()
defaultsFile = "@CMAKE_SOURCE_DIR@/python_tools/pipeline_source/defaults.py"
defaultsFile = "@CMAKE_SOURCE_DIR@/python_source/pipeline/defaults.py"
parms = imp.load_source("name", defaultsFile)
globals().update(vars(parms))
@ -162,7 +162,7 @@ def writeScript(setName, dataFileNameBase, dataFormat,
header = """#!/usr/bin/env/python
import os
from vide.backend.classes import *
from backend.classes import *
continueRun = {continueRun} # set to True to enable restarting aborted jobs
startCatalogStage = {startCatalogStage}
@ -345,7 +345,7 @@ for iSubSample in range(len(subSamples)):
else:
partFileList.append(particleFileBase.replace(particleFileDummy,
fileNums[iRedshift]))
if args.script or args.all:
print(" Doing subsample", thisSubSample, "scripts")
sys.stdout.flush()

View file

@ -23,7 +23,7 @@
import numpy as np
from netCDF4 import Dataset
import sys
from vide.backend import *
from backend import *
import pickle
from .periodic_kdtree import PeriodicCKDTree
import os
@ -542,7 +542,7 @@ def filterVoidsOnCoreDen(catalog, maxCoreDen):
# -----------------------------------------------------------------------------
def filterVoidsOnDenCon(catalog, minDenCon):
catalog.voids = [v for v in catalog.voids if v.densCon >= minDenCon]
catalog.numVoids = len(catalog.voids)
return catalog

View file

@ -20,7 +20,7 @@
#+
__all__=['compareCatalogs',]
from vide.backend import *
from backend import *
import imp
import pickle
import os

View file

@ -19,13 +19,13 @@
#+
__all__=['plotNumberFunction','plotEllipDist','plotVoidCells']
from vide.backend.classes import *
from backend.classes import *
from .plotDefs import *
import numpy as np
import os
import pylab as plt
import vide.backend.cosmologyTools as vp
from vide.voidUtil import getArray, shiftPart, getVoidPart
import backend.cosmologyTools as vp
from voidUtil import getArray, shiftPart, getVoidPart
def fill_between(x, y1, y2=0, ax=None, **kwargs):
"""Plot filled region between `y1` and `y2`.

View file

@ -19,8 +19,8 @@
#+
__all__=['buildProfile','fitHSWProfile','getHSWProfile',]
from vide.backend.classes import *
from vide.voidUtil import *
from backend.classes import *
from voidUtil import *
from .plotDefs import *
import numpy as np
import os

View file

@ -23,7 +23,7 @@ import matplotlib.pyplot as plt
import matplotlib.cm as cm
from matplotlib import rc
from . import xcorlib
from vide.voidUtil import getArray
from voidUtil import getArray
def computeXcor(catalog,
figDir="./",