Create dummy image to test pipeline
Summary
Dummy objects to test each component of the pipeline in isolation (i.e. tiler, segmentation, extraction).
This is a subtask of #51.
Current behaviour/setbacks
The only way we have to test these components are minimal datasets or test experiments. These test the whole pipeline, but not individual components in isolation.
Desired behaviour/advantages
Being able to test individual components in isolation makes debugging easier as it will help us isolate the problem.
The aim is to have dummy objects at our disposal that we can use for writing tests (i.e. in the tests/
directory) for individual components. This supplements the minimal datasets we have.
Goal: You should be able to do self._run_tp(input)
after loading the dummy.
Implementation sketch
In brief, we will be rebuilding the pipeline from scratch.
Choose an image (TIFF file) to be used as a dummy image. This is fixed. Put it in aliby/examples/tiler
.
Write a builder function that uses the information from this image, takes a dict derived from a *Parameters
object (i.e. TilerParameters
, BabyParameters
, ExtractionParameters
) as an argument, and returns an Image
instance (a lazy loader).
Start with Image
. In aliby.io.image.py
, within BaseLocalImage
, define:
@abstractmethod
def get_data_lazy(self) --> da.Array:
return a_dask_array
Future prospects
- Step through the rest of the pipeline.
- This may form part of a validation pipeline to be run before analysing experiment.