mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 15:21:11 +00:00
fixed some dependency calls with new layout
This commit is contained in:
parent
438407be74
commit
d48d740b78
22 changed files with 32 additions and 49 deletions
|
@ -81,7 +81,7 @@ ELSE()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
SET(PYTHONPATH ${PYTHON_LOCAL_SITE_PACKAGE})
|
SET(PYTHONPATH ${PYTHON_LOCAL_SITE_PACKAGE})
|
||||||
configure_exec(${CMAKE_SOURCE_DIR}/python_source/pipeline/vide_prepare_simulation
|
configure_exec(${CMAKE_SOURCE_DIR}/python_source/vide_pipeline/vide_prepare_simulation.py
|
||||||
${CMAKE_BINARY_DIR}/pipeline vide_prepare_simulation)
|
${CMAKE_BINARY_DIR}/pipeline vide_prepare_simulation)
|
||||||
#configure_exec(${CMAKE_SOURCE_DIR}/python_tools/pipeline_source/applyMaskToMock.in.py
|
#configure_exec(${CMAKE_SOURCE_DIR}/python_tools/pipeline_source/applyMaskToMock.in.py
|
||||||
#${CMAKE_BINARY_DIR}/pipeline applyMaskToMock.py)
|
#${CMAKE_BINARY_DIR}/pipeline applyMaskToMock.py)
|
||||||
|
@ -96,7 +96,7 @@ if (INSTALL_CTOOLS_IN_PYTHON)
|
||||||
else()
|
else()
|
||||||
SET(VIDE_BIN ${CMAKE_INSTALL_PREFIX}/bin)
|
SET(VIDE_BIN ${CMAKE_INSTALL_PREFIX}/bin)
|
||||||
endif()
|
endif()
|
||||||
message(STATUS "Vide binary directory: ${VIDE_BIN}")
|
message(STATUS "VIDE binary directory: ${VIDE_BIN}")
|
||||||
|
|
||||||
#add_custom_target(python_pipeline ALL
|
#add_custom_target(python_pipeline ALL
|
||||||
# COMMAND ${python_build_environment} ${CMAKE_SOURCE_DIR}/external/python_build.cmake
|
# COMMAND ${python_build_environment} ${CMAKE_SOURCE_DIR}/external/python_build.cmake
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from vide.backend.classes import *
|
from backend.classes import *
|
||||||
|
|
||||||
# if True, will scan log files for last known completed state and run from there
|
# if True, will scan log files for last known completed state and run from there
|
||||||
continueRun = False
|
continueRun = False
|
||||||
|
|
|
@ -24,7 +24,7 @@ import numpy as np
|
||||||
import scipy.integrate as integrate
|
import scipy.integrate as integrate
|
||||||
import healpy as healpy
|
import healpy as healpy
|
||||||
import os
|
import os
|
||||||
from vide.backend import *
|
from backend import *
|
||||||
|
|
||||||
__all__=['expansion', 'angularDiameter', 'aveExpansion', 'getSurveyProps']
|
__all__=['expansion', 'angularDiameter', 'aveExpansion', 'getSurveyProps']
|
||||||
|
|
|
@ -34,8 +34,8 @@ import subprocess
|
||||||
import sys
|
import sys
|
||||||
from pylab import figure
|
from pylab import figure
|
||||||
from netCDF4 import Dataset
|
from netCDF4 import Dataset
|
||||||
from vide.backend.classes import *
|
from backend.classes import *
|
||||||
from vide.backend.cosmologyTools import *
|
from backend.cosmologyTools import *
|
||||||
import pickle
|
import pickle
|
||||||
import scipy.interpolate as interpolate
|
import scipy.interpolate as interpolate
|
||||||
|
|
|
@ -30,5 +30,5 @@ setup(
|
||||||
version='3.0',
|
version='3.0',
|
||||||
include_dirs = [np.get_include()],
|
include_dirs = [np.get_include()],
|
||||||
packages=
|
packages=
|
||||||
['vide','vide.backend','vide.voidUtil'],
|
['backend','voidUtil'],
|
||||||
)
|
)
|
||||||
|
|
|
@ -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 *
|
|
|
@ -23,8 +23,8 @@
|
||||||
# Stage 2 : find voids
|
# Stage 2 : find voids
|
||||||
# Stage 3 : prune catalog
|
# Stage 3 : prune catalog
|
||||||
|
|
||||||
from vide.backend import *
|
from backend import *
|
||||||
import vide
|
import voidUtil
|
||||||
import imp
|
import imp
|
||||||
import os
|
import os
|
||||||
import pickle
|
import pickle
|
||||||
|
@ -44,10 +44,10 @@ if (len(sys.argv) > 1):
|
||||||
parms = imp.load_source("name", filename)
|
parms = imp.load_source("name", filename)
|
||||||
regenerateFlag = False
|
regenerateFlag = False
|
||||||
globals().update(vars(parms))
|
globals().update(vars(parms))
|
||||||
void_path = os.path.split(vide.__file__)[0]
|
void_path = os.path.split(voidUtil.__file__)[0]
|
||||||
ZOBOV_PATH=f'{void_path}/bin/'
|
ZOBOV_PATH=f'{void_path}/../vide/bin/' # this needs to be cleaned up
|
||||||
CTOOLS_PATH=ZOBOV_PATH
|
CTOOLS_PATH=ZOBOV_PATH
|
||||||
print(f"ZOBOV_PATH is {ZOBOV_PATH}")
|
#print(f"ZOBOV_PATH is {ZOBOV_PATH}")
|
||||||
else:
|
else:
|
||||||
print(" Using default parameters")
|
print(" Using default parameters")
|
||||||
|
|
||||||
|
@ -105,7 +105,8 @@ for sample in dataSampleList:
|
||||||
|
|
||||||
launchZobov(sample, ZOBOV_PATH, zobovDir=zobovDir, logDir=logDir,
|
launchZobov(sample, ZOBOV_PATH, zobovDir=zobovDir, logDir=logDir,
|
||||||
continueRun=continueRun, numZobovDivisions=numZobovDivisions,
|
continueRun=continueRun, numZobovDivisions=numZobovDivisions,
|
||||||
numZobovThreads=numZobovThreads, mergingThreshold=mergingThreshold)
|
numZobovThreads=numZobovThreads,
|
||||||
|
mergingThreshold=mergingThreshold)
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
if (startCatalogStage <= 3) and (endCatalogStage >= 3) and not sample.isCombo:
|
if (startCatalogStage <= 3) and (endCatalogStage >= 3) and not sample.isCombo:
|
||||||
|
@ -119,7 +120,8 @@ for sample in dataSampleList:
|
||||||
|
|
||||||
launchPrune(sample, PRUNE_PATH,
|
launchPrune(sample, PRUNE_PATH,
|
||||||
logFile=logFile, zobovDir=zobovDir,
|
logFile=logFile, zobovDir=zobovDir,
|
||||||
useComoving=sample.useComoving, continueRun=continueRun, mergingThreshold=mergingThreshold)
|
useComoving=sample.useComoving, continueRun=continueRun,
|
||||||
|
mergingThreshold=mergingThreshold)
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
if (startCatalogStage <= 4) and (endCatalogStage >= 4):
|
if (startCatalogStage <= 4) and (endCatalogStage >= 4):
|
|
@ -22,7 +22,7 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import vide as vp
|
import backend as vp
|
||||||
import argparse
|
import argparse
|
||||||
import imp
|
import imp
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -53,7 +53,7 @@ parser.add_argument('--parm', dest='parm',
|
||||||
args = parser.parse_args()
|
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)
|
parms = imp.load_source("name", defaultsFile)
|
||||||
globals().update(vars(parms))
|
globals().update(vars(parms))
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ def writeScript(setName, dataFileNameBase, dataFormat,
|
||||||
|
|
||||||
header = """#!/usr/bin/env/python
|
header = """#!/usr/bin/env/python
|
||||||
import os
|
import os
|
||||||
from vide.backend.classes import *
|
from backend.classes import *
|
||||||
|
|
||||||
continueRun = {continueRun} # set to True to enable restarting aborted jobs
|
continueRun = {continueRun} # set to True to enable restarting aborted jobs
|
||||||
startCatalogStage = {startCatalogStage}
|
startCatalogStage = {startCatalogStage}
|
||||||
|
@ -345,7 +345,7 @@ for iSubSample in range(len(subSamples)):
|
||||||
else:
|
else:
|
||||||
partFileList.append(particleFileBase.replace(particleFileDummy,
|
partFileList.append(particleFileBase.replace(particleFileDummy,
|
||||||
fileNums[iRedshift]))
|
fileNums[iRedshift]))
|
||||||
|
|
||||||
if args.script or args.all:
|
if args.script or args.all:
|
||||||
print(" Doing subsample", thisSubSample, "scripts")
|
print(" Doing subsample", thisSubSample, "scripts")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
|
@ -23,7 +23,7 @@
|
||||||
import numpy as np
|
import numpy as np
|
||||||
from netCDF4 import Dataset
|
from netCDF4 import Dataset
|
||||||
import sys
|
import sys
|
||||||
from vide.backend import *
|
from backend import *
|
||||||
import pickle
|
import pickle
|
||||||
from .periodic_kdtree import PeriodicCKDTree
|
from .periodic_kdtree import PeriodicCKDTree
|
||||||
import os
|
import os
|
||||||
|
@ -542,7 +542,7 @@ def filterVoidsOnCoreDen(catalog, maxCoreDen):
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
def filterVoidsOnDenCon(catalog, minDenCon):
|
def filterVoidsOnDenCon(catalog, minDenCon):
|
||||||
catalog.voids = [v for v in catalog.voids if v.densCon >= minDenCon]
|
catalog.voids = [v for v in catalog.voids if v.densCon >= minDenCon]
|
||||||
|
catalog.numVoids = len(catalog.voids)
|
||||||
return catalog
|
return catalog
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#+
|
#+
|
||||||
__all__=['compareCatalogs',]
|
__all__=['compareCatalogs',]
|
||||||
|
|
||||||
from vide.backend import *
|
from backend import *
|
||||||
import imp
|
import imp
|
||||||
import pickle
|
import pickle
|
||||||
import os
|
import os
|
|
@ -19,13 +19,13 @@
|
||||||
#+
|
#+
|
||||||
__all__=['plotNumberFunction','plotEllipDist','plotVoidCells']
|
__all__=['plotNumberFunction','plotEllipDist','plotVoidCells']
|
||||||
|
|
||||||
from vide.backend.classes import *
|
from backend.classes import *
|
||||||
from .plotDefs import *
|
from .plotDefs import *
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import os
|
import os
|
||||||
import pylab as plt
|
import pylab as plt
|
||||||
import vide.backend.cosmologyTools as vp
|
import backend.cosmologyTools as vp
|
||||||
from vide.voidUtil import getArray, shiftPart, getVoidPart
|
from voidUtil import getArray, shiftPart, getVoidPart
|
||||||
|
|
||||||
def fill_between(x, y1, y2=0, ax=None, **kwargs):
|
def fill_between(x, y1, y2=0, ax=None, **kwargs):
|
||||||
"""Plot filled region between `y1` and `y2`.
|
"""Plot filled region between `y1` and `y2`.
|
|
@ -19,8 +19,8 @@
|
||||||
#+
|
#+
|
||||||
__all__=['buildProfile','fitHSWProfile','getHSWProfile',]
|
__all__=['buildProfile','fitHSWProfile','getHSWProfile',]
|
||||||
|
|
||||||
from vide.backend.classes import *
|
from backend.classes import *
|
||||||
from vide.voidUtil import *
|
from voidUtil import *
|
||||||
from .plotDefs import *
|
from .plotDefs import *
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import os
|
import os
|
|
@ -23,7 +23,7 @@ import matplotlib.pyplot as plt
|
||||||
import matplotlib.cm as cm
|
import matplotlib.cm as cm
|
||||||
from matplotlib import rc
|
from matplotlib import rc
|
||||||
from . import xcorlib
|
from . import xcorlib
|
||||||
from vide.voidUtil import getArray
|
from voidUtil import getArray
|
||||||
|
|
||||||
def computeXcor(catalog,
|
def computeXcor(catalog,
|
||||||
figDir="./",
|
figDir="./",
|
4
setup.py
4
setup.py
|
@ -213,7 +213,7 @@ setup(name='vide',
|
||||||
setup_requires=['cython','setuptools','healpy','argparse','scipy','astropy','extension-helpers','netCDF4'],
|
setup_requires=['cython','setuptools','healpy','argparse','scipy','astropy','extension-helpers','netCDF4'],
|
||||||
install_requires=['argparse','scipy','astropy','extension-helpers','netCDF4','healpy'],
|
install_requires=['argparse','scipy','astropy','extension-helpers','netCDF4','healpy'],
|
||||||
ext_modules=[vide_extension],
|
ext_modules=[vide_extension],
|
||||||
description='The VIDE pipeline analysis for Cosmic Voids',
|
description='The VIDE pipeline for Cosmic Voids',
|
||||||
long_description=open("./README.md", 'r').read(),
|
long_description=open("./README.md", 'r').read(),
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
keywords="cosmology, interpolation, cmake, extension",
|
keywords="cosmology, interpolation, cmake, extension",
|
||||||
|
@ -236,3 +236,5 @@ setup(name='vide',
|
||||||
'install_scripts': install_scripts,
|
'install_scripts': install_scripts,
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
print("Installation finished. VIDE is ready to run!")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue