summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Aznarán Laos2023-05-27 19:41:06 -0500
committerCarlos Aznarán Laos2023-05-27 19:41:06 -0500
commit50561a0108cc315945234e4f927596f99de492fc (patch)
tree550072e7f70b75a213f84a8175a3885fa0dafde8
parentd0f294497d87fd2ffed797f8c51dbeac14749801 (diff)
downloadaur-50561a0108cc315945234e4f927596f99de492fc.tar.gz
Bump version to 2.3.0
-rw-r--r--.SRCINFO12
-rw-r--r--CHANGES.md306
-rw-r--r--PKGBUILD59
3 files changed, 35 insertions, 342 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 77c912ed6ed7..dab6c5c84af1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,23 +1,21 @@
pkgbase = python-ngmix
pkgdesc = Gaussian mixtures and image processing
- pkgver = 2.2.0
+ pkgver = 2.3.0
pkgrel = 1
url = https://github.com/esheldon/ngmix
- changelog = CHANGES.md
arch = any
license = GPL
makedepends = python-build
makedepends = python-installer
makedepends = python-setuptools
makedepends = python-wheel
- depends = python-numpy
depends = python-numba
optdepends = python-galsim: for metacalibration operations
- optdepends = python-scikit-learn: for sampling multivariate PDFs
optdepends = python-scipy: for image fitting using Levenberg-Marquardt fitter
- source = python-ngmix-2.2.0.tar.gz::https://github.com/esheldon/ngmix/archive/v2.2.0.tar.gz
+ optdepends = python-scikit-learn: for sampling multivariate PDFs
+ source = ngmix-2.3.0.tar.gz::https://github.com/esheldon/ngmix/archive/v2.3.0.tar.gz
source = setup.py.patch
- sha256sums = a499f5b0ae5888f50fb97e8b59107d529f296b7a0047129f629aa4e99ef7df06
- sha256sums = 85057d5ec4f082a3599084dbe0e874be2af2a0f91786a10933b3368e6e025898
+ sha512sums = 176a80955f72b5018bbccfee1ec6dc6857975ecb81cb4092f45bff0a50c644f563317a3e74a27346a91974f900ba51f4fe046eab01d9cfa649a404c148bd39c6
+ sha512sums = a0464809ec508f67ffb79dec29088ce2b9d7269c739d66d9a47f7251ae31657d33a2fa5ffa80c37bd50b1c04b72418ef16e104b2dd4e165448f357a193b876a0
pkgname = python-ngmix
diff --git a/CHANGES.md b/CHANGES.md
deleted file mode 100644
index 29456b82c039..000000000000
--- a/CHANGES.md
+++ /dev/null
@@ -1,306 +0,0 @@
-## v2.2.0
-
-### new features
-
- - Added function to regularize moments results.
- - Added numba to pre-PSF moments to reduce runtime.
-
-
-## v2.1.0
-
-### bug fixes
-
- - Fixed 1/area normalization for all moments fields in `GaussMom` results.
-
-### new features
-
- - Added `fwhm_smooth` keyword to pre-PSF moments routines to allow for extra
- smoothing of the profile before the moments are measured.
- - Added caching of FFTs in metacal and pre-PSF moment rountines.
- - Added moments weight function normalization.
- - Changed `mom*` fields in the moments outputs to `sums*`.
- - Added `sums_norm` field to adaptive moments outputs.
-
-
-## v2.0.6
-
-### bug fixes
-
- - Fixed a bug where the `kind` attribute was not set for the `PrePSFMom` fitter.
-
-
-## v2.0.5
-
-### new features
-
- - implemented check for equality, copy() method, copy, and deepcopy
- for Gmix objects, jacobians, and Observation/ObsList/MultiBandObsList
- - added get_data() method for jacobian objects
- - added apodization to the pre-PSF moments to help prevent FFT artifacts
-
-## v2.0.4
-
-### new features
-
- - util.get_ratio_error and get_ratio_var support array arguments
- - added new function ngmix.gmix.gmix_concat to concatenate
- GMix objects into a combined GMix
- - It is no longer required to send a random number generator
- to the constructors for MetacalGaussPSF and MetacalAnalyticPSF. If one
- is sent it is still used to add a small amount of noise.
- - The metacal codes now use a copy() of the input observations when
- creating their output. This passes along all the internal data.
-
-### bug fixes
-
- - Changes to ensure the "flux" result from the `AdmomFitter` is normalized
- the same as those from the other moments fitters.
- - In MetacalFitGaussPSF when using adaptive moments to get the psf
- model, be careful to use the fitted parameters rather than going through
- an intermediate gmix, which converts e1, e2 to g1, g2 and can fail in
- rare cases.
- - Some AdmomFitter failures were not being flagged properly.
-
-## v2.0.3
-
-### new features
-
- - All moments codes now produce similar output dictionaries and flags.
- - The `PrePSFGaussMom` class has been renamed to `PGaussMom`. The old name still
- exists for backwards compatibility but will be deprecated and removed at
- some future date.
- - The moments codes and `gaussap.py` codes now use np.nan for missing values.
- - The flag bits have been normalized across the code base to now all reside in
- `ngmix.flags`. A new function to convert the flags to a descriptive string is
- located there as well.
- - A new function exists to convert raw moments to shape results:
- `ngmix.moments.make_mom_result`
- - The moments fitters now have a `kind` attribute to help downstream code
- process them uniformly.
- - Added slots for position moments in moments output for moments fitters.
-
-### bug fixes
-
- - Ensure only square images are accepted for pre psf moments codes
- KSigmaMom and PrePSFGaussMom
-
-## v2.0.2
-
-### new features
-
-- Added `PrePSFGaussMom` fitter for computing pre-PSF moments in Gaussian
- apertures
-- Test suite now runs in parallel using `pytest-xdist`
-- Added `flux_flags` and `T_flags` fields to `KSigmaMom` and `PrePSFGaussMom`
- fitters for using just those quantities.
-- Added `FFTRangeError` which is now raised if `KSigmaMom` or `PrePSFGaussMom`
- are using inconsistent FFT sizes given the kernel size.
-- add `cenonly` option to adaptive moments, using a fixed gaussian covariance
- with only the center varying. Added ngmix.admom.find_cen_admom function
- for finding the center.
-
-### bug fixes
-
-- Fixed bug identifying that adaptive moments had reached maximum
- number of iterations
-
-## v2.0.1
-
-### new features
-
-- em fitting now supports fixed covariance matrices using the
- EMFitterFixCov, or equivalently the fixcov=True keyword to the run_em
- convenience function
-
-### bug fixes
-
-- fixed bug with sheared psfs in metacal, negative sheared psfs
- were not being cached.
-- bug in psf guesser when using guess_from_moms that caused
- infinite recursion
-
-## v2.0.0
-
-### breaking API changes
-
-- ngmix now evaluates models in flux units rather than surface brightness.
- Users whose images are in flux units previously had to include extra
- factors of pixel scale squared to get the right units, this is no longer
- the case.
-- The fitters no longer take the observation in the constructor.
- All fitting/measurement conform to a common interface. The classes have a `go`
- method that takes the observation and possibly a guess.
-- The bootstrap and runner code has been completely replaced by a new api.
- The bootstrappers are now generic, wrapping runners that are themselves
- generic wrappers for fitters and guessers. Thus the bootstrap/runner
- code is completely generic and can work with any of the fitters/guessers.
-- The guessers now optionally take the observation as argument when called; this
- facilitates the cases where a guess can be made based on the observations.
-- The em codes take GMix objects as guesses, a simple T guess is no longer
- supported
-- The em codes now work in image flux units rather than normalizing the
- mixture
-- all PDFs/priors sample methods take the option nrand=. Some had previously
- taken n=
-- fitters renamed:
- - LMSimple -> Fitter
- - LMCoellip -> CoellipFitter
- - TemplateFluxFitter -> PSFFluxFitter
- - GalsimSimple -> GalsimFitter
- - SpergelFitter -> GalsimSpergelFitter
- - MoffatFitter -> GalsimMoffatFitter
- - GalsimTemplateFluxFitter -> GalsimPSFFluxFitter
- - GMixEM -> EMFitter
- - Admom -> AdmomFitter
-- Copies of observations now propagate the values of `store_pixels` and `ignore_zero_weight`.
-
-### bug fixes
-
-- metacal was reconvolving by the pixel *twice*, which resulted in larger
- reconvolved PSFs and thus somewhat lower, but still accurate, response than
- the pixel was included once. This did not cause any bias.
-- fixed computation of Jacobian center for `ngmix.KObservation`s with mixed
- even-odd dimensions
-- the total shape amplitude `g` is now reset properly when using the
- `Shape.set_g1g2` method
-- fixed large rounding errors in some shape conversions in `ngmix.shape`
-- fixed bug in `ngmix.shape.g1g2_to_eta1eta2` in handling numpy array inputs
-- fixed bug in `ngmix.shape.e1e2_to_eta1eta2` in handling numpy array inputs
-- fixed bug in `ngmix.priors.GPriorBA.get_fdiff` in handling array inputs
-- fixed a bug in `ngmix.priors.TwoSidedErf.get_fdiff` in handling array inputs
-- fixed bug in `TruncatedSimpleGauss2D` where the truncation radius was applied about
- zero in some methods and not about the center
-- fixed flux unit scaling in metadetect regression tests
-
-### new features
-
-- All fitters and measurement classes adhere to a common interface.
- `fitter.go(obs=obs)` or `fitter.go(obs=obs, guess=guess)`. The obs
- is no longer taken in the constructor so the same object can be reused
- in the runners/bootstrappers for multiple measurements.
-- Replaced boostrapper/runner classes with generic classes/functions that
- expect fitters/measurements and runners to provide common interfaces
- For fitters `fitter.go(obs=obs)` or `fitter.go(obs=obs, guess=guess)`
- For runners `runner.go(obs=obs)`. New classes are bootstrap.Bootstrapper
- runners.Runner, runners.PSFRunner
-- Expanded test suite and improved documentation for all modules
-- introduced `NGmixBaseException` as parent class for all ngmix-specific exceptions
-- New guessers `TPSFFluxGuesser`, `TPSFFluxAndPriorGuesser`, `GmixPSFGuesser`,
- `SimplePSFGuesser`, `CoellipPSFGuesser`
-- New joint prior `PriorGalsimSimpleSep`
-- Added guessers `TPSFFluxGuesser`, `TPSFFluxAndPriorGuesser`, `GMixPSFGuesser`,
- `SimplePSFGuesser`, `CoellipPSFGuesser`,
-- New specialized EM fitting codes added:
- - GMixEMFixedCen: fit mixtures with fixed centers for each component
- - GMixEMFluxOnly: fit mixtures allowing only the fluxes to vary
-- some refactoring of like modules into sub-packages.
-- Added `mfrac` attribute to observations to hold masked fraction images.
-- Added Python `@property` functions for `store_pixels` and `ignore_zero_weight`
- for `ngmix.Observation`.
-- `setup.py` now gets the version from the package.
-- Added new `KSigmaMom` fitter to measure pre-PSF weighted moments using the
- `ksigma` kernel from Bernstein et al.
-
-### deprecated/removed
-
-- The `LMSimple` class now supports the "bdf" and "bd" models and has been
- renamed to `LM`. The `LMSimple` is now an alias for `LM` and is considered
- deprecated. The `LMBDF` and `LMBD` classes have been removed.
-- `ngmix.lensfit` has been removed in v2.0.0
-- all `dbyg1_*`, `dbyg2_*`, `dlnbyg1_*`, `dlnbyg2_*`, and `get_pqr*` methods,
- along with the code used to test them, have been removed from the classes in
- `ngmix.priors`
-- removed travis-ci in favor of GitHub Actions
-- the optional `rng` keyword for `ngmix.priors.srandu` has been removed in favor
- of a required keyword
-- removed priors `ZDisk2DErf`, `ZAnnulus`, `UDisk2DCut`, `TruncatedStudentPolar`,
- `TruncatedGaussianPolar`, `Student`, `Student2D`, `MultivariateLogNormal`,
- `MVNMom`, `TruncatedSimpleGauss2D`, `GPriorGreat3Exp`, `GPriorGreatDES`,
- `GPriorGreatDES2`, `GPriorGreatDESNoExp`, `GPriorM`, `GPriorMErf`, `GPriorMErf2`,
- `FlatEtaPrior`, `BFrac`, `TFluxPriorCosmosExp`, `TFluxPriorCosmosDev`,
- `GPriorCosmosSersicSpline`
-- Removed all the old bootstrapper and runner classes; replaced with generic
- `Bootstrapper, Runner, PSFRuner, and MetacalBootstrapper`, and associated functions
-- removed `GMixBDF` class. The "bdf" is now supported by the `GMixModel` class
-- removed the `roundify` and `stats` modules
-- removed the "prepix" option for metacal
-- removed guessers `RoundParsGuesser`, `MomGuesser`,
-- switched from print to logging in many modules
-- removed simplex.py no longer needed, we just use the scipy simplex fitter
-
-## v1.3.9
-
-### bug fixes
-
-- metacal was reconvolving by the pixel twice, which resulted in larger reconvolved PSFs and thus somewhat lower, but still accurate, response than the pixel was included once. This did not cause any bias.
-
-## v1.3.8
-
-### bug fixes
-
-- fix bug not updating pixel array when adding noise in metacal
-
-### new features
-
-- added writeable context for observations, now returned references
- for observation images etc. are read only unless in the writeable
- context
-- jacobian getter returns new Jacobian with readonly view, rather
- than a copy
-- added more unit tests
-
-## v1.3.7
-
-### new features
-
-- Add option to not store pixels
-
-## v1.3.6
-
-### bug fixes
-
-- fixed bug in T fraction sum for `dev` profiles
-- fixed bugs for the full bulge+disk fitter
-
-### new features
-
-- added order 5 fast exponential to fastexp.py which
- is exported as fexp. This has satisfactory accuracy
- but is much faster than expd in some real world
- scenarios. Modified the tests accordinly.
-- added a Gaussian moments fitter
-- added 5 gaussian coellip fitting in the coellip
- psf fitter
-
-## v1.3.5
-
-### bug fixes
-
-- better fast exponential function approximation
-- bug in gaussian aperture flux calculation for cm
-
-### new features
-
-- unit tests and travis CI for core APIs
-
-
-## v1.3.4
-
-### new features
-
-- analytic Gaussian aperture fluxes
-
-
-## v1.3.3
-
-### bug fixes
-
-- fixed bug in BDF Gaussian aperture fluxes
-
-
-## v1.3.2
-
-### bug fixes
-
-- Use psf_cutout_row and col for center in psf obs for
- meds reader
diff --git a/PKGBUILD b/PKGBUILD
index dac645ffa95d..a573c0310fc1 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,44 +1,45 @@
-# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
+# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
+# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Andres Alejandro Navarro Alsina <aanavarroa@unal.edu.co>
# Contributor: Erin Sheldon
-
-pkgname=python-ngmix
-_pkg="${pkgname#python-}"
-pkgver=2.2.0
+_base=ngmix
+pkgname=python-${_base}
+pkgver=2.3.0
pkgrel=1
-pkgdesc='Gaussian mixtures and image processing'
-arch=('any')
-url="https://github.com/esheldon/ngmix"
-license=('GPL')
-depends=('python-numpy' 'python-numba')
-optdepends=(
- 'python-galsim: for metacalibration operations'
- 'python-scikit-learn: for sampling multivariate PDFs'
- 'python-scipy: for image fitting using Levenberg-Marquardt fitter')
-makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
-# checkdepends=('python-pytest' 'python-galsim' 'python-scikit-learn' 'python-scipy')
-changelog=CHANGES.md
-source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz"
- 'setup.py.patch')
-sha256sums=('a499f5b0ae5888f50fb97e8b59107d529f296b7a0047129f629aa4e99ef7df06'
- '85057d5ec4f082a3599084dbe0e874be2af2a0f91786a10933b3368e6e025898')
+pkgdesc="Gaussian mixtures and image processing"
+arch=(any)
+url="https://github.com/esheldon/${_base}"
+license=(GPL)
+depends=(python-numba)
+optdepends=('python-galsim: for metacalibration operations'
+ 'python-scipy: for image fitting using Levenberg-Marquardt fitter'
+ 'python-scikit-learn: for sampling multivariate PDFs')
+makedepends=(python-build python-installer python-setuptools python-wheel)
+# checkdepends=(python-pytest python-galsim python-scipy python-fitsio python-flaky python-metadetect) # python-scikit-learn
+source=(${_base}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz
+ setup.py.patch)
+sha512sums=('176a80955f72b5018bbccfee1ec6dc6857975ecb81cb4092f45bff0a50c644f563317a3e74a27346a91974f900ba51f4fe046eab01d9cfa649a404c148bd39c6'
+ 'a0464809ec508f67ffb79dec29088ce2b9d7269c739d66d9a47f7251ae31657d33a2fa5ffa80c37bd50b1c04b72418ef16e104b2dd4e165448f357a193b876a0')
prepare() {
- patch -p1 -d "$_pkg-$pkgver" < setup.py.patch
- sed -i "s/__version__/$pkgver/" "$_pkg-$pkgver/setup.py"
+ patch -p1 -d ${_base}-${pkgver} <setup.py.patch
+ sed -i "s/__version__/$pkgver/" ${_base}-${pkgver}/setup.py
}
build() {
- cd "$_pkg-$pkgver"
- python -m build --wheel --no-isolation
+ cd ${_base}-${pkgver}
+ python -m build --wheel --skip-dependency-check --no-isolation
}
# check() {
-# cd "$_pkg-$pkgver"
-# pytest -x
+# cd ${_base}-${pkgver}
+# python -m venv --system-site-packages test-env
+# test-env/bin/python -m installer dist/*.whl
+# test-env/bin/python -m pytest
# }
package_python-ngmix() {
- cd "$_pkg-$pkgver"
- PYTHONHASHSEED=0 python -m installer --destdir="$pkgdir" dist/*.whl
+ cd ${_base}-${pkgver}
+ PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}