@@ -301,11 +301,15 @@ def pca(*all_args: List, **all_kwargs: dict):
301301 and boat regions, respectively, following the denominations in [REN23]_.
302302 If only one mask is provided, it will be used as the anchor, and the
303303 boat images will not be masked (i.e., full frames used).
304- ref_strategy: str, opt {'RDI', 'ARDI'}
304+ ref_strategy: str, opt {'RDI', 'ARDI', 'RSDI', 'ARSDI' }
305305 [cube_ref is not None] Indicates the strategy to be adopted when a
306- reference cube is provided. By default, RDI is done - i.e. the science
307- images are not used in the PCA library. If set to 'ARDI', the PCA
308- library is made of both the science and reference images.
306+ reference cube is provided. By default, RDI is done for a 3D input cube,
307+ while RSDI is done for a 4D input cube if a ``scale_list`` is provided
308+ (otherwise RDI is done channel per channel). RSDI rescales all channels
309+ to build a larger reference library available for each channel. If
310+ ``ref_strategy`` is set to 'ARDI' or 'ARSDI', the PCA library is made of
311+ both the science and reference images. In the case of 'ARSDI', all
312+ channels (science and reference) are rescaled for a larger library.
309313 check_memory : bool, optional
310314 If True, it checks that the input cube is smaller than the available
311315 system memory.
@@ -1155,7 +1159,7 @@ def _adimsdi_singlepca(
11551159 idx_ini = ifs_collapse_range [0 ]
11561160 idx_fin = ifs_collapse_range [1 ]
11571161
1158- cube_desc_residuals = np .zeros_like (cube )
1162+ cube_desc_residuals = np .zeros_like (cube [ idx_ini : idx_fin ] )
11591163
11601164 for i in Progressbar (range (n ), verbose = verbose ):
11611165 res_i = scwave (
0 commit comments