add init_seq_func to focussingSequence function. Add 'start_idx' key to sequenc control dictionary (see getFocusSequencePars). Rewrite aps
This commit is contained in:
@@ -17,6 +17,22 @@ import argparse as ap
|
||||
import subprocess as sp
|
||||
import numpy as np
|
||||
import socket
|
||||
import pathlib as pl
|
||||
|
||||
|
||||
def init_seq(seq_kwds):
|
||||
pt = pl.Path(seq_kwds["root_filename"])
|
||||
|
||||
foc_files = list(
|
||||
pt.absolute().parent.glob("{}_[0-9][0-9][0-9][0-9].fit".format(pt.stem))
|
||||
)
|
||||
|
||||
seq_kwds["start_idx"] = 1
|
||||
N = len(foc_files)
|
||||
if N > 0:
|
||||
seq_kwds["start_idx"] = N
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
def set_focus(foc_val):
|
||||
@@ -51,6 +67,6 @@ if __name__ == "__main__":
|
||||
description="Zeiss-1000 and Andor Ixon EMCCD hardware: focussing sequence implementation.",
|
||||
)
|
||||
|
||||
ret = focussing_app(parser, set_focus, get_image)
|
||||
ret = focussing_app(parser, init_seq, set_focus, get_image)
|
||||
|
||||
sys.exit(ret)
|
||||
|
||||
Reference in New Issue
Block a user