From 29723fff069883f768fc12d38ce4c35c3f376272 Mon Sep 17 00:00:00 2001 From: Guilhem Lavaux Date: Mon, 28 Apr 2014 08:52:27 +0200 Subject: [PATCH 01/13] updated copyright notice --- README | 2 +- analysis/datasetsToAnalyze.py | 6 +++--- analysis/xcor.py | 19 +++++++++++++++++++ build_tools/gather_sources.py | 17 +++++++++-------- c_tools/analysis/voidOverlap.cpp | 4 ++-- c_tools/hod/complex.h | 18 ++++++++++++++++++ c_tools/hod/header.h | 18 ++++++++++++++++++ c_tools/hod/nrutil.h | 18 ++++++++++++++++++ c_tools/libzobov/contour_pixels.cpp | 4 ++-- c_tools/libzobov/contour_pixels.hpp | 6 +++--- c_tools/libzobov/gslIntegrate.hpp | 6 +++--- c_tools/libzobov/loadZobov.cpp | 4 ++-- c_tools/libzobov/loadZobov.hpp | 6 +++--- c_tools/libzobov/particleInfo.cpp | 4 ++-- c_tools/libzobov/particleInfo.hpp | 6 +++--- c_tools/libzobov/voidTree.hpp | 6 +++--- c_tools/mock/generateFromCatalog.cpp | 4 ++-- c_tools/mock/generateMock.cpp | 4 ++-- c_tools/mock/generateTestMock.cpp | 4 ++-- c_tools/mock/loaders/basic_loader.cpp | 4 ++-- c_tools/mock/loaders/flash_loader.cpp | 4 ++-- c_tools/mock/loaders/gadget_loader.cpp | 4 ++-- c_tools/mock/loaders/multidark_loader.cpp | 4 ++-- c_tools/mock/loaders/ramses_loader.cpp | 4 ++-- c_tools/mock/loaders/sdf_loader.cpp | 4 ++-- c_tools/mock/loaders/sdfloader_internal.hpp | 6 +++--- c_tools/mock/loaders/simulation_loader.cpp | 4 ++-- c_tools/mock/loaders/simulation_loader.hpp | 6 +++--- c_tools/stacking/pruneVoids.cpp | 4 ++-- c_tools/zobov2/jozov2/jozov2.cpp | 18 ++++++++++++++++++ c_tools/zobov2/jozov2/jozov2.hpp | 18 ++++++++++++++++++ c_tools/zobov2/jozov2/jozov2_io.cpp | 18 ++++++++++++++++++ c_tools/zobov2/jozov2/jozov2_watershed.cpp | 18 ++++++++++++++++++ c_tools/zobov2/jozov2/jozov2_zones.cpp | 18 ++++++++++++++++++ c_tools/zobov2/jozov2/zobov.hpp | 18 ++++++++++++++++++ c_tools/zobov2/voz1b1/voz.h | 18 ++++++++++++++++++ c_tools/zobov2/voz1b1/voz1b1.cpp | 18 ++++++++++++++++++ c_tools/zobov2/voz1b1/voz_io.cpp | 18 ++++++++++++++++++ c_tools/zobov2/voz1b1/voz_io.hpp | 18 ++++++++++++++++++ crossCompare/analysis/makeCocenterProfiles.py | 19 +++++++++++++++++++ crossCompare/analysis/overlapVoids.py | 19 +++++++++++++++++++ crossCompare/parm/sampleParm.py | 19 +++++++++++++++++++ crossCompare/plotting/datasetsToPlot.py | 6 +++--- crossCompare/plotting/plotCocenterProfiles.py | 19 +++++++++++++++++++ crossCompare/plotting/plotDenMaps.py | 19 +++++++++++++++++++ crossCompare/plotting/plotMatchEllipRatio.py | 19 +++++++++++++++++++ crossCompare/plotting/plotMatchSizeRatio.py | 19 +++++++++++++++++++ crossCompare/plotting/plotNumberFunc.py | 19 +++++++++++++++++++ pipeline/datasets/example_observation.py | 6 +++--- pipeline/datasets/example_simulation.py | 6 +++--- pipeline/generateCatalog.py | 19 +++++++++++++++++++ python_tools/pipeline_source/defaults.py | 6 +++--- .../pipeline_source/prepareCatalogs.in.py | 19 +++++++++++++++++++ python_tools/setup.py | 4 ++-- python_tools/void_python_tools/__init__.py | 4 ++-- .../void_python_tools/apTools/__init__.py | 4 ++-- .../apTools/chi2/__init__.py | 4 ++-- .../apTools/chi2/cosmologyTools.py | 4 ++-- .../apTools/profiles/__init__.py | 4 ++-- .../apTools/profiles/getSurveyProps.py | 4 ++-- .../void_python_tools/backend/__init__.py | 4 ++-- .../void_python_tools/backend/classes.py | 4 ++-- .../void_python_tools/backend/launchers.py | 4 ++-- .../void_python_tools/partUtil/__init__.py | 6 +++--- .../void_python_tools/partUtil/partUtil.py | 6 +++--- .../void_python_tools/plotting/__init__.py | 4 ++-- .../void_python_tools/plotting/plotDefs.py | 4 ++-- .../void_python_tools/plotting/plotTools.py | 4 ++-- .../void_python_tools/xcor/__init__.py | 6 +++--- .../void_python_tools/xcor/xcorlib.py | 19 +++++++++++++++++++ 70 files changed, 573 insertions(+), 110 deletions(-) mode change 100755 => 100644 analysis/xcor.py mode change 100755 => 100644 crossCompare/analysis/makeCocenterProfiles.py mode change 100755 => 100644 crossCompare/analysis/overlapVoids.py mode change 100755 => 100644 crossCompare/parm/sampleParm.py mode change 100755 => 100644 crossCompare/plotting/plotCocenterProfiles.py mode change 100755 => 100644 crossCompare/plotting/plotDenMaps.py mode change 100755 => 100644 crossCompare/plotting/plotMatchEllipRatio.py mode change 100755 => 100644 crossCompare/plotting/plotMatchSizeRatio.py mode change 100755 => 100644 crossCompare/plotting/plotNumberFunc.py mode change 100755 => 100644 pipeline/generateCatalog.py diff --git a/README b/README index ab1889d..c29738f 100644 --- a/README +++ b/README @@ -12,7 +12,7 @@ This is VIDE, the Void IDentification and Examination pipeline. License/Copyright information ----------------------------- -Copyright (C) 2010-2013 Guilhem Lavaux, 2011-2013 P.M. Sutter. +Copyright (C) 2010-2014 Guilhem Lavaux, 2011-2014 P.M. Sutter. This software is put under the GNU Public License. Please see LICENSE for further information. diff --git a/analysis/datasetsToAnalyze.py b/analysis/datasetsToAnalyze.py index 1d3a922..d982424 100644 --- a/analysis/datasetsToAnalyze.py +++ b/analysis/datasetsToAnalyze.py @@ -1,7 +1,7 @@ #+ -# VIDE -- Void IDentification and Examination -- ./crossCompare/analysis/datasetsToAnalyze.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# VIDE -- Void IDentification and Examination -- ./analysis/datasetsToAnalyze.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 diff --git a/analysis/xcor.py b/analysis/xcor.py old mode 100755 new mode 100644 index fda7440..168899f --- a/analysis/xcor.py +++ b/analysis/xcor.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./analysis/xcor.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. +#+ #!/usr/bin/env python #+ # VIDE -- Void IDentification and Examination -- ./crossCompare/analysis/mergerTree.py diff --git a/build_tools/gather_sources.py b/build_tools/gather_sources.py index 472a4de..f4464bd 100644 --- a/build_tools/gather_sources.py +++ b/build_tools/gather_sources.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./build_tools/gather_sources.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 @@ -41,8 +41,8 @@ def apply_license(license, relimit, filename): def apply_python_license(filename): license="""#+ # VIDE -- Void IDentification and Examination -- @FILENAME@ -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 @@ -68,8 +68,8 @@ def apply_python_license(filename): def apply_cpp_license(filename): license="""/*+ VIDE -- Void IDentification and Examination -- @FILENAME@ - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 @@ -85,13 +85,14 @@ def apply_cpp_license(filename): 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +*/ """ - relimit = r'^(?s)/\*\+.*\+\*/' + relimit = r'^(?s)/\*\+.*\+\*/\n' print("C++ file: %s" % filename) apply_license(license, relimit, filename) def analyze_tree(prefix, t): - for ename,entry in t.items(): + for entry in t: + ename = entry.name if ename == 'external' or ename == 'zobov': continue if type(entry) == Tree: diff --git a/c_tools/analysis/voidOverlap.cpp b/c_tools/analysis/voidOverlap.cpp index 209e728..3d67b1a 100644 --- a/c_tools/analysis/voidOverlap.cpp +++ b/c_tools/analysis/voidOverlap.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/analysis/voidOverlap.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/hod/complex.h b/c_tools/hod/complex.h index 99e065d..29f20cb 100644 --- a/c_tools/hod/complex.h +++ b/c_tools/hod/complex.h @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/hod/complex.h + 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. ++*/ /* CAUTION: This is the ANSI C (only) version of the Numerical Recipes utility file complex.h. Do not confuse this file with the same-named file complex.h that is supplied in the 'misc' subdirectory. diff --git a/c_tools/hod/header.h b/c_tools/hod/header.h index e73f9ed..b20a72c 100644 --- a/c_tools/hod/header.h +++ b/c_tools/hod/header.h @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/hod/header.h + 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. ++*/ #include "nrutil.h" #include "stdlib.h" #include "stdio.h" diff --git a/c_tools/hod/nrutil.h b/c_tools/hod/nrutil.h index e4fed5d..c6702cb 100644 --- a/c_tools/hod/nrutil.h +++ b/c_tools/hod/nrutil.h @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/hod/nrutil.h + 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. ++*/ /* CAUTION: This is the ANSI C (only) version of the Numerical Recipes utility file nrutil.h. Do not confuse this file with the same-named file nrutil.h that is supplied in the 'misc' subdirectory. diff --git a/c_tools/libzobov/contour_pixels.cpp b/c_tools/libzobov/contour_pixels.cpp index 4ca2247..011acff 100644 --- a/c_tools/libzobov/contour_pixels.cpp +++ b/c_tools/libzobov/contour_pixels.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/libzobov/contour_pixels.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/libzobov/contour_pixels.hpp b/c_tools/libzobov/contour_pixels.hpp index 8095024..3837ecb 100644 --- a/c_tools/libzobov/contour_pixels.hpp +++ b/c_tools/libzobov/contour_pixels.hpp @@ -1,7 +1,7 @@ /*+ - VIDE -- Void IDEntification pipeline -- ./c_tools/libzobov/contour_pixels.hpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + VIDE -- Void IDentification and Examination -- ./c_tools/libzobov/contour_pixels.hpp + 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 diff --git a/c_tools/libzobov/gslIntegrate.hpp b/c_tools/libzobov/gslIntegrate.hpp index 140ec81..99aae5f 100644 --- a/c_tools/libzobov/gslIntegrate.hpp +++ b/c_tools/libzobov/gslIntegrate.hpp @@ -1,7 +1,7 @@ /*+ - VIDE -- Void IDEntification pipeline -- ./c_tools/libzobov/gslIntegrate.hpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + VIDE -- Void IDentification and Examination -- ./c_tools/libzobov/gslIntegrate.hpp + 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 diff --git a/c_tools/libzobov/loadZobov.cpp b/c_tools/libzobov/loadZobov.cpp index 2b5fbb1..2f1c7a6 100644 --- a/c_tools/libzobov/loadZobov.cpp +++ b/c_tools/libzobov/loadZobov.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/libzobov/loadZobov.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/libzobov/loadZobov.hpp b/c_tools/libzobov/loadZobov.hpp index 0bcf70a..84e32ed 100644 --- a/c_tools/libzobov/loadZobov.hpp +++ b/c_tools/libzobov/loadZobov.hpp @@ -1,7 +1,7 @@ /*+ - VIDE -- Void IDEntification pipeline -- ./c_tools/libzobov/loadZobov.hpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + VIDE -- Void IDentification and Examination -- ./c_tools/libzobov/loadZobov.hpp + 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 diff --git a/c_tools/libzobov/particleInfo.cpp b/c_tools/libzobov/particleInfo.cpp index 59d0864..398209e 100644 --- a/c_tools/libzobov/particleInfo.cpp +++ b/c_tools/libzobov/particleInfo.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/libzobov/particleInfo.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/libzobov/particleInfo.hpp b/c_tools/libzobov/particleInfo.hpp index 325be23..7c306a3 100644 --- a/c_tools/libzobov/particleInfo.hpp +++ b/c_tools/libzobov/particleInfo.hpp @@ -1,7 +1,7 @@ /*+ - VIDE -- Void IDEntification pipeline -- ./c_tools/libzobov/particleInfo.hpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + VIDE -- Void IDentification and Examination -- ./c_tools/libzobov/particleInfo.hpp + 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 diff --git a/c_tools/libzobov/voidTree.hpp b/c_tools/libzobov/voidTree.hpp index f958547..3e11c6b 100644 --- a/c_tools/libzobov/voidTree.hpp +++ b/c_tools/libzobov/voidTree.hpp @@ -1,7 +1,7 @@ /*+ - VIDE -- Void IDEntification pipeline -- ./c_tools/libzobov/voidTree.hpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + VIDE -- Void IDentification and Examination -- ./c_tools/libzobov/voidTree.hpp + 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 diff --git a/c_tools/mock/generateFromCatalog.cpp b/c_tools/mock/generateFromCatalog.cpp index b9d09e2..e3c3937 100644 --- a/c_tools/mock/generateFromCatalog.cpp +++ b/c_tools/mock/generateFromCatalog.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/mock/generateFromCatalog.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/mock/generateMock.cpp b/c_tools/mock/generateMock.cpp index 7f44b99..6e26d7e 100644 --- a/c_tools/mock/generateMock.cpp +++ b/c_tools/mock/generateMock.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/mock/generateMock.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/mock/generateTestMock.cpp b/c_tools/mock/generateTestMock.cpp index 1099dbb..9abf618 100644 --- a/c_tools/mock/generateTestMock.cpp +++ b/c_tools/mock/generateTestMock.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/mock/generateTestMock.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/mock/loaders/basic_loader.cpp b/c_tools/mock/loaders/basic_loader.cpp index 31254b6..0cefba0 100644 --- a/c_tools/mock/loaders/basic_loader.cpp +++ b/c_tools/mock/loaders/basic_loader.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/basic_loader.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/mock/loaders/flash_loader.cpp b/c_tools/mock/loaders/flash_loader.cpp index 02e7df7..30cf8a3 100644 --- a/c_tools/mock/loaders/flash_loader.cpp +++ b/c_tools/mock/loaders/flash_loader.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/flash_loader.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/mock/loaders/gadget_loader.cpp b/c_tools/mock/loaders/gadget_loader.cpp index 6abd00d..804bb40 100644 --- a/c_tools/mock/loaders/gadget_loader.cpp +++ b/c_tools/mock/loaders/gadget_loader.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/gadget_loader.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/mock/loaders/multidark_loader.cpp b/c_tools/mock/loaders/multidark_loader.cpp index b9d0118..01a37dd 100644 --- a/c_tools/mock/loaders/multidark_loader.cpp +++ b/c_tools/mock/loaders/multidark_loader.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/multidark_loader.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/mock/loaders/ramses_loader.cpp b/c_tools/mock/loaders/ramses_loader.cpp index f6bcf81..938ea77 100644 --- a/c_tools/mock/loaders/ramses_loader.cpp +++ b/c_tools/mock/loaders/ramses_loader.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/ramses_loader.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/mock/loaders/sdf_loader.cpp b/c_tools/mock/loaders/sdf_loader.cpp index eb02eb0..f72aae6 100644 --- a/c_tools/mock/loaders/sdf_loader.cpp +++ b/c_tools/mock/loaders/sdf_loader.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/sdf_loader.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/mock/loaders/sdfloader_internal.hpp b/c_tools/mock/loaders/sdfloader_internal.hpp index fb00537..7fc91b4 100644 --- a/c_tools/mock/loaders/sdfloader_internal.hpp +++ b/c_tools/mock/loaders/sdfloader_internal.hpp @@ -1,7 +1,7 @@ /*+ - VIDE -- Void IDEntification pipeline -- ./c_tools/mock/loaders/sdfloader_internal.hpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/sdfloader_internal.hpp + 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 diff --git a/c_tools/mock/loaders/simulation_loader.cpp b/c_tools/mock/loaders/simulation_loader.cpp index e5cc53e..80e09b2 100644 --- a/c_tools/mock/loaders/simulation_loader.cpp +++ b/c_tools/mock/loaders/simulation_loader.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/simulation_loader.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/mock/loaders/simulation_loader.hpp b/c_tools/mock/loaders/simulation_loader.hpp index ba8b2da..8805702 100644 --- a/c_tools/mock/loaders/simulation_loader.hpp +++ b/c_tools/mock/loaders/simulation_loader.hpp @@ -1,7 +1,7 @@ /*+ - VIDE -- Void IDEntification pipeline -- ./c_tools/mock/loaders/simulation_loader.hpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + VIDE -- Void IDentification and Examination -- ./c_tools/mock/loaders/simulation_loader.hpp + 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 diff --git a/c_tools/stacking/pruneVoids.cpp b/c_tools/stacking/pruneVoids.cpp index ae27469..a6c0c9d 100644 --- a/c_tools/stacking/pruneVoids.cpp +++ b/c_tools/stacking/pruneVoids.cpp @@ -1,7 +1,7 @@ /*+ VIDE -- Void IDentification and Examination -- ./c_tools/stacking/pruneVoids.cpp - Copyright (C) 2010-2013 Guilhem Lavaux - Copyright (C) 2011-2013 P. M. Sutter + 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 diff --git a/c_tools/zobov2/jozov2/jozov2.cpp b/c_tools/zobov2/jozov2/jozov2.cpp index 718b8e9..f4cb142 100644 --- a/c_tools/zobov2/jozov2/jozov2.cpp +++ b/c_tools/zobov2/jozov2/jozov2.cpp @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/zobov2/jozov2/jozov2.cpp + 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. ++*/ #include #include #include diff --git a/c_tools/zobov2/jozov2/jozov2.hpp b/c_tools/zobov2/jozov2/jozov2.hpp index f23d3c9..5def611 100644 --- a/c_tools/zobov2/jozov2/jozov2.hpp +++ b/c_tools/zobov2/jozov2/jozov2.hpp @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/zobov2/jozov2/jozov2.hpp + 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. ++*/ #ifndef __JOZOV2_HPP #define __JOZOV2_HPP diff --git a/c_tools/zobov2/jozov2/jozov2_io.cpp b/c_tools/zobov2/jozov2/jozov2_io.cpp index 3632745..cc6abf7 100644 --- a/c_tools/zobov2/jozov2/jozov2_io.cpp +++ b/c_tools/zobov2/jozov2/jozov2_io.cpp @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/zobov2/jozov2/jozov2_io.cpp + 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. ++*/ #include #include #include diff --git a/c_tools/zobov2/jozov2/jozov2_watershed.cpp b/c_tools/zobov2/jozov2/jozov2_watershed.cpp index 365e836..7382c93 100644 --- a/c_tools/zobov2/jozov2/jozov2_watershed.cpp +++ b/c_tools/zobov2/jozov2/jozov2_watershed.cpp @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/zobov2/jozov2/jozov2_watershed.cpp + 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. ++*/ #ifdef OPENMP #include #endif diff --git a/c_tools/zobov2/jozov2/jozov2_zones.cpp b/c_tools/zobov2/jozov2/jozov2_zones.cpp index 19d3357..e091c3d 100644 --- a/c_tools/zobov2/jozov2/jozov2_zones.cpp +++ b/c_tools/zobov2/jozov2/jozov2_zones.cpp @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/zobov2/jozov2/jozov2_zones.cpp + 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. ++*/ #include #include #include "jozov2.hpp" diff --git a/c_tools/zobov2/jozov2/zobov.hpp b/c_tools/zobov2/jozov2/zobov.hpp index 832f071..e083ffa 100644 --- a/c_tools/zobov2/jozov2/zobov.hpp +++ b/c_tools/zobov2/jozov2/zobov.hpp @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/zobov2/jozov2/zobov.hpp + 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. ++*/ #ifndef __ZOBOV_HPP #define __ZOBOV_HPP diff --git a/c_tools/zobov2/voz1b1/voz.h b/c_tools/zobov2/voz1b1/voz.h index 1d48e92..5294f86 100644 --- a/c_tools/zobov2/voz1b1/voz.h +++ b/c_tools/zobov2/voz1b1/voz.h @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/zobov2/voz1b1/voz.h + 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. ++*/ #ifndef __VOZ_H #define __VOZ_H diff --git a/c_tools/zobov2/voz1b1/voz1b1.cpp b/c_tools/zobov2/voz1b1/voz1b1.cpp index d9ff28a..f0aef3f 100644 --- a/c_tools/zobov2/voz1b1/voz1b1.cpp +++ b/c_tools/zobov2/voz1b1/voz1b1.cpp @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/zobov2/voz1b1/voz1b1.cpp + 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. ++*/ #include #include #include diff --git a/c_tools/zobov2/voz1b1/voz_io.cpp b/c_tools/zobov2/voz1b1/voz_io.cpp index d8dea31..07d489a 100644 --- a/c_tools/zobov2/voz1b1/voz_io.cpp +++ b/c_tools/zobov2/voz1b1/voz_io.cpp @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/zobov2/voz1b1/voz_io.cpp + 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. ++*/ #include #include #include diff --git a/c_tools/zobov2/voz1b1/voz_io.hpp b/c_tools/zobov2/voz1b1/voz_io.hpp index 77a1e5c..70cba30 100644 --- a/c_tools/zobov2/voz1b1/voz_io.hpp +++ b/c_tools/zobov2/voz1b1/voz_io.hpp @@ -1,3 +1,21 @@ +/*+ + VIDE -- Void IDentification and Examination -- ./c_tools/zobov2/voz1b1/voz_io.hpp + 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. ++*/ #ifndef __VOZ_IO_HPP #define __VOZ_IO_HPP diff --git a/crossCompare/analysis/makeCocenterProfiles.py b/crossCompare/analysis/makeCocenterProfiles.py old mode 100755 new mode 100644 index 685aa85..4274936 --- a/crossCompare/analysis/makeCocenterProfiles.py +++ b/crossCompare/analysis/makeCocenterProfiles.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./crossCompare/analysis/makeCocenterProfiles.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. +#+ #!/usr/bin/env python #+ # VIDE -- Void IDentification and Examination -- ./pipeline/apAnalysis.py diff --git a/crossCompare/analysis/overlapVoids.py b/crossCompare/analysis/overlapVoids.py old mode 100755 new mode 100644 index f20450a..269e9b1 --- a/crossCompare/analysis/overlapVoids.py +++ b/crossCompare/analysis/overlapVoids.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./crossCompare/analysis/overlapVoids.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. +#+ #!/usr/bin/env python #+ # VIDE -- Void IDentification and Examination -- ./crossCompare/analysis/mergerTree.py diff --git a/crossCompare/parm/sampleParm.py b/crossCompare/parm/sampleParm.py old mode 100755 new mode 100644 index e2381d0..7aa74b2 --- a/crossCompare/parm/sampleParm.py +++ b/crossCompare/parm/sampleParm.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./crossCompare/parm/sampleParm.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. +#+ #!/usr/bin/env python diff --git a/crossCompare/plotting/datasetsToPlot.py b/crossCompare/plotting/datasetsToPlot.py index 19002cf..c1ebf1a 100644 --- a/crossCompare/plotting/datasetsToPlot.py +++ b/crossCompare/plotting/datasetsToPlot.py @@ -1,7 +1,7 @@ #+ -# VIDE -- Void IDEntification pipeline -- ./crossCompare/plotting/datasetsToPlot.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/datasetsToPlot.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 diff --git a/crossCompare/plotting/plotCocenterProfiles.py b/crossCompare/plotting/plotCocenterProfiles.py old mode 100755 new mode 100644 index fbb861e..a14e7b0 --- a/crossCompare/plotting/plotCocenterProfiles.py +++ b/crossCompare/plotting/plotCocenterProfiles.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/plotCocenterProfiles.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. +#+ #!/usr/bin/env python #+ # VIDE -- Void IDentification and Examination -- ./pipeline/apAnalysis.py diff --git a/crossCompare/plotting/plotDenMaps.py b/crossCompare/plotting/plotDenMaps.py old mode 100755 new mode 100644 index a690bfb..a12c1a2 --- a/crossCompare/plotting/plotDenMaps.py +++ b/crossCompare/plotting/plotDenMaps.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/plotDenMaps.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. +#+ #!/usr/bin/env python #+ # VIDE -- Void IDentification and Examination -- ./pipeline/apAnalysis.py diff --git a/crossCompare/plotting/plotMatchEllipRatio.py b/crossCompare/plotting/plotMatchEllipRatio.py old mode 100755 new mode 100644 index 6793127..7847809 --- a/crossCompare/plotting/plotMatchEllipRatio.py +++ b/crossCompare/plotting/plotMatchEllipRatio.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/plotMatchEllipRatio.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. +#+ #!/usr/bin/env python # plots cumulative distributions of number counts diff --git a/crossCompare/plotting/plotMatchSizeRatio.py b/crossCompare/plotting/plotMatchSizeRatio.py old mode 100755 new mode 100644 index 215b6d2..315fed1 --- a/crossCompare/plotting/plotMatchSizeRatio.py +++ b/crossCompare/plotting/plotMatchSizeRatio.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/plotMatchSizeRatio.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. +#+ #!/usr/bin/env python # plots cumulative distributions of number counts diff --git a/crossCompare/plotting/plotNumberFunc.py b/crossCompare/plotting/plotNumberFunc.py old mode 100755 new mode 100644 index 00ee6ec..12c022c --- a/crossCompare/plotting/plotNumberFunc.py +++ b/crossCompare/plotting/plotNumberFunc.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/plotNumberFunc.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. +#+ #!/usr/bin/env python # plots cumulative distributions of number counts diff --git a/pipeline/datasets/example_observation.py b/pipeline/datasets/example_observation.py index bde05a1..f84a964 100644 --- a/pipeline/datasets/example_observation.py +++ b/pipeline/datasets/example_observation.py @@ -1,7 +1,7 @@ #+ -# VIDE -- Void IDentification and Examination -- ./pipeline/sdss/sdss_dr7LCDM.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# VIDE -- Void IDentification and Examination -- ./pipeline/datasets/example_observation.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 diff --git a/pipeline/datasets/example_simulation.py b/pipeline/datasets/example_simulation.py index 44191fa..be30a18 100644 --- a/pipeline/datasets/example_simulation.py +++ b/pipeline/datasets/example_simulation.py @@ -1,7 +1,7 @@ #+ -# VIDE -- Void IDEntification pipeline -- ./pipeline/datasets/mergertree.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# VIDE -- Void IDentification and Examination -- ./pipeline/datasets/example_simulation.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 diff --git a/pipeline/generateCatalog.py b/pipeline/generateCatalog.py old mode 100755 new mode 100644 index bf71148..1403e8d --- a/pipeline/generateCatalog.py +++ b/pipeline/generateCatalog.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./pipeline/generateCatalog.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. +#+ #!/usr/bin/env python #+ # VIDE -- Void IDentification and Examination -- ./pipeline/generateCatalog.py diff --git a/python_tools/pipeline_source/defaults.py b/python_tools/pipeline_source/defaults.py index f675ff3..75488d2 100644 --- a/python_tools/pipeline_source/defaults.py +++ b/python_tools/pipeline_source/defaults.py @@ -1,7 +1,7 @@ #+ -# VIDE -- Void IDentification and Examination -- ./pipeline/datasets/mergertree.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# VIDE -- Void IDentification and Examination -- ./python_tools/pipeline_source/defaults.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 diff --git a/python_tools/pipeline_source/prepareCatalogs.in.py b/python_tools/pipeline_source/prepareCatalogs.in.py index b718fe3..1b43885 100644 --- a/python_tools/pipeline_source/prepareCatalogs.in.py +++ b/python_tools/pipeline_source/prepareCatalogs.in.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./python_tools/pipeline_source/prepareCatalogs.in.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. +#+ #!/usr/bin/env python #+ # VIDE -- Void IDentification and Examination -- ./python_tools/pipeline_source/prepareCatalogs.in.py diff --git a/python_tools/setup.py b/python_tools/setup.py index 482837d..b844a77 100644 --- a/python_tools/setup.py +++ b/python_tools/setup.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/setup.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/__init__.py b/python_tools/void_python_tools/__init__.py index fd37450..1fa20d0 100644 --- a/python_tools/void_python_tools/__init__.py +++ b/python_tools/void_python_tools/__init__.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/__init__.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/apTools/__init__.py b/python_tools/void_python_tools/apTools/__init__.py index f6af7d9..a685d74 100644 --- a/python_tools/void_python_tools/apTools/__init__.py +++ b/python_tools/void_python_tools/apTools/__init__.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/apTools/__init__.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/apTools/chi2/__init__.py b/python_tools/void_python_tools/apTools/chi2/__init__.py index c85f49f..6d43595 100644 --- a/python_tools/void_python_tools/apTools/chi2/__init__.py +++ b/python_tools/void_python_tools/apTools/chi2/__init__.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/apTools/chi2/__init__.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/apTools/chi2/cosmologyTools.py b/python_tools/void_python_tools/apTools/chi2/cosmologyTools.py index 9b01534..9e28541 100644 --- a/python_tools/void_python_tools/apTools/chi2/cosmologyTools.py +++ b/python_tools/void_python_tools/apTools/chi2/cosmologyTools.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/apTools/chi2/cosmologyTools.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/apTools/profiles/__init__.py b/python_tools/void_python_tools/apTools/profiles/__init__.py index 6015350..d9dc59b 100644 --- a/python_tools/void_python_tools/apTools/profiles/__init__.py +++ b/python_tools/void_python_tools/apTools/profiles/__init__.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/apTools/profiles/__init__.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/apTools/profiles/getSurveyProps.py b/python_tools/void_python_tools/apTools/profiles/getSurveyProps.py index c3d37c7..d66b3c6 100644 --- a/python_tools/void_python_tools/apTools/profiles/getSurveyProps.py +++ b/python_tools/void_python_tools/apTools/profiles/getSurveyProps.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/apTools/profiles/getSurveyProps.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/backend/__init__.py b/python_tools/void_python_tools/backend/__init__.py index db12e12..a3bd500 100644 --- a/python_tools/void_python_tools/backend/__init__.py +++ b/python_tools/void_python_tools/backend/__init__.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/backend/__init__.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/backend/classes.py b/python_tools/void_python_tools/backend/classes.py index 40d5b62..324614b 100644 --- a/python_tools/void_python_tools/backend/classes.py +++ b/python_tools/void_python_tools/backend/classes.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/backend/classes.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/backend/launchers.py b/python_tools/void_python_tools/backend/launchers.py index 1a56372..e3cc6ba 100644 --- a/python_tools/void_python_tools/backend/launchers.py +++ b/python_tools/void_python_tools/backend/launchers.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/backend/launchers.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/partUtil/__init__.py b/python_tools/void_python_tools/partUtil/__init__.py index 7e0c1f8..3992494 100644 --- a/python_tools/void_python_tools/partUtil/__init__.py +++ b/python_tools/void_python_tools/partUtil/__init__.py @@ -1,7 +1,7 @@ #+ -# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/__init__.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/partUtil/__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 diff --git a/python_tools/void_python_tools/partUtil/partUtil.py b/python_tools/void_python_tools/partUtil/partUtil.py index 4f695e1..1e6802d 100644 --- a/python_tools/void_python_tools/partUtil/partUtil.py +++ b/python_tools/void_python_tools/partUtil/partUtil.py @@ -1,7 +1,7 @@ #+ -# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/__init__.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/partUtil/partUtil.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 diff --git a/python_tools/void_python_tools/plotting/__init__.py b/python_tools/void_python_tools/plotting/__init__.py index c53f8af..d00996e 100644 --- a/python_tools/void_python_tools/plotting/__init__.py +++ b/python_tools/void_python_tools/plotting/__init__.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/__init__.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/plotting/plotDefs.py b/python_tools/void_python_tools/plotting/plotDefs.py index fbdaf02..2de8e15 100644 --- a/python_tools/void_python_tools/plotting/plotDefs.py +++ b/python_tools/void_python_tools/plotting/plotDefs.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/plotDefs.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/plotting/plotTools.py b/python_tools/void_python_tools/plotting/plotTools.py index 8dca84b..3de824b 100644 --- a/python_tools/void_python_tools/plotting/plotTools.py +++ b/python_tools/void_python_tools/plotting/plotTools.py @@ -1,7 +1,7 @@ #+ # VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/plotTools.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# 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 diff --git a/python_tools/void_python_tools/xcor/__init__.py b/python_tools/void_python_tools/xcor/__init__.py index 31dc0a5..af03f0a 100644 --- a/python_tools/void_python_tools/xcor/__init__.py +++ b/python_tools/void_python_tools/xcor/__init__.py @@ -1,7 +1,7 @@ #+ -# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/__init__.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 P. M. Sutter +# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/xcor/__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 diff --git a/python_tools/void_python_tools/xcor/xcorlib.py b/python_tools/void_python_tools/xcor/xcorlib.py index 535c90d..9200dee 100644 --- a/python_tools/void_python_tools/xcor/xcorlib.py +++ b/python_tools/void_python_tools/xcor/xcorlib.py @@ -1,3 +1,22 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/xcor/xcorlib.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. +#+ import numpy as np def cic( x, Lbox, Lboxcut = 0, Nmesh = 128, weights = None ): From d5d9ebc3e1c8dbc57335600bbeb2d36b60583601 Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Tue, 6 May 2014 10:24:45 -0500 Subject: [PATCH 02/13] fixed cmakelists --- CMakeLists.txt | 4 +-- c_tools/CMakeLists.txt | 6 ++--- c_tools/stacking/CMakeLists.txt | 48 ++++++++++++++++----------------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2dfc7d4..22f2faa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,9 +71,9 @@ configure_exec(${CMAKE_SOURCE_DIR}/run_env.sh.in ${CMAKE_BINARY_DIR} run_env.sh configure_exec(${CMAKE_SOURCE_DIR}/python_tools/pipeline_source/prepareCatalogs.in.py ${CMAKE_BINARY_DIR}/pipeline prepareCatalogs.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) #configure_exec(${CMAKE_SOURCE_DIR}/python_tools/pipeline_source/buildSkyProjections.in.py -${CMAKE_BINARY_DIR}/pipeline/miscTools buildSkyProjections.py) +#${CMAKE_BINARY_DIR}/pipeline/miscTools buildSkyProjections.py) SET(python_build_environment ${CMAKE_COMMAND} -DPYTHON_LOCAL_SITE_PACKAGE=${PYTHON_LOCAL_SITE_PACKAGE} -DVOID_GSL=${CMAKE_BINARY_DIR}/ext_build/gsl -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -DTARGET_PATH=${CMAKE_BINARY_DIR}/ext_build/python -P) diff --git a/c_tools/CMakeLists.txt b/c_tools/CMakeLists.txt index 863d264..22f2026 100644 --- a/c_tools/CMakeLists.txt +++ b/c_tools/CMakeLists.txt @@ -44,7 +44,7 @@ include_directories( set(computeAverageDistortion_SRCS computeAverageDistortion.cpp) add_genopt(computeAverageDistortion_SRCS computeAverageDistortion.ggo computeAverageDistortion_conf STRUCTNAME Params) -add_executable(computeAverageDistortion ${computeAverageDistortion_SRCS}) -target_link_libraries(computeAverageDistortion ${ZOB_LIBS}) +#add_executable(computeAverageDistortion ${computeAverageDistortion_SRCS}) +#target_link_libraries(computeAverageDistortion ${ZOB_LIBS}) -subdirs(libzobov test mock stacking visualization analysis zobov2 hod) +subdirs(libzobov mock stacking analysis zobov2 hod) diff --git a/c_tools/stacking/CMakeLists.txt b/c_tools/stacking/CMakeLists.txt index fce1f3d..27ec89a 100644 --- a/c_tools/stacking/CMakeLists.txt +++ b/c_tools/stacking/CMakeLists.txt @@ -1,39 +1,39 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR}) -SET(stackVoids_SRCS stackVoids.cpp) -add_genopt(stackVoids_SRCS stackVoids.ggo stackVoids_conf STRUCTNAME stackVoids_info) -add_executable(stackVoids ${stackVoids_SRCS}) -target_link_libraries(stackVoids ${ZOB_LIBS}) +#SET(stackVoids_SRCS stackVoids.cpp) +#add_genopt(stackVoids_SRCS stackVoids.ggo stackVoids_conf STRUCTNAME stackVoids_info) +#add_executable(stackVoids ${stackVoids_SRCS}) +#target_link_libraries(stackVoids ${ZOB_LIBS}) -SET(stackVoidsZero_SRCS stackVoidsZero.cpp) -add_genopt(stackVoidsZero_SRCS stackVoidsZero.ggo stackVoidsZero_conf STRUCTNAME stackVoidsZero_info) -add_executable(stackVoidsZero ${stackVoidsZero_SRCS}) -target_link_libraries(stackVoidsZero ${ZOB_LIBS}) +#SET(stackVoidsZero_SRCS stackVoidsZero.cpp) +#add_genopt(stackVoidsZero_SRCS stackVoidsZero.ggo stackVoidsZero_conf STRUCTNAME stackVoidsZero_info) +#add_executable(stackVoidsZero ${stackVoidsZero_SRCS}) +#target_link_libraries(stackVoidsZero ${ZOB_LIBS}) -set(computeVelocityProfile_SRCS computeVelocityProfile.cpp) -add_genopt(computeVelocityProfile_SRCS computeVelocityProfile.ggo computeVelocityProfile_conf STRUCT Params) -add_executable(computeVelocityProfile ${computeVelocityProfile_SRCS}) -target_link_libraries(computeVelocityProfile ${ZOB_LIBS}) +#set(computeVelocityProfile_SRCS computeVelocityProfile.cpp) +#add_genopt(computeVelocityProfile_SRCS computeVelocityProfile.ggo computeVelocityProfile_conf STRUCT Params) +#add_executable(computeVelocityProfile ${computeVelocityProfile_SRCS}) +#target_link_libraries(computeVelocityProfile ${ZOB_LIBS}) -set(stackDensityField_SRCS stackDensityField.cpp) -add_genopt(stackDensityField_SRCS stackDensityField.ggo stackDensityField_conf STRUCT PARAMS) -add_executable(stackDensityField ${stackDensityField_SRCS}) -target_link_libraries(stackDensityField ${ZOB_LIBS}) +#set(stackDensityField_SRCS stackDensityField.cpp) +#add_genopt(stackDensityField_SRCS stackDensityField.ggo stackDensityField_conf STRUCT PARAMS) +#add_executable(stackDensityField ${stackDensityField_SRCS}) +#target_link_libraries(stackDensityField ${ZOB_LIBS}) -set(stackVelocityField_SRCS stackVelocityField.cpp) -add_genopt(stackVelocityField_SRCS stackVelocityField.ggo stackVelocityField_conf STRUCT PARAMS) -add_executable(stackVelocityField ${stackVelocityField_SRCS}) -target_link_libraries(stackVelocityField ${ZOB_LIBS}) +#set(stackVelocityField_SRCS stackVelocityField.cpp) +#add_genopt(stackVelocityField_SRCS stackVelocityField.ggo stackVelocityField_conf STRUCT PARAMS) +#add_executable(stackVelocityField ${stackVelocityField_SRCS}) +#target_link_libraries(stackVelocityField ${ZOB_LIBS}) SET(pruneVoids_SRCS pruneVoids.cpp) add_genopt(pruneVoids_SRCS pruneVoids.ggo pruneVoids_conf STRUCTNAME pruneVoids_info) add_executable(pruneVoids ${pruneVoids_SRCS}) target_link_libraries(pruneVoids ${ZOB_LIBS}) -SET(makeAHFOutput_SRCS makeAHFOutput.cpp) -add_genopt(makeAHFOutput_SRCS makeAHFOutput.ggo makeAHFOutput_conf STRUCTNAME makeAHFOutput_info) -add_executable(makeAHFOutput ${makeAHFOutput_SRCS}) -target_link_libraries(makeAHFOutput ${ZOB_LIBS}) +#SET(makeAHFOutput_SRCS makeAHFOutput.cpp) +#add_genopt(makeAHFOutput_SRCS makeAHFOutput.ggo makeAHFOutput_conf STRUCTNAME makeAHFOutput_info) +#add_executable(makeAHFOutput ${makeAHFOutput_SRCS}) +#target_link_libraries(makeAHFOutput ${ZOB_LIBS}) From b441758a646c844e01e98e0c66e918427d172b06 Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Tue, 6 May 2014 14:05:20 -0500 Subject: [PATCH 03/13] fixed python setup --- python_tools/setup.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/python_tools/setup.py b/python_tools/setup.py index b844a77..9581849 100644 --- a/python_tools/setup.py +++ b/python_tools/setup.py @@ -34,9 +34,9 @@ setup( ['void_python_tools','void_python_tools.backend','void_python_tools.apTools', 'void_python_tools.xcor', 'void_python_tools.partUtil', 'void_python_tools.apTools.profiles','void_python_tools.apTools.chi2', 'void_python_tools.plotting'], #ext_modules = [Extension("void_python_tools.chi2.velocityProfileFitNative", ["void_python_tools/chi2/velocityProfileFitNative.pyx"], libraries=["gsl", "gslcblas"]), Extension("void_python_tools.chi2.likelihoo", ["void_python_tools/chi2/likelihood.pyx"], libraries=["gsl", "gslcblas"])] - ext_modules = [ - Extension("void_python_tools.apTools.chi2.velocityProfileFitNative", - ["void_python_tools/apTools/chi2/velocityProfileFitNative.pyx"], - libraries=["gsl", "gslcblas"], library_dirs=[VOID_GSL+"/lib"], include_dirs=[VOID_GSL+"/include"]) - ] + #ext_modules = [ + # Extension("void_python_tools.apTools.chi2.velocityProfileFitNative", + # ["void_python_tools/apTools/chi2/velocityProfileFitNative.pyx"], + # libraries=["gsl", "gslcblas"], library_dirs=[VOID_GSL+"/lib"], include_dirs=[VOID_GSL+"/include"]) + #] ) From 1218ba3bdd896ad4b7a02c4089b168ed11234d5a Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Tue, 6 May 2014 17:22:26 -0500 Subject: [PATCH 04/13] removed extra cross-comparison files --- crossCompare/analysis/makeCocenterProfiles.py | 176 -------- crossCompare/analysis/overlapVoids.py | 103 ----- crossCompare/parm/sampleParm.py | 51 --- crossCompare/plotting/datasetsToPlot.py | 37 -- crossCompare/plotting/plotCocenterProfiles.py | 193 --------- crossCompare/plotting/plotDenMaps.py | 404 ------------------ crossCompare/plotting/plotMatchEllipRatio.py | 154 ------- crossCompare/plotting/plotMatchSizeRatio.py | 163 ------- crossCompare/plotting/plotNumberFunc.py | 305 ------------- 9 files changed, 1586 deletions(-) delete mode 100644 crossCompare/analysis/makeCocenterProfiles.py delete mode 100644 crossCompare/analysis/overlapVoids.py delete mode 100644 crossCompare/parm/sampleParm.py delete mode 100644 crossCompare/plotting/datasetsToPlot.py delete mode 100644 crossCompare/plotting/plotCocenterProfiles.py delete mode 100644 crossCompare/plotting/plotDenMaps.py delete mode 100644 crossCompare/plotting/plotMatchEllipRatio.py delete mode 100644 crossCompare/plotting/plotMatchSizeRatio.py delete mode 100644 crossCompare/plotting/plotNumberFunc.py diff --git a/crossCompare/analysis/makeCocenterProfiles.py b/crossCompare/analysis/makeCocenterProfiles.py deleted file mode 100644 index 4274936..0000000 --- a/crossCompare/analysis/makeCocenterProfiles.py +++ /dev/null @@ -1,176 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./crossCompare/analysis/makeCocenterProfiles.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. -#+ -#!/usr/bin/env python -#+ -# VIDE -- Void IDentification and Examination -- ./pipeline/apAnalysis.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 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. -#+ - -# takes voids of given radii, computes 1 profiles, -# then computes 1d profiles for higher-resolution catalogs using -# same positions - -# computes radial density profiles centered on baseSample - -import imp -import pickle -import os -import numpy as np -import argparse -import matplotlib -matplotlib.use('Agg') -import matplotlib.pyplot as plt -from void_python_tools.backend import * -from util import * - -# ------------------------------------------------------------------------------ - -parser = argparse.ArgumentParser(description='Analyze.') -parser.add_argument('--parm', dest='parm', default='datasetsToAnalyze.py', help='path to parameter file') -parser.add_argument('--show', dest='showPlot', action='store_const', - const=True, default=False, - help='display the plot (default: just write eps)') -args = parser.parse_args() - -# ----------------------------------------------------------------------------- -# plot a slice of the density around the void in baseIDList, -# with any voids in the slice shown and any voids in baseIDList flagged -def saveProfiles(baseSample, stack, sampleList, profileList, radii, - figDir, showPlot, outputDir): - - thisRadius = str(stack.rMin) + "-" + str(stack.rMax) - - plotName = "1dprofile_cocenter_" + baseSample.fullName+"_"+thisRadius - - np.savez(outputDir+"/1dprofile_cocentered_"+plotName+".dat", - profileList, radii) - - return - -# ----------------------------------------------------------------------------- - -filename = args.parm -print " Loading parameters from", filename -if not os.access(filename, os.F_OK): - print " Cannot find parameter file %s!" % filename - exit(-1) -parms = imp.load_source("name", filename) -globals().update(vars(parms)) - -if not os.access(outputDir, os.F_OK): - os.makedirs(outputDir) - -if not os.access(logDir, os.F_OK): - os.makedirs(logDir) - -if not os.access(figDir, os.F_OK): - os.makedirs(figDir) - -# get list of base voids -with open(workDir+baseSampleDir+"/sample_info.dat", 'rb') as input: - baseSample = pickle.load(input) - baseSampleName = baseSample.fullName - baseVoidList = np.loadtxt(workDir+baseSampleDir+"/centers_central_"+\ - baseSampleName+".out") - -sampleList = [] -for sampleDir in sampleDirList: - if compareSampleTag in sampleDir: continue - with open(workDir+sampleDir+"/sample_info.dat", 'rb') as input: - sampleList.append(pickle.load(input)) - -sampleDirList.insert(0,baseSampleDir) -sampleList.insert(0,baseSample) - -# pick our void sample -for stack in baseSample.stacks: - print " Stack:", stack.rMin, "-", stack.rMax - accepted = (baseVoidList[:,4] > stack.rMin) & (baseVoidList[:,4] < stack.rMax) - stackVoidList = baseVoidList[accepted] - print " We have", len(stackVoidList), "voids here" - - profileList = [] - radii = [] - - rMaxProfile = stack.rMin*3 + 2 - if baseSample.profileBinSize == "auto": - density = 0.5 * 50 / rMaxProfile / 2 - else: - density = baseSample.profileBinSize - nBins = rMaxProfile*density - - for (iSample, sampleDir) in enumerate(sampleDirList): - if compareSampleTag in sampleDir: continue - sample = sampleList[iSample] - print " Working with", sample.fullName, "..." - sys.stdout.flush() - sampleName = sample.fullName - - print " Loading particle data..." - partData, boxLen, volNorm = loadPart(workDir, sampleDir, sample) - - stackedProfile = np.zeros((nBins)) - - print " Stacking voids..." - binCenters = [] - for void in stackVoidList: - periodicLine = getPeriodic(sample) - center = void[0:3] - shiftedPart = shiftPart(partData, center, periodicLine, boxLen) - - dist = np.sqrt(shiftedPart[:,0]**2 + shiftedPart[:,1]**2 + \ - shiftedPart[:,2]**2) - thisProfile, radii = np.histogram(dist, bins=nBins, range=(0,rMaxProfile)) - deltaV = 4*np.pi/3*(radii[1:]**3-radii[0:(radii.size-1)]**3) - thisProfile = np.float32(thisProfile) - thisProfile /= deltaV - stackedProfile += thisProfile - binCenters = 0.5*(radii[1:]+radii[:-1]) - - stackedProfile /= volNorm - stackedProfile /= len(stackVoidList) - - profileList.append(stackedProfile) - - # plot these profiles - print " Plotting..." - sys.stdout.flush() - #binCenters = 0.5*(radii[1:] + radii[:-1]) - - saveProfiles(baseSample, stack, sampleList, profileList, binCenters, - figDir, args.showPlot, outputDir) - -print " Done!" - diff --git a/crossCompare/analysis/overlapVoids.py b/crossCompare/analysis/overlapVoids.py deleted file mode 100644 index 269e9b1..0000000 --- a/crossCompare/analysis/overlapVoids.py +++ /dev/null @@ -1,103 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./crossCompare/analysis/overlapVoids.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. -#+ -#!/usr/bin/env python -#+ -# VIDE -- Void IDentification and Examination -- ./crossCompare/analysis/mergerTree.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 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. -#+ - -# computes the overlap between two void catalogs - -from void_python_tools.backend import * -from void_python_tools.plotting import * -import imp -import pickle -import os -import matplotlib.pyplot as plt -import numpy as np -import argparse - -# ------------------------------------------------------------------------------ - -parser = argparse.ArgumentParser(description='Analyze.') -parser.add_argument('--parm', dest='parm', default='datasetsToAnalyze.py', - help='path to parameter file') -args = parser.parse_args() - -# ------------------------------------------------------------------------------ - -filename = args.parm -print " Loading parameters from", filename -if not os.access(filename, os.F_OK): - print " Cannot find parameter file %s!" % filename - exit(-1) -parms = imp.load_source("name", filename) -globals().update(vars(parms)) - -if not os.access(outputDir, os.F_OK): - os.makedirs(outputDir) - -if not os.access(logDir, os.F_OK): - os.makedirs(logDir) - -outFileName = outputDir + "/" + "voidOverlap" #+ ".dat" - -with open(workDir+baseSampleDir+"/sample_info.dat", 'rb') as input: - baseSample = pickle.load(input) - -for (iSample, sampleDir) in enumerate(sampleDirList): - - with open(workDir+sampleDir+"/sample_info.dat", 'rb') as input: - sample = pickle.load(input) - - print " Working with", sample.fullName, "...", - sys.stdout.flush() - - sampleName = sample.fullName - - binPath = CTOOLS_PATH+"/analysis/voidOverlap" - logFile = logDir+"/mergertree_"+baseSample.fullName+"_"+sampleName+".out" - stepOutputFileName = outFileName + "_" + baseSample.fullName + "_" + \ - sampleName + "_" - - launchVoidOverlap(baseSample, sample, workDir+baseSampleDir, - workDir+sampleDir, binPath, - thisDataPortion="central", logFile=logFile, - continueRun=False, workDir=workDir, - outputFile=stepOutputFileName, - #matchMethod="useID") - matchMethod="prox") - -print " Done!" diff --git a/crossCompare/parm/sampleParm.py b/crossCompare/parm/sampleParm.py deleted file mode 100644 index 7aa74b2..0000000 --- a/crossCompare/parm/sampleParm.py +++ /dev/null @@ -1,51 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./crossCompare/parm/sampleParm.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. -#+ -#!/usr/bin/env python - - -workDir = "" # base directory for all samples -outputDir = "" -logDir = "./logs/" -figDir = "./figs/" - -# path to c_tools directory in VIDE -CTOOLS_PATH = "/home/psutter2/projects/Voids/vide/c_tools/" - -# the path under workDir/ which which holds the sample you want to compare againt (e.g., the fiducial case) -baseSampleDir = "sample_/" - -# comma-separated list of samples to compare against baseSampleDir -sampleDirList = [ - "sample1_/", - "sample2_/", - "sample3_/", - ] - -dataPortions = [ "all" ] - -# this name gets appended to all output filenames and plots -plotLabel = "test" - -# title to place on plots -plotTitle = "Test" - -# don't touch this for now; it will be fully implemented and explained later -compareSampleTag = "" -doTheory = False diff --git a/crossCompare/plotting/datasetsToPlot.py b/crossCompare/plotting/datasetsToPlot.py deleted file mode 100644 index c1ebf1a..0000000 --- a/crossCompare/plotting/datasetsToPlot.py +++ /dev/null @@ -1,37 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/datasetsToPlot.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. -#+ -#!/usr/bin/env python - - -workDir = "/home/psutter2/workspace/Voids/" -figDir = "./figs" - -sampleDirList = [ -# "multidark/md_ss0.1_pv/sample_md_ss0.1_pv_z0.56_d00/", -# "multidark/md_halos_min1.393e12_pv/sample_md_halos_min1.393e12_pv_z0.56_d00/", -# "random/ran_ss0.000175/sample_ran_ss0.000175_z0.56_d00/", -# "random/ran_ss0.1/sample_ran_ss0.1_z0.56_d00/", -# "multidark/md_hod_dr9mid_pv/sample_md_hod_dr9mid_pv_z0.56_d00/", -# "multidark/md_ss0.000175_pv/sample_md_ss0.000175_pv_z0.56_d00/", - "sdss_dr9/sample_lss.dr9cmassmid.dat/", - "lanl/masked/masked_lanl_hod_dr9mid_pv/sample_masked_lanl_hod_dr9mid_pv_z0.5/" ] - -dataPortion = "central" - diff --git a/crossCompare/plotting/plotCocenterProfiles.py b/crossCompare/plotting/plotCocenterProfiles.py deleted file mode 100644 index a14e7b0..0000000 --- a/crossCompare/plotting/plotCocenterProfiles.py +++ /dev/null @@ -1,193 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/plotCocenterProfiles.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. -#+ -#!/usr/bin/env python -#+ -# VIDE -- Void IDentification and Examination -- ./pipeline/apAnalysis.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 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. -#+ - -# plots radial density profiles centered on baseVoid. -# requires makeCocenteredProfiles to be run first! - -import imp -import pickle -import os -import numpy as np -import argparse -import matplotlib -matplotlib.use('Agg') -import matplotlib.pyplot as plt -from void_python_tools.backend import * -from util import * -from globalOptions import * -from scipy.optimize import curve_fit - -matplotlib.rcParams.update({'font.size': 20}) - -# ------------------------------------------------------------------------------ - -parser = argparse.ArgumentParser(description='Analyze.') -parser.add_argument('--parm', dest='parm', default='datasetsToAnalyze.py', help='path to parameter file') -parser.add_argument('--show', dest='showPlot', action='store_const', - const=True, default=False, - help='display the plot (default: just write eps)') -args = parser.parse_args() - -# ----------------------------------------------------------------------------- -# Lavaux & Wandelt (2012) profile -def LWProfile(r, A0, A3, alpha): - return A0 + A3*r**3. - #return A0 + A3*r**alpha - -# ----------------------------------------------------------------------------- -# http://arxiv.org/pdf/astro-ph/0508297v1.pdf eq. 5 -def PadillaProfile(r, A1, A2, alpha): - return 1.5-A1*np.exp(-(A2*r)**alpha) - - -# ----------------------------------------------------------------------------- -# plot a slice of the density around the void in baseIDList, -# with any voids in the slice shown and any voids in baseIDList flagged -def plotProfiles(baseSample, stack, sampleList, - figDir, showPlot, outputDir, doTheory): - - thisRadius = str(stack.rMin) + "-" + str(stack.rMax) - plotName = "1dprofile_cocenter_" + baseSample.fullName+"_"+thisRadius - - filename = "1dprofile_cocenter_" + baseSample.fullName+"_"+thisRadius - npzfile = np.load(outputDir+"/1dprofile_cocentered_"+plotName+".dat.npz") - profileList = npzfile['arr_0'] - radii = npzfile['arr_1'] - - plt.clf() - - plt.xlabel(r"$R/R_{eff}$") - #plt.xlabel(r"$R/R_{v,\mathrm{max}}$") - plt.ylabel(r"$n / \bar n$") - plt.xlim(xmin=0.0, xmax=2.5) - plt.ylim(ymin=0.0, ymax=1.7) - #plt.xscale('log') - - for (iSample, sample) in enumerate(sampleList): - lineTitle = sample.nickName[:-10] - if "DM LowDen" in lineTitle or "DM HighDen" in lineTitle: continue - - thisPlotTitle = r"$R_{eff}$ = "+thisRadius+ r" $h^{-1}$Mpc" - legendTitle = "Fixed Center Samples" - - thisProfile = profileList[iSample] - if np.all(thisProfile == 0.): continue - - rV = (stack.rMin + stack.rMax)/2. - - if len(radii) > 0: - scaledRadii = radii/rV - plt.plot(scaledRadii, thisProfile, label=lineTitle, - color=colorList[iSample], - linewidth=linewidth) - - if doTheory: - nBins = len(scaledRadii)/2 - try: - popt, pcov = curve_fit(PadillaProfile, scaledRadii[0:nBins], - thisProfile[0:nBins], maxfev=10000, xtol=5.e-3) - except RuntimeError: - print "Warning: no convergence reached" - - label = r"A1=%.2f, A2=%.2f, $\alpha$=%.2f" % (popt[0], popt[1], popt[2]) - rho = PadillaProfile(scaledRadii, popt[0], popt[1], popt[2]) - plt.plot(scaledRadii, rho, '--', label=label, - color=colorList[iSample], linewidth=2) - - - plt.title(thisPlotTitle + " (center from " + plotTitle + ")", fontsize=18) - plt.legend(title = legendTitle, loc = "lower right", prop={'size':16}) - - plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") - - if (showPlot): - os.system("display %s" % figDir+"/fig_"+plotName+".png") - - return - -# ----------------------------------------------------------------------------- - -filename = args.parm -print " Loading parameters from", filename -if not os.access(filename, os.F_OK): - print " Cannot find parameter file %s!" % filename - exit(-1) -parms = imp.load_source("name", filename) -globals().update(vars(parms)) - -if not os.access(outputDir, os.F_OK): - os.makedirs(outputDir) - -if not os.access(logDir, os.F_OK): - os.makedirs(logDir) - -if not os.access(figDir, os.F_OK): - os.makedirs(figDir) - -# get list of base voids -with open(workDir+baseSampleDir+"/sample_info.dat", 'rb') as input: - baseSample = pickle.load(input) - baseSampleName = baseSample.fullName - baseVoidList = np.loadtxt(workDir+baseSampleDir+"/centers_central_"+\ - baseSampleName+".out") - -sampleList = [] -for sampleDir in sampleDirList: - if compareSampleTag in sampleDir: continue - with open(workDir+sampleDir+"/sample_info.dat", 'rb') as input: - sampleList.append(pickle.load(input)) - -sampleDirList.insert(0,baseSampleDir) -sampleList.insert(0,baseSample) - -# pick our void sample -for stack in baseSample.stacks: - print " Stack:", stack.rMin, "-", stack.rMax - - # plot these profiles - print " Plotting..." - sys.stdout.flush() - plotProfiles(baseSample, stack, sampleList, - figDir, args.showPlot, outputDir, doTheory) - -print " Done!" - diff --git a/crossCompare/plotting/plotDenMaps.py b/crossCompare/plotting/plotDenMaps.py deleted file mode 100644 index a12c1a2..0000000 --- a/crossCompare/plotting/plotDenMaps.py +++ /dev/null @@ -1,404 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/plotDenMaps.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. -#+ -#!/usr/bin/env python -#+ -# VIDE -- Void IDentification and Examination -- ./pipeline/apAnalysis.py -# Copyright (C) 2010-2013 Guilhem Lavaux -# Copyright (C) 2011-2013 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. -#+ - -# takes nVoids evenly distributed, plots a slice of the local density and -# overlays the voids - -import imp -import pickle -import os -import numpy as np -import argparse -import matplotlib -matplotlib.use('Agg') -import matplotlib.pyplot as plt -from void_python_tools.backend import * -import void_python_tools.xcor as xcor -from netCDF4 import Dataset -#import pylab as plt - -NetCDFFile = Dataset -ncFloat = 'f8' - -matplotlib.rcParams.update({'font.size': 16}) -# ------------------------------------------------------------------------------ - -mergerNameBase = "voidOverlap" - -parser = argparse.ArgumentParser(description='Analyze.') -parser.add_argument('--parm', dest='parm', default='datasetsToAnalyze.py', help='path to parameter file') -parser.add_argument('--show', dest='showPlot', action='store_const', - const=True, default=False, - help='display the plot (default: just write eps)') -args = parser.parse_args() - -nVoids = 10 - -# ------------------------------------------------------------------------------ - -# ----------------------------------------------------------------------------- -# plot a slice of the density around the void in baseIDList, -# with any voids in the slice shown and any voids in baseIDList flagged -def plotVoidAndDen(idList, voidList, partData, boxLen, figDir, - sliceCenter=None, sliceWidth=200, - baseIDList=None, baseRadius=0, nickName=None, - baseNickName=None, - baseIndex=0, - periodic=None, showPlot=False, plotName=None): - - if len(voidList) <= 1: return - plt.clf() - - #sliceWidth = 220 - sliceWidth = max(220, sliceWidth) - - # make an appropriate box - xwidth = sliceWidth - ywidth = sliceWidth - zwidth = sliceWidth/4. - #zwidth = max(sliceWidth/4., 50) - - # get mean density - part = 1.*partData - totalNumPart = len(part) - totalVol = (part[:,0].max() - part[:,0].min()) * \ - (part[:,1].max() - part[:,1].min()) * \ - (part[:,2].max() - part[:,2].min()) - - meanDen = totalNumPart/totalVol - - # single out the matched void - keepVoid = [] - if len(np.atleast_1d(idList)) > 0: - keepVoid = voidList[voidList[:,7] == idList] - if len(np.shape(keepVoid)) > 1: keepVoid = keepVoid[0,:] - filter = voidList[:,7] != idList - voidList = voidList[filter,:] - - # convert everything to relative coordinates - part[:,0] -= sliceCenter[0] - part[:,1] -= sliceCenter[1] - part[:,2] -= sliceCenter[2] - - shiftUs = np.abs(part[:,0]) > boxLen[0]/2. - if ("x" in periodicLine): part[shiftUs,0] -= \ - np.copysign(boxLen[0],part[shiftUs,0]) - shiftUs = np.abs(part[:,1]) > boxLen[1]/2. - if ("y" in periodicLine): part[shiftUs,1] -= \ - np.copysign(boxLen[1],part[shiftUs,1]) - shiftUs = np.abs(part[:,2]) > boxLen[2]/2. - if ("z" in periodicLine): part[shiftUs,2] -= \ - np.copysign(boxLen[2],part[shiftUs,2]) - - voidList = np.atleast_2d(voidList) - np.atleast_2d(voidList)[:,0] -= sliceCenter[0] - np.atleast_2d(voidList)[:,1] -= sliceCenter[1] - np.atleast_2d(voidList)[:,2] -= sliceCenter[2] - - shiftUs = np.abs(voidList[:,0]) > boxLen[0]/2. - if ("x" in periodicLine): - voidList[shiftUs,0] -= \ - np.copysign(boxLen[0],voidList[shiftUs,0]) - shiftUs = np.abs(voidList[:,1]) > boxLen[1]/2. - if ("y" in periodicLine): voidList[shiftUs,1] -= \ - np.copysign(boxLen[1],voidList[shiftUs,1]) - shiftUs = np.abs(voidList[:,2]) > boxLen[2]/2. - if ("z" in periodicLine): voidList[shiftUs,2] -= \ - np.copysign(boxLen[2],voidList[shiftUs,2]) - - if len(np.atleast_1d(keepVoid)) >= 1: - keepVoid[0] -= sliceCenter[0] - keepVoid[1] -= sliceCenter[1] - keepVoid[2] -= sliceCenter[2] - shiftUs = np.abs(keepVoid[0]) > boxLen[0]/2. - if ("x" in periodicLine) and shiftUs: keepVoid[0] -= \ - np.copysign(boxLen[0],keepVoid[0]) - shiftUs = np.abs(keepVoid[1]) > boxLen[1]/2. - if ("y" in periodicLine) and shiftUs: keepVoid[1] -= \ - np.copysign(boxLen[1],keepVoid[1]) - shiftUs = np.abs(keepVoid[2]) > boxLen[2]/2. - if ("z" in periodicLine) and shiftUs: keepVoid[2] -= \ - np.copysign(boxLen[2],keepVoid[2]) - - xmin = -xwidth/2. - xmax = xwidth/2. - ymin = -ywidth/2. - ymax = ywidth/2. - zmin = -zwidth/2. - zmax = zwidth/2. - - # pull out voids that were potential matches - filter = np.sqrt(voidList[:,0]**2 + voidList[:,1]**2 + voidList[:,2]**2) <=\ - baseRadius*1.5 - potentialMatches = voidList[filter] - - # get centers and radii of any other voids in slice - zminVoid = -zwidth/16. - zmaxVoid = zwidth/16. - - filter = (voidList[:,0] > xmin) & (voidList[:,0] < xmax) & \ - (voidList[:,1] > ymin) & (voidList[:,1] < ymax) & \ - (voidList[:,2] > zminVoid) & (voidList[:,2] < zmaxVoid) - voidList = voidList[filter,:] - - # slice particles - filter = (part[:,0] > xmin) & (part[:,0] < xmax) & \ - (part[:,1] > ymin) & (part[:,1] < ymax) & \ - (part[:,2] > zmin) & (part[:,2] < zmax) - part = part[filter] - - # plot density - extent = [xmin, xmax, ymin, ymax] - hist, xedges, yedges = np.histogram2d(part[:,0], part[:,1], normed=False, - bins=64) - - #hist /= meanDen - hist = np.log10(hist+1) - plt.imshow(hist, - aspect='equal', - extent=extent, - interpolation='gaussian', - cmap='YlGnBu_r') - #plt.colorbar() - - # overlay voids as circles - fig = plt.gcf() - ax = fig.add_subplot(1,1,1) - - # the original void - circle = plt.Circle((0,0), baseRadius, - edgecolor='orange', facecolor=None, fill=False, - linewidth=5) - fig.gca().add_artist(circle) - - # our matched void - if len(np.atleast_1d(keepVoid)) > 0: - if idList == baseIDList: - edgecolor = 'orange' - else: - edgecolor = 'red' - - circle = plt.Circle((keepVoid[0], keepVoid[1]), keepVoid[4], - edgecolor=edgecolor, facecolor=None, fill=False, - linewidth=5) - fig.gca().add_artist(circle) - - # other voids in the slice - for void in voidList: - if np.any(void[7] == idList): - continue - else: - color = 'white' - circle = plt.Circle((void[0], void[1]), void[4], - edgecolor=color, facecolor=None, fill=False, - linewidth=5) - fig.gca().add_artist(circle) - - # potential match voids - #for void in potentialMatches: - # if np.any(void[7] == idList): - # continue - # else: - # color = 'green' - # circle = plt.Circle((void[0], void[1]), void[4], - # edgecolor=color, facecolor=None, fill=False, - # linewidth=5) - # fig.gca().add_artist(circle) - - baseNickName = baseNickName[:-10].lstrip() - nickName = nickName[:-10].lstrip() - if idList == baseIDList: - title = "%d $h^{-1}$Mpc" % int(baseRadius) - title += " (" + baseNickName + ")" - else: - title = r"$\rightarrow$ " - if len(np.atleast_1d(keepVoid)) > 0: - title += "%d $h^{-1}$Mpc" % int(keepVoid[4]) + " (" + nickName + ")" - else: - title += "No match" - - #title += "(" + str(int(baseIDList)) + ")" - - plt.title(title, fontsize=20) - #plt.xlabel("x [$h^{-1}$Mpc]", fontsize=14) - #plt.ylabel("y [$h^{-1}$Mpc]", fontsize=14) - - plotName += "_" + str(int(baseIndex)) - #plotName += "_" + str(int(baseRadius)) - plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") - - if showPlot: os.system("display %s" % figDir+"/fig_"+plotName+".png") - - return - -# ----------------------------------------------------------------------------- - -filename = args.parm -print " Loading parameters from", filename -if not os.access(filename, os.F_OK): - print " Cannot find parameter file %s!" % filename - exit(-1) -parms = imp.load_source("name", filename) -globals().update(vars(parms)) - -if not os.access(outputDir, os.F_OK): - os.makedirs(outputDir) - -if not os.access(logDir, os.F_OK): - os.makedirs(logDir) - -if not os.access(figDir, os.F_OK): - os.makedirs(figDir) - -mergerFileBase = outputDir + "/" + mergerNameBase - -# get list of base voids -with open(workDir+baseSampleDir+"/sample_info.dat", 'rb') as input: - baseSample = pickle.load(input) - baseSampleName = baseSample.fullName - baseVoidList = np.loadtxt(workDir+baseSampleDir+"/centers_central_"+\ - baseSampleName+".out") - - # sort by size - radii = baseVoidList[:,4] - indices = np.argsort(radii)[::-1] - baseVoidList = baseVoidList[indices,:] - setName = baseSampleDir.split('/')[0] - -# pick our void sample -bigVoidList = baseVoidList[0:10,:] -stride = len(baseVoidList)/nVoids -baseVoidList = baseVoidList[::stride] -baseVoidList = np.vstack((bigVoidList,baseVoidList)) - -sampleDirList.insert(0,baseSampleDir) - -for (iSample, sampleDir) in enumerate(sampleDirList): - if compareSampleTag in sampleDir: continue - with open(workDir+sampleDir+"/sample_info.dat", 'rb') as input: - sample = pickle.load(input) - print " Working with", sample.fullName, "..." - sys.stdout.flush() - sampleName = sample.fullName - - print " Loading particle data..." - sys.stdout.flush() - - - infoFile = workDir+"/"+sampleDir+"/zobov_slice_"+sample.fullName+".par" - File = NetCDFFile(infoFile, 'r') - ranges = np.zeros((3,2)) - ranges[0][0] = getattr(File, 'range_x_min') - ranges[0][1] = getattr(File, 'range_x_max') - ranges[1][0] = getattr(File, 'range_y_min') - ranges[1][1] = getattr(File, 'range_y_max') - ranges[2][0] = getattr(File, 'range_z_min') - ranges[2][1] = getattr(File, 'range_z_max') - File.close() - mul = np.zeros((3)) - mul[:] = ranges[:,1] - ranges[:,0] - boxLen = mul - - partFile = workDir+"/"+sampleDir+"/zobov_slice_"+sample.fullName - #partFile = catalogDir+"/"+sample.dataFile - iLine = 0 - partData = [] - part = np.zeros((3)) - File = file(partFile) - chk = np.fromfile(File, dtype=np.int32,count=1) - Np = np.fromfile(File, dtype=np.int32,count=1) - chk = np.fromfile(File, dtype=np.int32,count=1) - - chk = np.fromfile(File, dtype=np.int32,count=1) - x = np.fromfile(File, dtype=np.float32,count=Np) - x *= mul[0] - x += ranges[0][0] - chk = np.fromfile(File, dtype=np.int32,count=1) - - chk = np.fromfile(File, dtype=np.int32,count=1) - y = np.fromfile(File, dtype=np.float32,count=Np) - y *= mul[1] - y += ranges[1][0] - chk = np.fromfile(File, dtype=np.int32,count=1) - - chk = np.fromfile(File, dtype=np.int32,count=1) - z = np.fromfile(File, dtype=np.float32,count=Np) - z *= mul[2] - z += ranges[2][0] - chk = np.fromfile(File, dtype=np.int32,count=1) - File.close() - partData = np.column_stack((x,y,z))#.transpose() - - for (iBaseVoid,baseVoid) in enumerate(baseVoidList): - print " Void:", int(baseVoid[7]), "(", int(baseVoid[4]), ")" - baseIDList = baseVoid[7] - sliceCenter = baseVoid[0:3] - sliceWidth = baseVoid[4]*4 - - # get matched void - idList = [] - if sample.fullName == baseSample.fullName: - idList = baseIDList - else: - matchFile=mergerFileBase+"_"+baseSampleName+"_"+sampleName+"_summary.out" - if os.access(matchFile, os.F_OK): - matchList = np.loadtxt(matchFile) - for i,testID in enumerate(matchList[:,0]): - if testID == baseIDList: - if (matchList[i,8] > 0): idList.append(matchList[i,8]) - idList = np.array(idList) - idList = idList.astype(int) - - voidList = np.loadtxt(workDir+sampleDir+"/trimmed_nodencut_centers_central_"+\ - sampleName+".out") - - periodicLine = getPeriodic(sample) - plotVoidAndDen(idList, voidList, partData, boxLen, figDir, - sliceCenter=sliceCenter, sliceWidth=sliceWidth, - baseIDList=baseIDList, baseRadius=baseVoid[4], - baseIndex=iBaseVoid, - nickName=sample.nickName, periodic=periodicLine, - baseNickName=baseSample.nickName, - showPlot=args.showPlot, - plotName="denmap_"+setName+"_"+baseSampleName+"_"+sampleName) -print " Done!" - diff --git a/crossCompare/plotting/plotMatchEllipRatio.py b/crossCompare/plotting/plotMatchEllipRatio.py deleted file mode 100644 index 7847809..0000000 --- a/crossCompare/plotting/plotMatchEllipRatio.py +++ /dev/null @@ -1,154 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/plotMatchEllipRatio.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. -#+ -#!/usr/bin/env python - -# plots cumulative distributions of number counts - -import matplotlib -matplotlib.use('Agg') -from void_python_tools.backend import * -from void_python_tools.plotting import * -import void_python_tools.apTools as vp -import imp -import pickle -import os -import matplotlib.pyplot as plt -import numpy as np -import argparse -from globalOptions import * - -# plots the ratio of ellipticities for matched voids - -# ------------------------------------------------------------------------------ - -parser = argparse.ArgumentParser(description='Plot.') -parser.add_argument('--show', dest='showPlot', action='store_const', - const=True, default=False, - help='display the plot (default: just write eps)') -parser.add_argument('--parm', dest='parm', default='datasetsToPlot.py', - help='path to parameter file') -args = parser.parse_args() - -# ------------------------------------------------------------------------------ - -print "Plotting ellipticity ratio" - -filename = args.parm -print " Loading parameters from", filename -if not os.access(filename, os.F_OK): - print " Cannot find parameter file %s!" % filename - exit(-1) -parms = imp.load_source("name", filename) -globals().update(vars(parms)) - -if not os.access(figDir, os.F_OK): - os.makedirs(figDir) - -dataSampleList = [] -compareSampleList = [] - -with open(workDir+baseSampleDir+"/sample_info.dat", 'rb') as input: - baseSample = pickle.load(input) - -for sampleDir in sampleDirList: - with open(workDir+sampleDir+"/sample_info.dat", 'rb') as input: - thisSample = pickle.load(input) - if compareSampleTag in thisSample.fullName: - compareSampleList.append(thisSample) - else: - dataSampleList.append(thisSample) - - -plt.clf() - -numSubPlots = len(dataSampleList) -fig, axesList = plt.subplots(numSubPlots, sharex=True, sharey=True) -axesList = np.atleast_1d(axesList) - -for (iSample,sample) in enumerate(dataSampleList): - - if sample.fullName == baseSample.fullName: continue - - sampleName = sample.fullName - lineTitle = sample.nickName[:-10] - -# plt.xlabel("Void Radius [Mpc/h]") -# plt.ylabel(r"1st Progenitor Relative Ellipticity") - #plt.yscale('log') -# plt.xlim(xmax=rMax) - plt.xlim(rMin, rMax) - - plotNameBase = "matchrelellip" - plotName = plotNameBase + "_" + plotLabel# + "_" + sampleName - - - filename = outputDir+"/voidOverlap_"+baseSample.fullName+"_"+sampleName+"_summary.out" - if not os.access(filename, os.F_OK): - print "File not found: ", filename - continue - - data = np.loadtxt(filename, comments="#") - if data.ndim == 1: - print " Too few!" - continue - - # find a sample to compare it to - for compareSample in compareSampleList: - if compareSample.nickName[:10] == sample.nickName[:10]: - filename = outputDir+"/voidOverlap_"+baseSample.fullName+"_"+compareSample.fullName+"_summary.out" - compareData = np.loadtxt(filename, comments="#") - axesList[iSample].scatter(compareData[:,1], compareData[:,10], - color='blue', alpha=alpha, s=pointsize) - - #plt.scatter(data[:,1], data[:,10], - # label=lineTitle, color=colorList[iSample]) - - axesList[iSample].scatter(data[:,1], data[:,10], - label=lineTitle, color='red', alpha=alpha, s=pointsize) - axesList[iSample].legend(loc = "upper left", prop={'size':10}) - - plt.ylim(0., 4.0) - yticks = axesList[iSample].yaxis.get_major_ticks() - yticks[-1].label1.set_visible(False) - yticks[0].label1.set_visible(False) - - #axesList[iSample].set_xlim([20,rMax]) - -fig.subplots_adjust(hspace=0) - -plt.setp([a.get_xticklabels() for a in fig.axes[:-1]], visible=False) - -axesList[0].set_title(plotTitle, fontsize=14) -#axesList[0].set_title("Match ellipticity ratio - "+plotTitle) -fig.text(0.5, 0.04, r'$R_{eff}$ [$h^{-1}$Mpc]', ha='center', va='center', fontsize=14) -fig.text(0.06, 0.5, 'Match Ellipticity Ratio', ha='center', va='center', rotation='vertical', fontsize=14) - - -#plt.legend(title = "Samples", loc = "upper left", prop={'size':8}) -#plt.title("Match ellipticity ratio - "+plotTitle+" - "+sample.nickName) - -plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") -plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") -plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") - -if args.showPlot: - os.system("display %s" % figDir+"/fig_"+plotName+".png") - - diff --git a/crossCompare/plotting/plotMatchSizeRatio.py b/crossCompare/plotting/plotMatchSizeRatio.py deleted file mode 100644 index 315fed1..0000000 --- a/crossCompare/plotting/plotMatchSizeRatio.py +++ /dev/null @@ -1,163 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/plotMatchSizeRatio.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. -#+ -#!/usr/bin/env python - -# plots cumulative distributions of number counts - -import matplotlib -matplotlib.use('Agg') -from void_python_tools.backend import * -from void_python_tools.plotting import * -import void_python_tools.apTools as vp -import imp -import pickle -import os -import matplotlib.pyplot as plt -import numpy as np -import argparse -from globalOptions import * -from scipy.optimize import curve_fit - -# plots the ratio of sizes for matched voids - -# ------------------------------------------------------------------------------ - -parser = argparse.ArgumentParser(description='Plot.') -parser.add_argument('--show', dest='showPlot', action='store_const', - const=True, default=False, - help='display the plot (default: just write eps)') -parser.add_argument('--parm', dest='parm', default='datasetsToPlot.py', - help='path to parameter file') -args = parser.parse_args() - -# ----------------------------------------------------------------------------- -def Linear(x, a, b): - return a*x+b - -# ------------------------------------------------------------------------------ - -print "Plotting match size ratio" - -filename = args.parm -print " Loading parameters from", filename -if not os.access(filename, os.F_OK): - print " Cannot find parameter file %s!" % filename - exit(-1) -parms = imp.load_source("name", filename) -globals().update(vars(parms)) - -if not os.access(figDir, os.F_OK): - os.makedirs(figDir) - -dataSampleList = [] -compareSampleList = [] - -with open(workDir+baseSampleDir+"/sample_info.dat", 'rb') as input: - baseSample = pickle.load(input) - -for sampleDir in sampleDirList: - with open(workDir+sampleDir+"/sample_info.dat", 'rb') as input: - thisSample = pickle.load(input) - if compareSampleTag in thisSample.fullName: - compareSampleList.append(thisSample) - else: - dataSampleList.append(thisSample) - -plt.clf() -#plt.yscale('log') - -numSubPlots = len(dataSampleList) -fig, axesList = plt.subplots(numSubPlots, sharex=True, sharey=True) -axesList = np.atleast_1d(axesList) - -for (iSample,sample) in enumerate(dataSampleList): - - if sample.fullName == baseSample.fullName: continue - - sampleName = sample.fullName - lineTitle = sample.nickName[:-10] - - plotNameBase = "matchvolrelradius" - plotName = plotNameBase + "_" + plotLabel# + "_" + sampleName - - filename = outputDir+"/voidOverlap_"+baseSample.fullName+"_"+sampleName+"_summary.out" - if not os.access(filename, os.F_OK): - print "File not found: ", filename - continue - - data = np.loadtxt(filename, comments="#") - if data.ndim == 1: - print " Too few!" - continue - - # find a sample to compare it to - for compareSample in compareSampleList: - if compareSample.nickName[:10] == sample.nickName[:10]: - filename = outputDir+"/voidOverlap_"+baseSample.fullName+"_"+compareSample.fullName+"_summary.out" - compareData = np.loadtxt(filename, comments="#") - axesList[iSample].scatter(compareData[:,1], compareData[:,2], - color='blue', alpha=alpha, s=pointsize) - - axesList[iSample].scatter(data[:,1], data[:,2], - label=lineTitle, color='red', alpha=alpha, s=pointsize) - - try: - popt, pcov = curve_fit(Linear, data[:,1], - data[:,2], maxfev=10000, xtol=5.e-3) - except RuntimeError: - print "Warning: no convergence reached" - - label = r"$a$=%.2f, $b$=%.2f" % (popt[0], popt[1]) - radii = np.arange(rMin, rMax, 1) - relRad = Linear(radii, popt[0], popt[1]) - #axesList[iSample].plot(radii, relRad, '-', label=label, - # color='black', linewidth=2) - - axesList[iSample].legend(loc = "best", fancybox=True,prop={'size':10}) - - plt.ylim(0., 2.5) - - yticks = axesList[iSample].yaxis.get_major_ticks() - yticks[-1].label1.set_visible(False) - yticks[0].label1.set_visible(False) - - axesList[iSample].set_xlim([rMin,rMax]) - - -fig.subplots_adjust(hspace=0) - -plt.setp([a.get_xticklabels() for a in fig.axes[:-1]], visible=False) - -axesList[0].set_title(plotTitle, fontsize=14) -#axesList[0].set_title("Match size ratio - "+plotTitle) -fig.text(0.5, 0.04, r'$R_{eff}$ [$h^{-1}$Mpc]', ha='center', va='center', fontsize=14) -fig.text(0.06, 0.5, 'Match Relative Radius', ha='center', va='center', rotation='vertical', fontsize=14) - -#plt.legend(title = "Samples", loc = "upper left", prop={'size':8}) -#plt.title("Match size ratio - "+plotTitle+" - "+sample.nickName) - -plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") -plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") -plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") - -if args.showPlot: - os.system("display %s" % figDir+"/fig_"+plotName+".png") - - diff --git a/crossCompare/plotting/plotNumberFunc.py b/crossCompare/plotting/plotNumberFunc.py deleted file mode 100644 index 12c022c..0000000 --- a/crossCompare/plotting/plotNumberFunc.py +++ /dev/null @@ -1,305 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./crossCompare/plotting/plotNumberFunc.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. -#+ -#!/usr/bin/env python - -# plots cumulative distributions of number counts - -import matplotlib -matplotlib.use('Agg') -from void_python_tools.backend import * -from void_python_tools.plotting import * -import void_python_tools.apTools as vp -import imp -import pickle -import os -import matplotlib.pyplot as plt -import numpy as np -import argparse -import svdw -from scipy.optimize import curve_fit -from scipy.interpolate import interp1d -from globalOptions import * - -# ------------------------------------------------------------------------------ - -histBinWidth = 1 # Mpc - -parser = argparse.ArgumentParser(description='Plot.') -parser.add_argument('--show', dest='showPlot', action='store_const', - const=True, default=False, - help='display the plot (default: just write eps)') -parser.add_argument('--binned', dest='binned', action='store_const', - const=True, default=False, - help='plot binned function (default: cumulative)') -parser.add_argument('--parm', dest='parm', default='datasetsToPlot.py', - help='path to parameter file') -parser.add_argument('--xmax', dest='xmax', default=120., - help='x limit of plot') -parser.add_argument('--xmin', dest='xmin', default=20., - help='x limit of plot') -args = parser.parse_args() - -# ------------------------------------------------------------------------------ -def svdwFunc(r, scaleFactor): - radius, cumu_ps = svdw.getSvdW(.01, 100, 100, scaleFactor=scaleFactor) - cumu_ps += 0.1 - cumu_ps = np.log10(cumu_ps) - interped = interp1d(radius, cumu_ps) - interpVal = interped(r) - interpVal[interpVal<1.0] = 1.0 - #print "HELLO", r, interpVal - return interpVal - -# ------------------------------------------------------------------------------ - - -def loadData(sampleDir, dataPortion, treePortion='all'): - with open(workDir+sampleDir+"/sample_info.dat", 'rb') as input: - sample = pickle.load(input) - - filename = workDir+"/"+sampleDir+"/centers_"+dataPortion+"_"+sample.fullName+".out" - if not os.access(filename, os.F_OK): - print "File not found: ", filename - return -1, -1, -1 - - data = np.loadtxt(filename, comments="#") - if data.ndim == 1: - print " Too few!" - return -1, -1, -1 - - if treePortion == "parents": - filter = data[:,10] == -1 - data = data[filter] - elif treePortion == "children": - filter = data[:,10] != -1 - data = data[filter] - - data = data[:,4] - indices = np.arange(0, len(data), 1) - sorted = np.sort(data) - - - if sample.dataType == "observation": - boxVol = vp.getSurveyProps(sample.maskFile, - sample.zBoundary[0], sample.zBoundary[1], - sample.zRange[0], sample.zRange[1], "all", - selectionFuncFile=None)[0] - #selectionFuncFile=sample.selFunFile)[0] - boxVol *= obsFudgeFactor - else: - boxVol = sample.boxLen*sample.boxLen*(sample.zBoundaryMpc[1] - - sample.zBoundaryMpc[0]) - - boxVol *= 1.e-9 # Mpc->Gpc - - indices /= boxVol - - #xmin = sorted[0] - #xmax = sorted[-1] - #bins = int((xmax-xmin)/histBinWidth) - bins = args.xmax/histBinWidth - hist, binEdges = np.histogram(sorted, bins=bins, range=(0., args.xmax)) - #hist, binEdges = np.histogram(sorted, bins=bins, range=(xmin,xmax)) - binCenters = 0.5*(binEdges[1:] + binEdges[:-1]) - - if not args.binned: - foundStart = False - for iBin in xrange(len(hist)): - if not foundStart and hist[iBin] == 0: - continue - foundStart = True - hist[iBin] = np.sum(hist[iBin:]) - - hist /= boxVol - - hist = np.log10(hist) - - lineTitle = sample.nickName[:-10] - - return hist, binCenters, lineTitle - -def fill_between(x, y1, y2=0, ax=None, **kwargs): - """Plot filled region between `y1` and `y2`. - - This function works exactly the same as matplotlib's fill_between, except - that it also plots a proxy artist (specifically, a rectangle of 0 size) - so that it can be added it appears on a legend. - """ - ax = ax if ax is not None else plt.gca() - ax.fill_between(x, y1, y2, interpolate=True, **kwargs) - p = plt.Rectangle((0, 0), 0, 0, **kwargs) - ax.add_patch(p) - -# ------------------------------------------------------------------------------ - -print "Plotting number function" - -filename = args.parm -print " Loading parameters from", filename -if not os.access(filename, os.F_OK): - print " Cannot find parameter file %s!" % filename - exit(-1) -parms = imp.load_source("name", filename) -globals().update(vars(parms)) - -if not os.access(figDir, os.F_OK): - os.makedirs(figDir) - -plt.clf() -plt.xlabel(r"$R_{eff}$ [$h^{-1}$Mpc]", fontsize=14) -plt.ylabel(r"log ($n$ > $R_{eff}$ [$h^3$ Gpc$^{-3}$])", fontsize=14) -#plt.yscale('log') -plt.xlim(xmin=5.) -plt.xlim(xmax=100.) -plt.ylim(ymin=1) -plt.ylim(ymax=5) - -plotNameBase = "numberfunc" -plotName = plotNameBase + "_" + plotLabel - -sampleDirList.append(baseSampleDir) - -for (iSample,sampleDir) in enumerate(sampleDirList): - for dataPortion in dataPortions: - # get all the data - allHist = [] - if "ZZZZ" in sampleDir: - for fileZ in fileList: - thisSampleDir = sampleDir.replace("ZZZZ", fileZ) - hist, binCenters, lineTitle = loadData(thisSampleDir, dataPortion) - if lineTitle == -1: continue - allHist.append(hist) - - lineLabel = lineTitle.replace(fileZ, "all") - if dataPortion != 'all': lineLabel += ", " + dataPortion - - maxHist = 1.*allHist[-1] - minHist = 1.*allHist[-1] - for iHist in xrange(len(allHist)-1): - maxHist = np.maximum(maxHist, allHist[iHist]) - minHist = np.minimum(minHist, allHist[iHist]) - - trim = (maxHist > 1) - minHist = minHist[trim] - maxHist = maxHist[trim] - binCentersToUse = binCenters[trim] - alpha = 0.75 - if dataPortion == "central": - hatch = '//' - else: - hatch = None - fill_between(binCentersToUse, minHist, maxHist, - label=lineLabel, color=colorList[iSample], - alpha=alpha, - hatch=hatch - ) - - else: - - #treeList = ["children", "parents", "all"] - treeList = ["all"] - for (iTree,treeItem) in enumerate(treeList): - hist, binCenters, lineLabel = loadData(sampleDir, dataPortion, treePortion=treeItem) - trim = (hist > 1) - hist = hist[trim] - binCentersToUse = binCenters[trim] - if lineLabel == -1: continue - if dataPortion != 'all': lineLabel += ", " + dataPortion - - if treeItem != "all": lineLabel += ", " + treeItem - iColor = iSample + iTree - - if dataPortion == "central": - lineStyle = '--' - else: - lineStyle = '-' - - if "DM" in lineLabel: lineColor = colorList[0] - if "Halos" in lineLabel: lineColor = colorList[1] - if "HOD" in lineLabel: lineColor = colorList[2] - - if "FullDen" in lineLabel: - lineColor = colorList[4] - lineStyle = '-' - linewidth = 5 - - if "HighDen" in lineLabel or "HighRes" in lineLabel or \ - "All" in lineLabel: - lineStyle = "-" - linewidth = 5 - if "LowDen" in lineLabel or "LowRes" in lineLabel or \ - "1.20" in lineLabel: - lineStyle = "--" - linewidth = 5 - - plt.plot(binCentersToUse, hist, lineStyle, - label=lineLabel, color=lineColor, - linewidth=linewidth) - - #if doTheory and "LowRes" in sampleDir: - # popt, pcov = curve_fit(svdwFunc, binCentersToUse, hist, p0=25.) - # radius, cumu_ps = svdw.getSvdW(.01, 100, 100, scaleFactor=popt[0]) - # cumu_ps = np.log10(cumu_ps) - # print "HELLO", binCentersToUse, hist, cumu_ps - # plt.plot(radius, cumu_ps, color='black', label="SVdW/%g" % popt[0]) - -# and now the theoretical curve -if doTheory: - #radius, cumu_ps = svdw.getSvdW(.01, 100, 100) - #cumu_ps = np.log10(cumu_ps) - #plt.plot(radius, cumu_ps, color='black', label="SVdW" ) - - iLine = 0 - scaleFactorList = [] - #scaleFactorList = [10, 5] - for scaleFactor in scaleFactorList: - #radius, cumu_ps = svdw.getSvdW(.01, 100, 100, scaleFactor=scaleFactor) - #cumu_ps = np.log10(cumu_ps) - #plt.plot(radius, cumu_ps, lineList[iLine], color='black', label="SVdW/%g" % scaleFactor) - iLine += 1 - - dvList = [-.07] - iLine = 0 - for dv in dvList: - radius, cumu_ps = svdw.getSvdW(.01, 100, 1000, d_v=dv) - cumu_ps = np.log10(cumu_ps) - plt.plot(radius, cumu_ps, lineList[iLine], color='black', label=r"SVdW $\delta_v$=%g" % dv, linewidth=3) - iLine += 1 - - dvList = [-.015] - for dv in dvList: - radius, cumu_ps = svdw.getSvdW(.01, 100, 1000, d_v=dv) - #radius, cumu_ps = svdw.getSvdW(.01, 100, 100, d_v=dv) - cumu_ps = np.log10(cumu_ps) - plt.plot(radius, cumu_ps, lineList[iLine], color='black', label="SVdW $\delta_v$=%g" % dv, linewidth=3) - iLine += 1 - -plt.legend(loc = "best", fancybox=True, prop={'size':12}) -#plt.legend(title = "Samples", loc = "upper right", prop={'size':8}) -#plt.title("Number func - "+plotTitle) - -plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") -plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") -plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") - -if args.showPlot: - os.system("display %s" % figDir+"/fig_"+plotName+".png") - - From 2ae082069e433fcf4ed036e024492292bdfd46b7 Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Tue, 6 May 2014 18:00:27 -0500 Subject: [PATCH 05/13] more consistent handling of void datasets --- analysis/datasetsToAnalyze.py | 51 ------------------ .../void_python_tools/partUtil/partUtil.py | 53 +++++++++++++++++-- 2 files changed, 48 insertions(+), 56 deletions(-) delete mode 100644 analysis/datasetsToAnalyze.py diff --git a/analysis/datasetsToAnalyze.py b/analysis/datasetsToAnalyze.py deleted file mode 100644 index d982424..0000000 --- a/analysis/datasetsToAnalyze.py +++ /dev/null @@ -1,51 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./analysis/datasetsToAnalyze.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. -#+ -#!/usr/bin/env python - - -outputDir = "/home/psutter2/workspace/Voids/analysis/xcor/" - -# Sim parameters -Ni = 1000237 # Number of dark matter particles per dimension in simulation -ss = 0.1 # Subsampling fraction of dark matter particles to read -Mpart = 8.721e9 # Particle mass [M_sol] -Npart = int(ss*Ni) # Particle number of subsample -Lboxcut = 0. # Size of optional margin to be cut from the box [h^(-1)Mpc] -Nmesh = 256 # Interpolation meshlength -Nbin = 70 # Number of bins for power spectrum and correlation function -r_H = 3000. # Hubble scale [h^(-1)Mpc] -ns = 0.95 # Spectral index -sigma_8 = 0.82 # Sigma_8 -h = 0.7 # Dimensionless Hubble parameter - -# Input files -matterDir = '/home/psutter2/workspace/Voids/catalogs/mergertree512/' -haloDir = '/home/psutter2/workspace/Voids/catalogs/mergertree512/' -matterFilename = 'mf_4s_1G_512_1.000' -haloFilename = 'mf_4s_1G_512_bgc2_1.000.sdf' -voidBaseDir = "/home/psutter2/workspace/Voids/" - - -sampleDirList = [ - "mergertree512/mt_ss0.01/sample_mt_ss0.01_z0.00_d00/", - ] - -dataPortion = "central" - diff --git a/python_tools/void_python_tools/partUtil/partUtil.py b/python_tools/void_python_tools/partUtil/partUtil.py index 1e6802d..a3a3ca7 100644 --- a/python_tools/void_python_tools/partUtil/partUtil.py +++ b/python_tools/void_python_tools/partUtil/partUtil.py @@ -219,15 +219,17 @@ class Catalog: zones2Parts = None void2Zones = None voids = None + sampleInfo = None # ----------------------------------------------------------------------------- -def loadVoidCatalog(sampleDir): +def loadVoidCatalog(sampleDir, dataPortion="central"): #print " Loading particle data..." sys.stdout.flush() catalog = Catalog() with open(sampleDir+"/sample_info.dat", 'rb') as input: sample = pickle.load(input) + catalog.sampleInfo = sample print "Loading info..." infoFile = sampleDir+"/zobov_slice_"+sample.fullName+".par" @@ -248,6 +250,7 @@ def loadVoidCatalog(sampleDir): partData, boxLen, volNorm, isObservationData, ranges = loadPart(sampleDir) numPartTot = len(partData) catalog.numPartTot = numPartTot + catalog.partPos = partData catalog.part = [] for i in xrange(len(partData)): catalog.part.append(Bunch(x = partData[i][0], @@ -269,7 +272,7 @@ def loadVoidCatalog(sampleDir): catalog.part[ivol].volume = vols[ivol] / volNorm print "Loading voids..." - fileName = sampleDir+"/voidDesc_central_"+sample.fullName+".out" + fileName = sampleDir+"/untrimmed_voidDesc_"+dataPortion+"_"+sample.fullName+".out" catData = np.loadtxt(fileName, comments="#", skiprows=2) catalog.voids = [] for line in catData: @@ -283,21 +286,61 @@ def loadVoidCatalog(sampleDir): voidVol = line[7], numPart = int(line[8]), densCon = line[9], - voidProp = line[10], + voidProb = line[10], radius = pow(line[7]/volNorm*3./4./np.pi, 1./3.), - barycenter = np.zeros((3)))) + barycenter = np.zeros((3)) + parentID = 0, + treeLevel = 0, + numChildren = 0, + centralDen = 0., + eigenVals = np.zeros((3)), + eigenVecs = np.zeros((3,3)), + )) print "Read %d voids" % len(catalog.voids) print "Loading barycenters..." iLine = 0 - for line in open(sampleDir+"/barycenters_central_"+sample.fullName+".out"): + for line in open(sampleDir+"/untrimmed_barycenters_"+dataPortion+"_"+sample.fullName+".out"): line = line.split() catalog.voids[iLine].barycenter[0] = float(line[1]) catalog.voids[iLine].barycenter[1] = float(line[2]) catalog.voids[iLine].barycenter[2] = float(line[3]) iLine += 1 + print "Loading derived void information..." + iLine = 0 + for line in open(sampleDir+"/untrimmed_centers_"+dataPortion+"_"+sample.fullName+".out"): + line = line.split() + catalog.voids[iLine].volume = float(line[6]) + catalog.voids[iLine].radius = float(line[4]) + catalog.voids[iLine].parentID = float(line[10]) + catalog.voids[iLine].treeLevel = float(line[11]) + catalog.voids[iLine].numChildren = float(line[12]) + catalog.voids[iLine].centralDen = float(line[13]) + iLine += 1 + + print "Loading shapes..." + iLine = 0 + for line in open(sampleDir+"/untrimmed_shapes_"+dataPortion+"_"+sample.fullName+".out"): + line = line.split() + catalog.voids[iLine].eigenVals[0] = float(line[1]) + catalog.voids[iLine].eigenVals[1] = float(line[2]) + catalog.voids[iLine].eigenVals[2] = float(line[3]) + + catalog.voids[iLine].eigenVecs[0][0] = float(line[4]) + catalog.voids[iLine].eigenVecs[0][1] = float(line[5]) + catalog.voids[iLine].eigenVecs[0][2] = float(line[6]) + + catalog.voids[iLine].eigenVecs[1][0] = float(line[7]) + catalog.voids[iLine].eigenVecs[1][1] = float(line[8]) + catalog.voids[iLine].eigenVecs[1][2] = float(line[9]) + + catalog.voids[iLine].eigenVecs[2][0] = float(line[10]) + catalog.voids[iLine].eigenVecs[2][1] = float(line[11]) + catalog.voids[iLine].eigenVecs[2][2] = float(line[12]) + + iLine += 1 print "Loading zone-void membership info..." zoneFile = sampleDir+"/voidZone_"+sample.fullName+".dat" From 66e3924f58b898dffd8e0433a5a9525a499e4e0e Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Tue, 6 May 2014 18:05:42 -0500 Subject: [PATCH 06/13] more sensible naming for utlities --- python_tools/void_python_tools/__init__.py | 2 +- .../void_python_tools/{partUtil => voidUtil}/__init__.py | 2 +- .../{partUtil/partUtil.py => voidUtil/catalogUtil.py} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename python_tools/void_python_tools/{partUtil => voidUtil}/__init__.py (97%) rename python_tools/void_python_tools/{partUtil/partUtil.py => voidUtil/catalogUtil.py} (100%) diff --git a/python_tools/void_python_tools/__init__.py b/python_tools/void_python_tools/__init__.py index 1fa20d0..423a5f8 100644 --- a/python_tools/void_python_tools/__init__.py +++ b/python_tools/void_python_tools/__init__.py @@ -21,4 +21,4 @@ from void_python_tools.backend import * from void_python_tools.apTools import * from void_python_tools.plotting import * from void_python_tools.xcor import * -from void_python_tools.partUtil import * +from void_python_tools.voidUtil import * diff --git a/python_tools/void_python_tools/partUtil/__init__.py b/python_tools/void_python_tools/voidUtil/__init__.py similarity index 97% rename from python_tools/void_python_tools/partUtil/__init__.py rename to python_tools/void_python_tools/voidUtil/__init__.py index 3992494..46119e7 100644 --- a/python_tools/void_python_tools/partUtil/__init__.py +++ b/python_tools/void_python_tools/voidUtil/__init__.py @@ -17,4 +17,4 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #+ -from partUtil import * +from catalogUtil import * diff --git a/python_tools/void_python_tools/partUtil/partUtil.py b/python_tools/void_python_tools/voidUtil/catalogUtil.py similarity index 100% rename from python_tools/void_python_tools/partUtil/partUtil.py rename to python_tools/void_python_tools/voidUtil/catalogUtil.py From 131eaace8d3db686ea54d06c1d902fb35e7ddf4e Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Tue, 6 May 2014 18:20:58 -0500 Subject: [PATCH 07/13] added some void filters --- .../void_python_tools/voidUtil/catalogUtil.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/python_tools/void_python_tools/voidUtil/catalogUtil.py b/python_tools/void_python_tools/voidUtil/catalogUtil.py index a3a3ca7..f12ef7a 100644 --- a/python_tools/void_python_tools/voidUtil/catalogUtil.py +++ b/python_tools/void_python_tools/voidUtil/catalogUtil.py @@ -389,3 +389,22 @@ def getVoidPart(catalog, voidID): return partOut +# ----------------------------------------------------------------------------- +def filterVoidsOnSize(catalog, rMin): + catalog.voids = catalog.voids[ catalog.voids[:].radius >= rMin ] + return catalog + +# ----------------------------------------------------------------------------- +def filterVoidsOnTreeLevel(catalog, level): + catalog.voids = catalog.voids[ catalog.voids[:].treeLevel == level ] + + if level == -1: + catalog.voids = catalog.voids[ catalog.voids[:].numChildren == 0 ] + + return catalog + +# ----------------------------------------------------------------------------- +def filterVoidsOnCentralDen(catalog, maxCentralDen): + catalog.voids = catalog.voids[ catalog.voids[:].centralDen <= maxCentralDen ] + return catalog + From 6931fd33fd1ee459889b31c6a67044923718e945 Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Tue, 6 May 2014 18:27:21 -0500 Subject: [PATCH 08/13] removed extra plotting routines --- python_tools/setup.py | 4 +- python_tools/void_python_tools/__init__.py | 1 - .../void_python_tools/plotting/__init__.py | 21 - .../void_python_tools/plotting/plotDefs.py | 33 -- .../void_python_tools/plotting/plotTools.py | 363 ------------------ 5 files changed, 2 insertions(+), 420 deletions(-) delete mode 100644 python_tools/void_python_tools/plotting/__init__.py delete mode 100644 python_tools/void_python_tools/plotting/plotDefs.py delete mode 100644 python_tools/void_python_tools/plotting/plotTools.py diff --git a/python_tools/setup.py b/python_tools/setup.py index 9581849..2a21fc6 100644 --- a/python_tools/setup.py +++ b/python_tools/setup.py @@ -31,8 +31,8 @@ setup( cmdclass = {'build_ext': build_ext}, include_dirs = [np.get_include()], packages= - ['void_python_tools','void_python_tools.backend','void_python_tools.apTools', 'void_python_tools.xcor', 'void_python_tools.partUtil', - 'void_python_tools.apTools.profiles','void_python_tools.apTools.chi2', 'void_python_tools.plotting'], + ['void_python_tools','void_python_tools.backend','void_python_tools.apTools', 'void_python_tools.xcor', 'void_python_tools.voidUtil', + 'void_python_tools.apTools.profiles','void_python_tools.apTools.chi2',], #ext_modules = [Extension("void_python_tools.chi2.velocityProfileFitNative", ["void_python_tools/chi2/velocityProfileFitNative.pyx"], libraries=["gsl", "gslcblas"]), Extension("void_python_tools.chi2.likelihoo", ["void_python_tools/chi2/likelihood.pyx"], libraries=["gsl", "gslcblas"])] #ext_modules = [ # Extension("void_python_tools.apTools.chi2.velocityProfileFitNative", diff --git a/python_tools/void_python_tools/__init__.py b/python_tools/void_python_tools/__init__.py index 423a5f8..2ea700c 100644 --- a/python_tools/void_python_tools/__init__.py +++ b/python_tools/void_python_tools/__init__.py @@ -19,6 +19,5 @@ #+ from void_python_tools.backend import * from void_python_tools.apTools import * -from void_python_tools.plotting import * from void_python_tools.xcor import * from void_python_tools.voidUtil import * diff --git a/python_tools/void_python_tools/plotting/__init__.py b/python_tools/void_python_tools/plotting/__init__.py deleted file mode 100644 index d00996e..0000000 --- a/python_tools/void_python_tools/plotting/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/__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 plotTools import * -from plotDefs import * diff --git a/python_tools/void_python_tools/plotting/plotDefs.py b/python_tools/void_python_tools/plotting/plotDefs.py deleted file mode 100644 index 2de8e15..0000000 --- a/python_tools/void_python_tools/plotting/plotDefs.py +++ /dev/null @@ -1,33 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/plotDefs.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. -#+ -LIGHT_SPEED = 299792.458 - -colorList = ['r', 'b', 'g', 'y', 'c', 'm', - 'darkred', 'grey', - 'orange', 'darkblue', - 'indigo', 'lightseagreen', 'maroon', 'olive', - 'royalblue', 'palevioletred', 'seagreen', 'tomato', - 'aquamarine', 'darkslateblue', - 'khaki', 'lawngreen', 'mediumorchid', - 'orangered', 'thistle' - 'yellowgreen'] - -linewidth = 4 -fontsize = 12 diff --git a/python_tools/void_python_tools/plotting/plotTools.py b/python_tools/void_python_tools/plotting/plotTools.py deleted file mode 100644 index 3de824b..0000000 --- a/python_tools/void_python_tools/plotting/plotTools.py +++ /dev/null @@ -1,363 +0,0 @@ -#+ -# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/plotTools.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. -#+ -__all__=['plotRedshiftDistribution', 'plotSizeDistribution', 'plot1dProfiles', - 'plotMarg1d', 'plotNumberDistribution', 'plotVoidDistribution'] - -from void_python_tools.backend.classes import * -from plotDefs import * -import numpy as np -import os -import pylab as plt -import void_python_tools.apTools as vp -import void_python_tools.xcor as xcor - -# ----------------------------------------------------------------------------- -def plotRedshiftDistribution(workDir=None, sampleList=None, figDir=None, - plotNameBase="zdist", - showPlot=False, dataPortion=None, setName=None): - - plt.ioff() - maptplotlib.pyplot.switch_backed('Agg') - - plt.clf() - plt.xlabel("Redshift") - plt.ylabel("Number of Voids") - - plotTitle = setName - - plotName = plotNameBase - - xMin = 1.e00 - xMax = 0 - - for (iSample,sample) in enumerate(sampleList): - - sampleName = sample.fullName - lineTitle = sampleName - - filename = workDir+"/sample_"+sampleName+"/centers_"+dataPortion+"_"+\ - sampleName+".out" - if not os.access(filename, os.F_OK): - print "File not found: ", filename - continue - - data = np.loadtxt(filename, comments="#") - if data.ndim == 1: - print " Too few!" - continue - - zMin = sample.zRange[0] - zMax = sample.zRange[1] - - range = (zMin, zMax) - nbins = np.ceil((zMax-zMin)/0.02) - - thisMax = np.max(data[:,5]) - thisMin = np.min(data[:,5]) - if thisMax > xMax: xMax = thisMax - if thisMin < xMin: xMin = thisMin - - plt.hist(data[:,5], bins=nbins, - label=lineTitle, color=colorList[iSample], - histtype = "step", range=range, - linewidth=linewidth) - - #plt.legend(title = "Samples", loc = "upper right") - plt.title(plotTitle) - - plt.xlim(xMin, xMax) - #plt.xlim(xMin, xMax*1.4) # make room for legend - - plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") - - if showPlot: - os.system("display %s" % figDir+"/fig_"+plotName+".png") - - -# ----------------------------------------------------------------------------- -def plotSizeDistribution(workDir=None, sampleList=None, figDir=None, - plotNameBase="sizedist", - showPlot=False, dataPortion=None, setName=None): - - - plt.ioff() - maptplotlib.pyplot.switch_backed('Agg') - - plt.clf() - plt.xlabel("Void Radius (Mpc/h)") - plt.ylabel("Number of Voids") - - plotTitle = setName - - plotName = plotNameBase - - xMin = 1.e00 - xMax = 0 - - for (iSample,sample) in enumerate(sampleList): - - sampleName = sample.fullName - lineTitle = sampleName - - filename = workDir+"/sample_"+sampleName+"/centers_"+dataPortion+"_"+\ - sampleName+".out" - if not os.access(filename, os.F_OK): - print "File not found: ", filename - continue - - data = np.loadtxt(filename, comments="#") - if data.ndim == 1: - print " Too few!" - continue - - xMin = 5 - xMax = 140 - - range = (xMin, xMax) - nbins = np.ceil((xMax-xMin)/5) - - #thisMax = np.max(data[:,5]) - #thisMin = np.min(data[:,5]) - #if thisMax > xMax: xMax = thisMax - #if thisMin < xMin: xMin = thisMin - - plt.hist(data[:,4], bins=nbins, - label=lineTitle, color=colorList[iSample], - histtype = "step", range=range, - linewidth=linewidth) - - plt.legend(title = "Samples", loc = "upper right") - plt.title(plotTitle) - - plt.xlim(xMin, xMax) - #plt.xlim(xMin, xMax*1.4) # make room for legend - - plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") - - if showPlot: - os.system("display %s" % figDir+"/fig_"+plotName+".png") - - -# ----------------------------------------------------------------------------- -def plot1dProfiles(workDir=None, sampleList=None, figDir=None, - plotNameBase="1dprofile", - showPlot=False, dataPortion=None, setName=None): - - - plt.ioff() - maptplotlib.pyplot.switch_backed('Agg') - - plt.clf() - plt.xlabel(r"$R/R_{v,\mathrm{max}}$") - plt.ylabel(r"$n / \bar n$") - - for (iSample,sample) in enumerate(sampleList): - - sampleName = sample.fullName - - for (iStack,stack) in enumerate(sample.stacks): - - plotTitle = setName - plotName = plotNameBase - - runSuffix = getStackSuffix(stack.zMin, stack.zMax, stack.rMin, - stack.rMax, dataPortion) - - plotTitle = sampleName + ", z = "+str(stack.zMin)+"-"+str(stack.zMax)+", R = "+str(stack.rMin)+"-"+str(stack.rMax)+ r" $h^{-1}$ Mpc" - - filename = workDir+"/sample_"+sampleName+"/stacks_"+runSuffix+\ - "profile_1d.txt" - - if not os.access(filename, os.F_OK): - print "File not found: ", filename - continue - - data = np.loadtxt(filename, comments="#") - if data.ndim == 1: - print " Too few!" - continue - - data[:,1] /= stack.rMax - plt.ylim(ymin=0.0, ymax=np.amax(data[:,2])+0.1) - plt.xlim(xmin=0.0, xmax=2.1) - plt.plot(data[:,1], data[:,2], label=lineTitle, color=colorList[0], - linewidth=linewidth) - - plt.title(plotTitle) - - plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") - - if showPlot: - os.system("display %s" % figDir+"/fig_"+plotName+".png") - - -# ----------------------------------------------------------------------------- -def plotMarg1d(workDir=None, sampleList=None, figDir=None, - plotNameBase="marg1d", - showPlot=False, dataPortion=None, setName=None): - - plt.ioff() - maptplotlib.pyplot.switch_backed('Agg') - - plotNames = ("Om", "w0", "wa") - plotTitles = ("$\Omega_M$", "$w_0$", "$w_a$") - files = ("Om", "w0", "wa") - - for iPlot in range(len(plotNames)): - - plt.clf() - - plotName = plotNameBase+"_"+plotNames[iPlot]+"_"+dataPortion - plotTitle = plotTitles[iPlot] - dataFile = workDir + "/likelihoods_"+dataPortion+"_"+files[iPlot]+".dat" - - plt.xlabel(plotTitle, fontsize="20") - plt.ylabel("Likelihood", fontsize="20") - plt.ylim(0.0, 1.0) - - data = np.loadtxt(dataFile, comments="#") - plt.plot(data[:,0], data[:,1], color='k', linewidth=linewidth) - - plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") - - if showPlot: - os.system("display %s" % figDir+"/fig_"+plotName+".png") - - - -# ----------------------------------------------------------------------------- -def plotNumberDistribution(workDir=None, sampleList=None, figDir=None, - plotNameBase="numberdist", - showPlot=False, dataPortion=None, setName=None): - - plt.ioff() - maptplotlib.pyplot.switch_backed('Agg') - - plt.clf() - plt.xlabel("Void Radius (Mpc/h)") - plt.ylabel(r"N > R [$h^3$ Mpc$^{-3}$]") - - plotTitle = setName - - plotName = plotNameBase - - plt.yscale('log') - - for (iSample,sample) in enumerate(sampleList): - - sampleName = sample.fullName - lineTitle = sampleName - - if sample.dataType == "observation": - boxVol = vp.getSurveyProps(sample.maskFile, - sample.zBoundary[0], sample.zBoundary[1], - sample.zRange[0], sample.zRange[1], "all", - selectionFuncFile=None)[0] - else: - boxVol = sample.boxLen*sample.boxLen*(sample.zBoundaryMpc[1] - - sample.zBoundaryMpc[0]) - - boxVol *= 1.e-9 - - filename = workDir+"/sample_"+sampleName+"/untrimmed_centers_"+dataPortion+"_"+\ - sampleName+".out" - if not os.access(filename, os.F_OK): - print "File not found: ", filename - continue - - data = np.loadtxt(filename, comments="#") - if data.ndim == 1: - print " Too few!" - continue - data = data[:,4] - indices = np.arange(0, len(data), 1) - sorted = np.sort(data) - - plt.plot(sorted, indices[::-1]/boxVol, '-', - label=lineTitle, color=colorList[iSample], - linewidth=linewidth) - - plt.legend(title = "Samples", loc = "upper right") - plt.title(plotTitle) - - plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") - - if showPlot: - os.system("display %s" % figDir+"/fig_"+plotName+".png") - -# ----------------------------------------------------------------------------- -def plotVoidDistribution(workDir=None, sampleList=None, figDir=None, - plotNameBase="dv", - showPlot=False, dataPortion=None, setName=None): - - plt.ioff() - maptplotlib.pyplot.switch_backed('Agg') - Nmesh = 256 - - for (iSample,sample) in enumerate(sampleList): - plt.clf() - plt.xlabel("x (Mpc/h)") - plt.ylabel("y (Mpc/h)") - - sampleName = sample.fullName - - plotName = plotNameBase+"_"+sampleName - - filename = workDir+"/sample_"+sampleName+"/untrimmed_centers_"+dataPortion+"_"+\ - sampleName+".out" - - if not os.access(filename, os.F_OK): - print "File not found: ", filename - continue - - void_file = open(filename,'r') - void_header1 = void_file.readline().split(",") - void_data1 = np.reshape(void_file.read().split(), - (-1,len(void_header1))).astype(np.float32) - void_file.close() - - xv = void_data1[:,0:3] - rv = void_data1[:,4] - vv = void_data1[:,6] - dv, wm, ws = xcor.cic(xv, sample.boxLen, Lboxcut = 0., Nmesh = Nmesh) - plt.imshow(np.sum(dv+1,2)/Nmesh,extent=[0,sample.boxLen,0,sample.boxLen], - aspect='equal', - cmap='YlGnBu_r',interpolation='gaussian') - plt.colorbar() - - plt.title("Voids: "+sampleName) - - plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") - plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") - - if showPlot: - os.system("display %s" % figDir+"/fig_"+plotName+".png") - From 694692cb8aa2366172ba6e58d70887d112e9684d Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Tue, 6 May 2014 21:25:13 -0500 Subject: [PATCH 09/13] updated plotting --- README | 48 +------ .../void_python_tools/voidUtil/__init__.py | 3 + .../void_python_tools/voidUtil/plotDefs.py | 33 +++++ .../void_python_tools/voidUtil/plotUtil.py | 121 ++++++++++++++++++ 4 files changed, 158 insertions(+), 47 deletions(-) create mode 100644 python_tools/void_python_tools/voidUtil/plotDefs.py create mode 100644 python_tools/void_python_tools/voidUtil/plotUtil.py diff --git a/README b/README index c29738f..60bec77 100644 --- a/README +++ b/README @@ -16,50 +16,4 @@ Copyright (C) 2010-2014 Guilhem Lavaux, 2011-2014 P.M. Sutter. This software is put under the GNU Public License. Please see LICENSE for further information. - -Parts of the pipeline includes ZOBOV. See zobov/zobov_readme.txt for -copyright/license information - -Building --------- - - -After compiling, go to the pipeline directory. - - -Using the pipeline ------------------- - - -Create a dataset parameter file. Look at datasets/multidark.py for -an example. Describe the simulation, where to put outputs, how many -redshift slices, subvolumes, etc. etc. - -prepareCatalogs will produce a pipeline script for each -subsampling you choose. If you have multiple redshift particle files, -and choose multiple slices and/or subdivisions, they will be packaged -in the same pipeline script. - -Run "./generateCatalog.py [name of pipeline script]" for each script -written by prepareGadgetCatalog. This will run generateMock, zobov, -and pruneVoids. At the end of it, you should have a void catalog for -each redshift, slice, and subdivision. - -Check the logfiles for any error messages. - -See the README of the public void catalog for the format of the -outputs. - -Please do not change the outputs of pruneVoids etc. without -discussion, since further analysis relies on the current formats. - -If you're wondering why these scripts are rather complex, it's because -it can also support A-P analysis, which is much more complicated :) - -Good luck! - -Important directories: - -pipeline: scripts to set up and generate void catalogs -crossCompare: analysis and plotting tools designed to work with disparate catalogs - +This pipeline includes ZOBOV. See zobov/zobov_readme.txt for copyright/license information. diff --git a/python_tools/void_python_tools/voidUtil/__init__.py b/python_tools/void_python_tools/voidUtil/__init__.py index 46119e7..189dfa2 100644 --- a/python_tools/void_python_tools/voidUtil/__init__.py +++ b/python_tools/void_python_tools/voidUtil/__init__.py @@ -17,4 +17,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #+ + from catalogUtil import * +from plotDefs import * +from plotUtil import * diff --git a/python_tools/void_python_tools/voidUtil/plotDefs.py b/python_tools/void_python_tools/voidUtil/plotDefs.py new file mode 100644 index 0000000..fbdaf02 --- /dev/null +++ b/python_tools/void_python_tools/voidUtil/plotDefs.py @@ -0,0 +1,33 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/plotDefs.py +# Copyright (C) 2010-2013 Guilhem Lavaux +# Copyright (C) 2011-2013 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. +#+ +LIGHT_SPEED = 299792.458 + +colorList = ['r', 'b', 'g', 'y', 'c', 'm', + 'darkred', 'grey', + 'orange', 'darkblue', + 'indigo', 'lightseagreen', 'maroon', 'olive', + 'royalblue', 'palevioletred', 'seagreen', 'tomato', + 'aquamarine', 'darkslateblue', + 'khaki', 'lawngreen', 'mediumorchid', + 'orangered', 'thistle' + 'yellowgreen'] + +linewidth = 4 +fontsize = 12 diff --git a/python_tools/void_python_tools/voidUtil/plotUtil.py b/python_tools/void_python_tools/voidUtil/plotUtil.py new file mode 100644 index 0000000..591461a --- /dev/null +++ b/python_tools/void_python_tools/voidUtil/plotUtil.py @@ -0,0 +1,121 @@ +#+ +# VIDE -- Void IDentification and Examination -- ./python_tools/void_python_tools/plotting/plotTools.py +# Copyright (C) 2010-2013 Guilhem Lavaux +# Copyright (C) 2011-2013 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. +#+ +__all__=['plotRedshiftDistribution', 'plotSizeDistribution', 'plot1dProfiles', + 'plotMarg1d', 'plotNumberDistribution', 'plotVoidDistribution'] + +from void_python_tools.backend.classes import * +from plotDefs import * +import numpy as np +import os +import pylab as plt +import void_python_tools.apTools as vp + +def fill_between(x, y1, y2=0, ax=None, **kwargs): + """Plot filled region between `y1` and `y2`. + + This function works exactly the same as matplotlib's fill_between, except + that it also plots a proxy artist (specifically, a rectangle of 0 size) + so that it can be added it appears on a legend. + """ + ax = ax if ax is not None else plt.gca() + ax.fill_between(x, y1, y2, interpolate=True, **kwargs) + p = plt.Rectangle((0, 0), 0, 0, **kwargs) + ax.add_patch(p) + +# ----------------------------------------------------------------------------- +def plotNumberFunction(sampleDirList=None, figDir="./", + plotName="numberfunc", + dataPortion="central"): + +print "Plotting number function" + +plt.clf() +plt.xlabel("$R_{eff}$ [$h^{-1}Mpc$]", fontsize=14) +plt.ylabel(r"log ($n$ (> R) [$h^3$ Gpc$^{-3}$])", fontsize=14) + +for (iSample,sampleDir) in enumerate(sampleDirList): + with open(workDir+sampleDir+"/sample_info.dat", 'rb') as input: + sample = pickle.load(input) + filename = sampleDir+"/centers_"+dataPortion+"_"+sample.fullName+".out" + if not os.access(filename, os.F_OK): + print "File not found: ", filename + else: + data = np.loadtxt(filename, comments="#")[:,4] + + if sample.dataType == "observation": + # look for the mask file + if os.access(sample.maskFile, os.F_OK): + maskFile = sample.maskFile + else: + maskFile = sampleDir+"/"+os.path.basename(sample.maskFile) + print "Using maskfile found in:", maskFile + + boxVol = vp.getSurveyProps(maskFile, + sample.zBoundary[0], sample.zBoundary[1], + sample.zRange[0], sample.zRange[1], "all", + selectionFuncFile=None)[0] + #selectionFuncFile=sample.selFunFile)[0] + boxVol *= obsFudgeFactor + else: + boxVol = sample.boxLen*sample.boxLen*(sample.zBoundaryMpc[1] - + sample.zBoundaryMpc[0]) + + boxVol *= 1.e-9 # Mpc->Gpc + + bins = args.xmax/5. + hist, binEdges = np.histogram(data, bins=bins, range=(0., 100.)) + binCenters = 0.5*(binEdges[1:] + binEdges[:-1]) + + nvoids = len(data) + var = hist * (1. - hist/nvoids) + sig = np.sqrt(var) + + lowerbound = hist - sig + upperbound = hist + sig + + mean = np.log10(hist/boxVol) + lowerbound = np.log10(lowerbound/boxVol) + upperbound = np.log10(upperbound/boxVol) + + lineColor = colorList[iSample] + lineTitle = sample.fullName + + trim = (bounds[0] > .01) + mean = mean[trim] + binCentersToUse = binCenters[trim] + lower = lowerbound[trim] + upper = upperbound[trim] + + alpha = 0.55 + fill_between(binCentersToUse, lower, upper, + label=lineTitle, color=lineColor, + alpha=alpha, + ) + + lineStyle = '-' + plt.plot(binCentersToUse, mean, lineStyle, + color=lineColor, + linewidth=3) + + plt.legend(loc = "upper right", fancybox=True, prop={'size':14}) + + plt.savefig(figDir+"/fig_"+plotName+".pdf", bbox_inches="tight") + plt.savefig(figDir+"/fig_"+plotName+".eps", bbox_inches="tight") + plt.savefig(figDir+"/fig_"+plotName+".png", bbox_inches="tight") From 0a16653e9bf9106f7273ddd9dd654a40eb001758 Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Tue, 6 May 2014 22:30:49 -0500 Subject: [PATCH 10/13] cleaned up catalog utlities --- .../void_python_tools/voidUtil/catalogUtil.py | 118 +++++++++--------- .../void_python_tools/voidUtil/plotUtil.py | 23 +--- 2 files changed, 68 insertions(+), 73 deletions(-) diff --git a/python_tools/void_python_tools/voidUtil/catalogUtil.py b/python_tools/void_python_tools/voidUtil/catalogUtil.py index f12ef7a..eb530bd 100644 --- a/python_tools/void_python_tools/voidUtil/catalogUtil.py +++ b/python_tools/void_python_tools/voidUtil/catalogUtil.py @@ -144,10 +144,11 @@ def loadPartVel(sampleDir): return partVel # ----------------------------------------------------------------------------- -def getPartTree(sampleDir, partData, boxLen): +def getPartTree(catalog): - with open(sampleDir+"/sample_info.dat", 'rb') as input: - sample = pickle.load(input) + sample = catalog.sampleInfo + partData = catalog.partData + boxLen = catalog.boxLen periodicLine = getPeriodic(sample) @@ -222,7 +223,12 @@ class Catalog: sampleInfo = None # ----------------------------------------------------------------------------- -def loadVoidCatalog(sampleDir, dataPortion="central"): +def loadVoidCatalog(sampleDir, dataPortion="central", loadPart=True): +# loads a void catalog +# sampleDir: path to VIDE output directory +# dataPortion: "central" or "all" +# loadPart: if True, also load particle information + #print " Loading particle data..." sys.stdout.flush() @@ -246,31 +252,6 @@ def loadVoidCatalog(sampleDir, dataPortion="central"): catalog.boxLen[2] = ranges[2][1] - ranges[2][0] File.close() - print "Loading all particles..." - partData, boxLen, volNorm, isObservationData, ranges = loadPart(sampleDir) - numPartTot = len(partData) - catalog.numPartTot = numPartTot - catalog.partPos = partData - catalog.part = [] - for i in xrange(len(partData)): - catalog.part.append(Bunch(x = partData[i][0], - y = partData[i][1], - z = partData[i][2], - volume = 0, - ra = 0, - dec = 0, - redshift = 0, - uniqueID = 0)) - - - print "Loading volumes..." - volFile = sampleDir+"/vol_"+sample.fullName+".dat" - File = file(volFile) - chk = np.fromfile(File, dtype=np.int32,count=1) - vols = np.fromfile(File, dtype=np.float32,count=numPartTot) - for ivol in xrange(len(vols)): - catalog.part[ivol].volume = vols[ivol] / volNorm - print "Loading voids..." fileName = sampleDir+"/untrimmed_voidDesc_"+dataPortion+"_"+sample.fullName+".out" catData = np.loadtxt(fileName, comments="#", skiprows=2) @@ -342,40 +323,65 @@ def loadVoidCatalog(sampleDir, dataPortion="central"): iLine += 1 - print "Loading zone-void membership info..." - zoneFile = sampleDir+"/voidZone_"+sample.fullName+".dat" - catalog.void2Zones = [] - File = file(zoneFile) - numZonesTot = np.fromfile(File, dtype=np.int32,count=1) - catalog.numZonesTot = numZonesTot - for iZ in xrange(numZonesTot): - numZones = np.fromfile(File, dtype=np.int32,count=1) - catalog.void2Zones.append(Bunch(numZones = numZones, - zoneIDs = [])) + if loadPart: + print "Loading all particles..." + partData, boxLen, volNorm, isObservationData, ranges = loadPart(sampleDir) + numPartTot = len(partData) + catalog.numPartTot = numPartTot + catalog.partPos = partData + catalog.part = [] + for i in xrange(len(partData)): + catalog.part.append(Bunch(x = partData[i][0], + y = partData[i][1], + z = partData[i][2], + volume = 0, + ra = 0, + dec = 0, + redshift = 0, + uniqueID = 0)) + + + print "Loading volumes..." + volFile = sampleDir+"/vol_"+sample.fullName+".dat" + File = file(volFile) + chk = np.fromfile(File, dtype=np.int32,count=1) + vols = np.fromfile(File, dtype=np.float32,count=numPartTot) + for ivol in xrange(len(vols)): + catalog.part[ivol].volume = vols[ivol] / volNorm - for p in xrange(numZones): - zoneID = np.fromfile(File, dtype=np.int32,count=1) - catalog.void2Zones[iZ].zoneIDs.append(zoneID) + print "Loading zone-void membership info..." + zoneFile = sampleDir+"/voidZone_"+sample.fullName+".dat" + catalog.void2Zones = [] + File = file(zoneFile) + numZonesTot = np.fromfile(File, dtype=np.int32,count=1) + catalog.numZonesTot = numZonesTot + for iZ in xrange(numZonesTot): + numZones = np.fromfile(File, dtype=np.int32,count=1) + catalog.void2Zones.append(Bunch(numZones = numZones, + zoneIDs = [])) + + for p in xrange(numZones): + zoneID = np.fromfile(File, dtype=np.int32,count=1) + catalog.void2Zones[iZ].zoneIDs.append(zoneID) - print "Loading particle-zone membership info..." - zonePartFile = sampleDir+"/voidPart_"+sample.fullName+".dat" - catalog.zones2Parts = [] - File = file(zonePartFile) - chk = np.fromfile(File, dtype=np.int32,count=1) - numZonesTot = np.fromfile(File, dtype=np.int32,count=1) - for iZ in xrange(numZonesTot): - numPart = np.fromfile(File, dtype=np.int32,count=1) - catalog.zones2Parts.append(Bunch(numPart = numPart, - partIDs = [])) + print "Loading particle-zone membership info..." + zonePartFile = sampleDir+"/voidPart_"+sample.fullName+".dat" + catalog.zones2Parts = [] + File = file(zonePartFile) + chk = np.fromfile(File, dtype=np.int32,count=1) + numZonesTot = np.fromfile(File, dtype=np.int32,count=1) + for iZ in xrange(numZonesTot): + numPart = np.fromfile(File, dtype=np.int32,count=1) + catalog.zones2Parts.append(Bunch(numPart = numPart, + partIDs = [])) - for p in xrange(numPart): - partID = np.fromfile(File, dtype=np.int32,count=1) - catalog.zones2Parts[iZ].partIDs.append(partID) + for p in xrange(numPart): + partID = np.fromfile(File, dtype=np.int32,count=1) + catalog.zones2Parts[iZ].partIDs.append(partID) return catalog - # ----------------------------------------------------------------------------- def getVoidPart(catalog, voidID): diff --git a/python_tools/void_python_tools/voidUtil/plotUtil.py b/python_tools/void_python_tools/voidUtil/plotUtil.py index 591461a..d0d4e0b 100644 --- a/python_tools/void_python_tools/voidUtil/plotUtil.py +++ b/python_tools/void_python_tools/voidUtil/plotUtil.py @@ -17,8 +17,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #+ -__all__=['plotRedshiftDistribution', 'plotSizeDistribution', 'plot1dProfiles', - 'plotMarg1d', 'plotNumberDistribution', 'plotVoidDistribution'] +__all__=['plotNumberFunction',] from void_python_tools.backend.classes import * from plotDefs import * @@ -40,7 +39,7 @@ def fill_between(x, y1, y2=0, ax=None, **kwargs): ax.add_patch(p) # ----------------------------------------------------------------------------- -def plotNumberFunction(sampleDirList=None, figDir="./", +def plotNumberFunction(catalogList, figDir="./", plotName="numberfunc", dataPortion="central"): @@ -50,22 +49,12 @@ plt.clf() plt.xlabel("$R_{eff}$ [$h^{-1}Mpc$]", fontsize=14) plt.ylabel(r"log ($n$ (> R) [$h^3$ Gpc$^{-3}$])", fontsize=14) -for (iSample,sampleDir) in enumerate(sampleDirList): - with open(workDir+sampleDir+"/sample_info.dat", 'rb') as input: - sample = pickle.load(input) - filename = sampleDir+"/centers_"+dataPortion+"_"+sample.fullName+".out" - if not os.access(filename, os.F_OK): - print "File not found: ", filename - else: - data = np.loadtxt(filename, comments="#")[:,4] +for (iSample,catalog) in enumerate(catalogList): + sample = catalog.sampleInfo + data = catalog.voids[:].radius if sample.dataType == "observation": - # look for the mask file - if os.access(sample.maskFile, os.F_OK): - maskFile = sample.maskFile - else: - maskFile = sampleDir+"/"+os.path.basename(sample.maskFile) - print "Using maskfile found in:", maskFile + maskFile = sample.maskFile boxVol = vp.getSurveyProps(maskFile, sample.zBoundary[0], sample.zBoundary[1], From 1380ae2caf0b0daafd7e6eccebead71f3897f3ad Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Wed, 7 May 2014 13:30:16 -0500 Subject: [PATCH 11/13] removed AP stacking in preparation script --- .../pipeline_source/prepareCatalogs.in.py | 65 ------------------- 1 file changed, 65 deletions(-) diff --git a/python_tools/pipeline_source/prepareCatalogs.in.py b/python_tools/pipeline_source/prepareCatalogs.in.py index 1b43885..fb5e8ce 100644 --- a/python_tools/pipeline_source/prepareCatalogs.in.py +++ b/python_tools/pipeline_source/prepareCatalogs.in.py @@ -270,71 +270,6 @@ newSample = Sample(dataFile = "{dataFile}", dataSampleList.append(newSample) """ - if stackMode == "fixed": - stackInfo = """ -# {zMin}, {zMax}, {minRadius} -newSample.addStack(0.0, 5.0, 5 , 10, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 10, 15, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 15, 20, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 20, 25, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 25, 30, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 30, 35, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 35, 40, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 40, 45, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 45, 50, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 50, 55, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 55, 60, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 60, 65, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 65, 70, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 70, 75, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 75, 80, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 80, 85, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 85, 90, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 90, 95, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack(0.0, 5.0, 95, 100, False, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) - """ - elif stackMode == "sample_thick": - stackInfo = """ -# {zMin}, {zMax}, {minRadius} -newSample.addStack({zMin}, {zMax}, 10, 20, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 20, 30, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 30, 40, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 40, 50, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 50, 60, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 60, 70, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 70, 80, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 80, 90, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 90, 100, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) - """ - - elif stackMode == "log": - stackInfo = "" - rMin = 10 - rMax = 100 - rStart = rMin - rEnd = rMin - dlogR = 0.25 - while rEnd < rMax: - rEnd = (1+0.5*dlogR)*rStart/(1-0.5*dlogR) - - stackInfo += """newSample.addStack({zMin}, {zMax}"""+ ", %g, %g, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids})" % (rStart, rEnd) - - rStart = rEnd - - elif stackMode == "auto": - stackInfo = """ -newSample.addStack({zMin}, {zMax}, 2*{minRadius} , 2*{minRadius}+2, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 2*{minRadius} , 2*{minRadius}+4, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 2*{minRadius}+2, 2*{minRadius}+6, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 2*{minRadius}+6, 2*{minRadius}+10, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 2*{minRadius}+10, 2*{minRadius}+18, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) -newSample.addStack({zMin}, {zMax}, 2*{minRadius}+18, 2*{minRadius}+24, True, False, rescaleMode='{rescaleMode}', maxVoids={maxVoids}) - """ - else: - stackInfo = """ -# {zMin}, {zMax}, {minRadius} -""" - for (iFile, redshift) in enumerate(redshifts): fileNum = fileNums[iFile] From 1d728c2cc8f01756aa1c9cff4565f83656a23e2d Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Wed, 7 May 2014 21:18:34 -0500 Subject: [PATCH 12/13] name change for preparation script --- c_tools/mock/generateFromCatalog.cpp | 4 ++-- .../{prepareCatalogs.in.py => prepareInputs.in.py} | 0 python_tools/void_python_tools/voidUtil/catalogUtil.py | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) rename python_tools/pipeline_source/{prepareCatalogs.in.py => prepareInputs.in.py} (100%) diff --git a/c_tools/mock/generateFromCatalog.cpp b/c_tools/mock/generateFromCatalog.cpp index e3c3937..b10c1f1 100644 --- a/c_tools/mock/generateFromCatalog.cpp +++ b/c_tools/mock/generateFromCatalog.cpp @@ -368,8 +368,8 @@ void generateSurfaceMask(generateFromCatalog_info& args , // TEST - insert mock galaxies along spheres of survey redshift boundaries fp = fopen("mock_sphere.txt", "w"); - for (int q = 0; q < 0; q++) { - //for (int q = 0; q < full_mask_list.size(); q++) { + //for (int q = 0; q < 0; q++) { + for (int q = 0; q < full_mask_list.size(); q++) { vec3 v = mask.pix2vec(full_mask_list[q]); Position p; diff --git a/python_tools/pipeline_source/prepareCatalogs.in.py b/python_tools/pipeline_source/prepareInputs.in.py similarity index 100% rename from python_tools/pipeline_source/prepareCatalogs.in.py rename to python_tools/pipeline_source/prepareInputs.in.py diff --git a/python_tools/void_python_tools/voidUtil/catalogUtil.py b/python_tools/void_python_tools/voidUtil/catalogUtil.py index eb530bd..2c676cb 100644 --- a/python_tools/void_python_tools/voidUtil/catalogUtil.py +++ b/python_tools/void_python_tools/voidUtil/catalogUtil.py @@ -229,7 +229,6 @@ def loadVoidCatalog(sampleDir, dataPortion="central", loadPart=True): # dataPortion: "central" or "all" # loadPart: if True, also load particle information - #print " Loading particle data..." sys.stdout.flush() catalog = Catalog() From 85ea80d4bcc804e8eac30f1efd58ae6caf55befa Mon Sep 17 00:00:00 2001 From: "P.M. Sutter" Date: Thu, 8 May 2014 19:50:18 -0500 Subject: [PATCH 13/13] bug fix in name change --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 22f2faa..3c6f486 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,8 +68,8 @@ include(${CMAKE_SOURCE_DIR}/external/external_python_build.cmake) SET(PYTHONPATH ${PYTHON_LOCAL_SITE_PACKAGE}) configure_exec(${CMAKE_SOURCE_DIR}/run_python.sh.in ${CMAKE_BINARY_DIR} run_python.sh) configure_exec(${CMAKE_SOURCE_DIR}/run_env.sh.in ${CMAKE_BINARY_DIR} run_env.sh) -configure_exec(${CMAKE_SOURCE_DIR}/python_tools/pipeline_source/prepareCatalogs.in.py -${CMAKE_BINARY_DIR}/pipeline prepareCatalogs.py) +configure_exec(${CMAKE_SOURCE_DIR}/python_tools/pipeline_source/prepareInputs.in.py +${CMAKE_BINARY_DIR}/pipeline prepareInputs.py) #configure_exec(${CMAKE_SOURCE_DIR}/python_tools/pipeline_source/applyMaskToMock.in.py #${CMAKE_BINARY_DIR}/pipeline applyMaskToMock.py) #configure_exec(${CMAKE_SOURCE_DIR}/python_tools/pipeline_source/buildSkyProjections.in.py