Skip to content

Commit

Permalink
allowing reg_file input to compute_zpos
Browse files Browse the repository at this point in the history
  • Loading branch information
carsen-stringer committed Feb 6, 2024
1 parent 361421f commit c6e2915
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion suite2p/registration/zalign.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def register_stack(Z, ops):
return Zreg, ops


def compute_zpos(Zreg, ops):
def compute_zpos(Zreg, ops, reg_file=None):
""" compute z position of frames given z-stack Zreg
Parameters
Expand Down Expand Up @@ -156,6 +156,7 @@ def compute_zpos(Zreg, ops):
:,
]

reg_file = ops["reg_file"] if reg_file is None else reg_file
nbytes = os.path.getsize(ops["reg_file"])
nFrames = int(nbytes / (2 * Ly * Lx))

Expand Down

0 comments on commit c6e2915

Please sign in to comment.