summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2021-10-12 01:35:50 -0500
committerLuis Martinez2021-10-12 01:35:50 -0500
commit0575186f3f8a08358ce72cd9f01202e165f2e91a (patch)
tree29f45d8435cfa71696c16f25fe9263ed75c5dcf5
parent8d82cf7f0ee2237bbd0ac4c7aaf45db4085f8853 (diff)
downloadaur-0575186f3f8a08358ce72cd9f01202e165f2e91a.tar.gz
update to 4.2.6
* added changelog file * package cleaned up according to Python packaging guidelines * added man pages
-rw-r--r--.SRCINFO30
-rw-r--r--CHANGELOG.rst123
-rw-r--r--PKGBUILD61
3 files changed, 163 insertions, 51 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a62a4f118d4b..b7a80444d9d8 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,21 @@
pkgbase = python-treecorr
- pkgdesc = A package for efficiently computing 2-point and 3-point correlation functions
- pkgver = 3.3.7
+ pkgdesc = Library that efficiently computes 2-point and 3-point correlation functions
+ pkgver = 4.2.6
pkgrel = 1
- url = https://pypi.python.org/packages/5a/59/466fca95804e60a4ad0cf34de70e92fd57e6a711d09fbf1f0f8d00f833de/TreeCorr-3.3.7.tar.gz#md5=54bdf201d7e8a52b5fa9ea5e1ff1d101
- arch = any
+ url = https://github.com/rmjarvis/treecorr
+ changelog = CHANGELOG.rst
+ arch = x86_64
license = BSD
- makedepends = git
- depends = python
- depends = python-numpy
- depends = python-future
- depends = python-yaml
- depends = python-fitsio-git
- depends = python-cffi
- source = https://pypi.python.org/packages/5a/59/466fca95804e60a4ad0cf34de70e92fd57e6a711d09fbf1f0f8d00f833de/TreeCorr-3.3.7.tar.gz#md5=54bdf201d7e8a52b5fa9ea5e1ff1d101
- md5sums = 54bdf201d7e8a52b5fa9ea5e1ff1d101
+ makedepends = python-setuptools
+ makedepends = python-sphinx
+ depends = python-numpy>=1.14
+ depends = python-yaml>=3.13
+ depends = python-cffi>=1.12
+ depends = python-coord>=1.1
+ optdepends = python-fitsio: reads FITS catalogs or writes to FITS output files
+ optdepends = python-pandas: speeds up reading from ASCII catalogs
+ optdepends = python-h5py: reads HDF5 catalogs
+ source = python-treecorr-4.2.6.tar.gz::https://github.com/rmjarvis/treecorr/archive/v4.2.6.tar.gz
+ sha256sums = 78cb3a1bf43aef2c73dd89e1d0b03df955fd130943fcb3de0f447446b2142f5a
pkgname = python-treecorr
-
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
new file mode 100644
index 000000000000..d95715b8ae4d
--- /dev/null
+++ b/CHANGELOG.rst
@@ -0,0 +1,123 @@
+Changes from version 4.1 to 4.2
+===============================
+
+This update mostly involves some improvements to the new patch-based
+computations, in response to feedback from users, who have been trying it out
+in a variety of use cases. Especially note the new optional ``func`` argument
+to `BinnedCorr2.estimate_cov` and `estimate_multi_cov`, which lets you
+calculate covariances of arbitrary functions of a correlation object or list
+of correlation objects. See `Covariance of Derived Quantities` for details.
+
+Another big improvement is the ability to correctly perform three-point
+cross-correlations. I still don't have heterogeneous cross correlations like
+NGG or NNG, but now NNN, GGG, and KKK can be done correctly for 2 or 3
+different catalogs. This update does technically involve an API change,
+since the old code tried to do something when given 3 catalogs, but it
+wasn't really correct, and (consequently) I don't think anyone was actually
+trying to use that feature.
+
+See the listing below for the complete list of new features and changes.
+`Relevant PRs and Issues,
+<https://github.com/rmjarvis/TreeCorr/milestone/7?closed=1>`_
+whose issue numbers are listed below for the relevant items.
+
+.. note::
+
+ This will be the last (non-bug-fix) TreeCorr release to support Python 2.7.
+ It is becoming harder to continue to support this platform now that it is
+ officially sunsetted, so we encourage all users to switch their code to
+ Python 3.x ASAP. TreeCorr is currently compatible with Python versions
+ 2.7, 3.5, 3.6, 3.7, 3.8, 3.9. We will probably also drop 3.5 in the next
+ release as well, since that is also retired at this point.
+
+API Changes
+-----------
+
+- Changed the 3pt process function, when given 3 arguments, to accumulate all
+ triangles where points from the three input catalogs can fall into any
+ of the three triangle corners. If you need the old behavior of keeping
+ track of which catalog goes into which triangle corner, the new
+ ???CrossCorrelation classes do so both more efficiently and more
+ accurately than the previous code. (#115)
+- Changed the `NNNCorrelation.calculateZeta` function to only take
+ RDD and DRR parameters for the cross terms (if desired) rather than all
+ six (DDR, DRD, RDD, DRR, RDR, RRD). The new cross-correlation behavior of
+ the `NNNCorrelation.process` function now efficiently calculates in RDD what
+ used to be calculated in three calls for DDR, DRD, and RDD. Likewise the
+ new DRR calculates what used to require DRR, RDR, and RRD. (#122)
+
+Performance improvements
+------------------------
+
+- Only show at most 10 rows with NaNs in cases where there are lots of such
+ rows. (#111)
+- No longer remakes patches and writes them to disk if they are already present
+ on disk. If you want to force a rewrite for any reason, you can explicitly
+ call `Catalog.write_patches`. (#116)
+- Computing the data/random cross correlations for 3pt are now much faster,
+ since you only need one call for RDD and one for DRR, not all the 6 different
+ permuations. (Specifically, DDR, DRD, RDR, RRD are no longer needed.) (#122)
+
+New features
+------------
+
+- Implement patch-based calculations for 3-point correlations. This enables
+ things like jackknife correlations, low-memory calculations, and MPI execution
+ when doing NNN, KKK, or GGG correlations. (#97, #125)
+- Allow min_rpar and max_rpar for Euclidean metric. Also Periodic, although
+ I don't know if that's useful. (#101)
+- Added ability to read from hdf5 catalogs. (#106)
+- Added ability to use named columns in ASCII files if the file has column
+ names. (#108)
+- Added optional initialize=False and finalize=False options to process
+ functions. (#109)
+- Added ability to do 3 point cross-correlations properly, rather than the not
+ exactly correct version that had been implemented. Not all combinations are
+ implemented. So far just GGG, KKK, and NNN. (#115)
+- Added ability to read from parquet catalogs. (#117)
+- Added optional func parameter to estimate_cov and estimate_multi_cov. (#118)
+- Added ability to write output files as hdf5. (#122)
+
+Bug fixes
+---------
+
+- Fixed a couple problems that could arise in patch-based calculations when
+ one or more of the patches have no objects. (#123)
+
+
+Changes from version 4.2.0 to 4.2.1
+===================================
+
+- Fixed a bug when running NN correlations with MPI. Thanks to Joe Zuntz for
+ the bug report. (#127)
+
+Changes from version 4.2.1 to 4.2.2
+===================================
+
+- Fixed a build problem with gcc versions 10 and 11. Thanks to Johannes Lange
+ for reporting the problem.
+
+Changes from version 4.2.2 to 4.2.3
+===================================
+
+- Fixed a bug in the Map^3 calculation when the aperture radii are different.
+ Thanks to Laila Linke for both finding the problem and providing the fix. (#128)
+
+Changes from version 4.2.3 to 4.2.4
+===================================
+
+- Fixed a bug when running the Rlens metric with patches. Thanks to Marina Ricci
+ for the bug report. (#131)
+
+Changes from version 4.2.4 to 4.2.5
+===================================
+
+- Fixed bugs in the shot noise variance estimate for GGG and the propagation of
+ the error to Map3. Thanks to Lucas Secco for the bug report. (#133)
+
+Changes from version 4.2.5 to 4.2.6
+===================================
+
+- Fixed a numerical bug that could suppress the signal in GG correlations in
+ spherical coordinates if there are multiple objects at the same position.
+ Thanks to Sandra Unruh for the bug report. (#134)
diff --git a/PKGBUILD b/PKGBUILD
index b58abf5e0a25..bb8f557b4b67 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,50 +1,37 @@
-# This is an example PKGBUILD file. Use this as a start to creating your own,
-# and remove these comments. For more information, see 'man PKGBUILD'.
-# NOTE: Please fill out the license field for your package! If it is unknown,
-# then please put 'unknown'.
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Contributor: Andres Alejandro Navarro Alsina <aanavarroa@unal.edu.co>
+# Contributor: M. Jarvis
-# Maintainer: Andres Alejandro Navarro Alsina <aanavarroa@unal.edu.co>
-# Contributor: M. Jarvis
pkgname=python-treecorr
-pkgver=3.3.7
+pkgver=4.2.6
pkgrel=1
-#epoch=
-
-pkgdesc="A package for efficiently computing 2-point and 3-point correlation functions "
-
-
-arch=('any')
-url="https://pypi.python.org/packages/5a/59/466fca95804e60a4ad0cf34de70e92fd57e6a711d09fbf1f0f8d00f833de/TreeCorr-3.3.7.tar.gz#md5=54bdf201d7e8a52b5fa9ea5e1ff1d101"
+pkgdesc="Library that efficiently computes 2-point and 3-point correlation functions"
+arch=('x86_64')
+url="https://github.com/rmjarvis/treecorr"
license=('BSD')
-groups=()
-depends=('python' 'python-numpy' 'python-future' 'python-yaml' 'python-fitsio-git' 'python-cffi')
-makedepends=('git')
-checkdepends=()
-optdepends=()
-#provides=()
-#conflicts=()
-#replaces=()
-#backup=()
-options=()
-install=
-changelog=
-source=("${url}")
-#noextract=()
-md5sums=('54bdf201d7e8a52b5fa9ea5e1ff1d101')
-#validpgpkeys=()
-
+depends=('python-numpy>=1.14' 'python-yaml>=3.13' 'python-cffi>=1.12' 'python-coord>=1.1')
+optdepends=(
+ 'python-fitsio: reads FITS catalogs or writes to FITS output files'
+ 'python-pandas: speeds up reading from ASCII catalogs'
+ 'python-h5py: reads HDF5 catalogs')
+makedepends=('python-setuptools' 'python-sphinx')
+# checkdepends=('python-fitsio>=0.9' 'python-pandas>=0.20' 'python-hdpy' 'python-scipy>=1.2')
+changelog=CHANGELOG.rst
+source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha256sums=('78cb3a1bf43aef2c73dd89e1d0b03df955fd130943fcb3de0f447446b2142f5a')
build() {
- sudo cp /usr/lib/libffi-3.2.1/include/ffi*.h /usr/include
- cd "$src"
cd "TreeCorr-$pkgver"
python setup.py build
-}
+ local _ver="$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')"
+ cd docs
+ PYTHONPATH="../build/lib.linux-$CARCH-$_ver" make man
+}
package() {
- cd "$src"
cd "TreeCorr-$pkgver"
- python setup.py install --root=${pkgdir} --prefix=/usr
-
+ PYTHONHASHSEED=0 python setup.py install --root="$pkgdir/" --prefix=/usr --optimize=1 --skip-build
+ install -Dm 644 TreeCorr_LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm 644 docs/_build/man/TreeCorr.1 -t "$pkgdir/usr/share/man/man1/"
}