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" 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 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(