From 03aa7afcf578f6a802257a0221b9f74d3820753d Mon Sep 17 00:00:00 2001
From: Arin Wongprommoon <arin.wongprommoon@ed.ac.uk>
Date: Tue, 17 Jan 2023 09:47:31 +0000
Subject: [PATCH] fix(aliby): list of channels in dummy tiler matches number of
 channels

WHY IS THIS CHANGE NEEDED?:
- consistency

HOW DOES THE CHANGE SOLVE THE PROBLEM?:
- fill in unspecified channels with 'nil' -- normally this information
  is fetched from metadata, which we don't have for this dummy
---
 src/aliby/tile/tiler.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/aliby/tile/tiler.py b/src/aliby/tile/tiler.py
index e8ea4a97..74aae3e8 100644
--- a/src/aliby/tile/tiler.py
+++ b/src/aliby/tile/tiler.py
@@ -264,7 +264,10 @@ class Tiler(StepABC):
             "size_z": dummy_image.shape[2],
             "size_c": dummy_image.shape[1],
             "size_t": dummy_image.shape[0],
-            "channels": [parameters["ref_channel"]],
+            "channels": [
+                parameters["ref_channel"],
+                *(["nil"] * (dummy_image.shape[1] - 1)),
+            ],
             "name": " ",
         }
 
-- 
GitLab