# Path: tests/helpers.py
# def aarc(actual, desired, rtol=1e-5, atol=1e-6):


import copy
import vip_hci as vip
from .helpers import np, parametrize, fixture
    print_debug("injecting fake planet...")
    dsi = copy.copy(example_dataset_ifs)
    # we chose a shallow copy, as we will not use any in-place operations
    # (like +=). Using `deepcopy` would be safer, but consume more memory.

    dsi.inject_companions(50, rad_dists=30)

    return dsi, dsi.injections_yx[0]

@fixture(scope="module")
def estimated_scal_factor(example_dataset_ifs):
    """
    Estimate the scaling factor required to align stellar halo in IFS cube.

    Parameters
    ----------
    example_dataset_ifs : fixture
        Taken automatically from ``conftest.py``.

    Returns
    -------
    dsi : VIP Dataset
    injected_position_yx : tuple(y, x)

    """
    print_debug("estimating scaling factor...")
    dsi = copy.copy(example_dataset_ifs)
    # we chose a shallow copy, as we will not use any in-place operations
    # (like +=). Using `deepcopy` would be safer, but consume more memory.


# Path: tests/helpers.py
# def aarc(actual, desired, rtol=1e-5, atol=1e-6):


# Path: tests/test_pipeline_sdi.py
import copy
import vip_hci as vip
from .helpers import np, parametrize, fixture

    print_debug("injecting fake planet...")
    dsi = copy.copy(example_dataset_ifs)
    # we chose a shallow copy, as we will not use any in-place operations
    # (like +=). Using `deepcopy` would be safer, but consume more memory.

    dsi.inject_companions(50, rad_dists=30)

    return dsi, dsi.injections_yx[0]

@fixture(scope="module")
def estimated_scal_factor(example_dataset_ifs):
    """
    Estimate the scaling factor required to align stellar halo in IFS cube.

    Parameters
    ----------
    example_dataset_ifs : fixture
        Taken automatically from ``conftest.py``.

    Returns
    -------
    dsi : VIP Dataset
    injected_position_yx : tuple(y, x)

    """
    print_debug("estimating scaling factor...")
    dsi = copy.copy(example_dataset_ifs)
    # we chose a shallow copy, as we will not use any in-place operations
    # (like +=). Using `deepcopy` would be safer, but consume more memory.


    dsi_flux = np.ones_like(dsi.wavelengths)