From e3a4bce07f3bd3bcd81f620bd633bb7344ba4756 Mon Sep 17 00:00:00 2001 From: VChristiaens Date: Thu, 23 Oct 2025 13:45:55 +0200 Subject: [PATCH 1/3] Updated build and make instructions to allow smooth upload to pypi --- Makefile | 7 +++++++ pyproject.toml | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c93fba37..0cee8a47 100644 --- a/Makefile +++ b/Makefile @@ -10,10 +10,17 @@ help: pypi: rm dist/* + rm -rf build/* + rm -r vip_hci.egg-info + pip install --upgrade pip setuptools wheel build twine python -m build twine upload dist/* pypi-test: + rm dist/* + rm -rf build/* + rm -r vip_hci.egg-info + pip install --upgrade pip setuptools wheel build twine python -m build twine upload --repository-url https://test.pypi.org/legacy/ dist/* diff --git a/pyproject.toml b/pyproject.toml index c5acf6c3..3c7b03f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["flit_core >=3.11,<4"] -build-backend = "flit_core.buildapi" +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" [project] name = "vip_hci" From 6ec5ef8692fb9a703b54ecf500d2a55a4bfd48b7 Mon Sep 17 00:00:00 2001 From: VChristiaens Date: Wed, 5 Nov 2025 13:45:14 +0100 Subject: [PATCH 2/3] PEP8 formatting --- src/vip_hci/metrics/snr_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vip_hci/metrics/snr_source.py b/src/vip_hci/metrics/snr_source.py index b651c0dd..1ff67088 100644 --- a/src/vip_hci/metrics/snr_source.py +++ b/src/vip_hci/metrics/snr_source.py @@ -226,7 +226,7 @@ def _snr_approx(array, source_xy, fwhm, centery, centerx): def indep_ap_centers(array, source_xy, fwhm, exclude_negative_lobes=False, exclude_theta_range=None, no_gap=False): """ - Define independent aperture centers at a given radial separation, starting + Define independent aperture centers at a given radial separation, starting\ from a test location provided with source_xy. Parameters From 25265a9226847aa5bc1fbedb5f55d761a4159a93 Mon Sep 17 00:00:00 2001 From: VChristiaens Date: Wed, 5 Nov 2025 13:45:28 +0100 Subject: [PATCH 3/3] Minor bug fix in PCA-RSDI --- src/vip_hci/psfsub/pca_fullfr.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/vip_hci/psfsub/pca_fullfr.py b/src/vip_hci/psfsub/pca_fullfr.py index e76634c5..884decb7 100644 --- a/src/vip_hci/psfsub/pca_fullfr.py +++ b/src/vip_hci/psfsub/pca_fullfr.py @@ -301,11 +301,15 @@ def pca(*all_args: List, **all_kwargs: dict): and boat regions, respectively, following the denominations in [REN23]_. If only one mask is provided, it will be used as the anchor, and the boat images will not be masked (i.e., full frames used). - ref_strategy: str, opt {'RDI', 'ARDI'} + ref_strategy: str, opt {'RDI', 'ARDI', 'RSDI', 'ARSDI'} [cube_ref is not None] Indicates the strategy to be adopted when a - reference cube is provided. By default, RDI is done - i.e. the science - images are not used in the PCA library. If set to 'ARDI', the PCA - library is made of both the science and reference images. + reference cube is provided. By default, RDI is done for a 3D input cube, + while RSDI is done for a 4D input cube if a ``scale_list`` is provided + (otherwise RDI is done channel per channel). RSDI rescales all channels + to build a larger reference library available for each channel. If + ``ref_strategy`` is set to 'ARDI' or 'ARSDI', the PCA library is made of + both the science and reference images. In the case of 'ARSDI', all + channels (science and reference) are rescaled for a larger library. check_memory : bool, optional If True, it checks that the input cube is smaller than the available system memory. @@ -1155,7 +1159,7 @@ def _adimsdi_singlepca( idx_ini = ifs_collapse_range[0] idx_fin = ifs_collapse_range[1] - cube_desc_residuals = np.zeros_like(cube) + cube_desc_residuals = np.zeros_like(cube[idx_ini:idx_fin]) for i in Progressbar(range(n), verbose=verbose): res_i = scwave(