From 1a61fdb906af8399d5bea6f91536dfa50b5c38f0 Mon Sep 17 00:00:00 2001 From: liadJB <48135253+liadJB@users.noreply.github.com> Date: Thu, 7 Mar 2024 08:51:03 +0000 Subject: [PATCH] Update zalign.py Made sure that if a reg_file is given to the zalign function it uses it, rather than the ops reg_file --- suite2p/registration/zalign.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/suite2p/registration/zalign.py b/suite2p/registration/zalign.py index 67d8851d..d0beca80 100644 --- a/suite2p/registration/zalign.py +++ b/suite2p/registration/zalign.py @@ -157,10 +157,10 @@ def compute_zpos(Zreg, ops, reg_file=None): ] reg_file = ops["reg_file"] if reg_file is None else reg_file - nbytes = os.path.getsize(ops["reg_file"]) + nbytes = os.path.getsize(reg_file) nFrames = int(nbytes / (2 * Ly * Lx)) - reg_file = open(ops["reg_file"], "rb") + reg_file = open(reg_file, "rb") refAndMasks = [] for Z in Zreg: if ops["1Preg"]: