scallops.experiment.util.map_images
- scallops.experiment.util.map_images(experiment, func, keys=None, output_type='images', **kwargs)
Apply a function to all images in one or more experiments.
- Parameters:
experiment (Experiment | Sequence[Experiment]) – Experiment(s) to map.
func (Callable) – Function to apply.
keys (Sequence[str]) – Optional subset of image keys in experiment(s) to map.
output_type (Literal['images', 'labels']) – Whether the output of func is an image or label.
kwargs – Keyword arguments to pass to func.
- Returns:
Experiment mapping keys to images or labels.