From 3d6ba372db0f02c05a634f88bed6929348e8dc24 Mon Sep 17 00:00:00 2001
From: Arin Wongprommoon <arin.wongprommoon@ed.ac.uk>
Date: Tue, 17 Jan 2023 10:10:02 +0000
Subject: [PATCH] change(aliby): order of channels in dummy tiler metadata

WHY IS THIS CHANGE NEEDED?:
- when new slices are added using ImageDummy.pad_array(), the original
  array is at the end

HOW DOES THE CHANGE SOLVE THE PROBLEM?:
- for consistency, made the 'nil' elements precede the reference channel
---
 src/aliby/tile/tiler.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/aliby/tile/tiler.py b/src/aliby/tile/tiler.py
index a6ca276b..f1db705c 100644
--- a/src/aliby/tile/tiler.py
+++ b/src/aliby/tile/tiler.py
@@ -265,8 +265,8 @@ class Tiler(StepABC):
             "size_c": dummy_image.shape[1],
             "size_t": dummy_image.shape[0],
             "channels": [
-                parameters["ref_channel"],
                 *(["nil"] * (dummy_image.shape[1] - 1)),
+                parameters["ref_channel"],
             ],
             "name": " ",
         }
-- 
GitLab