fractal-analytics-platform / fractal-tasks-core

Main tasks for the Fractal analytics platform
https://fractal-analytics-platform.github.io/fractal-tasks-core/
BSD 3-Clause "New" or "Revised" License
11 stars 5 forks source link

To define: is `reference_cycle` the right argument name? #716

Closed tcompa closed 2 months ago

tcompa commented 2 months ago

In the following task-function signature, should we replace reference_cycle with reference_acquisition?

@validate_arguments
def apply_registration_to_image(
    *,
    # Fractal parameters
    zarr_url: str,
    # Core parameters
    registered_roi_table: str,
    reference_cycle: int = 0,
    overwrite_input: bool = True,
):

During the preparation of acq_dict, we use image.acquisition for the keys of acq_dict:

        acquisition_dict = {}
        for image in self.well.images:
            if image.acquisition is None:
                raise ValueError(
                    "Cannot get acquisition paths for Zarr files without "
                    "'acquisition' metadata at the well level"
                )
            if image.acquisition not in acquisition_dict:
                acquisition_dict[image.acquisition] = []
            acquisition_dict[image.acquisition].append(image.path)
        return acquisition_dict
jluethi commented 2 months ago

Agreed!

jluethi commented 2 months ago

Same in the calculate registration & the find consensus then