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"]: