fixes: real sky tested
This commit is contained in:
@@ -125,6 +125,10 @@ def focussing_app(parser, init_seq_func, set_focus_func, get_image_func):
|
|||||||
pt.with_stem(pt.stem + "_rough")
|
pt.with_stem(pt.stem + "_rough")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# rough estimation: be sure that only a single
|
||||||
|
# acquisition per focus value
|
||||||
|
seq_rough_kwds["acq_per_value"] = 1
|
||||||
|
|
||||||
result = obsutil.focussingSequence(
|
result = obsutil.focussingSequence(
|
||||||
[focus_start, focus_stop],
|
[focus_start, focus_stop],
|
||||||
init_seq_func,
|
init_seq_func,
|
||||||
@@ -141,7 +145,7 @@ def focussing_app(parser, init_seq_func, set_focus_func, get_image_func):
|
|||||||
return result["ret_code"]
|
return result["ret_code"]
|
||||||
|
|
||||||
# compute precise range start and stop values
|
# compute precise range start and stop values
|
||||||
r = args.num * focus_step / 2.0
|
r = (args.num-1) * focus_step / 2.0
|
||||||
focus_start = result["focus_value"] - r
|
focus_start = result["focus_value"] - r
|
||||||
focus_stop = result["focus_value"] + r
|
focus_stop = result["focus_value"] + r
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ import pathlib as pl
|
|||||||
|
|
||||||
|
|
||||||
def init_seq(seq_kwds):
|
def init_seq(seq_kwds):
|
||||||
# remove extension as Eddy's 'fli_control' add hardcoded '.fit'
|
# replace extension as Eddy's 'fli_control' add hardcoded '.fit'
|
||||||
pt = pl.Path(seq_kwds["root_filename"]).with_suffix("")
|
pt = pl.Path(seq_kwds["root_filename"]).with_suffix(".fit")
|
||||||
seq_kwds["root_filename"] = str(pt)
|
seq_kwds["root_filename"] = str(pt)
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -35,7 +35,13 @@ def init_seq(seq_kwds):
|
|||||||
seq_kwds["start_idx"] = 1
|
seq_kwds["start_idx"] = 1
|
||||||
N = len(foc_files)
|
N = len(foc_files)
|
||||||
if N > 0:
|
if N > 0:
|
||||||
seq_kwds["start_idx"] = N
|
max = 0
|
||||||
|
for fname in foc_files:
|
||||||
|
inum = int(fname.stem.split('_')[1])
|
||||||
|
if inum > max:
|
||||||
|
max = inum
|
||||||
|
|
||||||
|
seq_kwds["start_idx"] = max + 1
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ def focussingSequence(
|
|||||||
ret_val["ret_code"] = -1
|
ret_val["ret_code"] = -1
|
||||||
return ret_val
|
return ret_val
|
||||||
|
|
||||||
N = 7
|
N = 5
|
||||||
|
|
||||||
if len(focus_range) > 2:
|
if len(focus_range) > 2:
|
||||||
if np.isclose(focus_range[2], 0):
|
if np.isclose(focus_range[2], 0):
|
||||||
@@ -421,7 +421,7 @@ def focussingSequence(
|
|||||||
# filename = "{}_{:04d}{}".format(fname, i_foc, file_ext)
|
# filename = "{}_{:04d}{}".format(fname, i_foc, file_ext)
|
||||||
# full_filename = str(pt.Path.joinpath(dir, pt.Path(filename)))
|
# full_filename = str(pt.Path.joinpath(dir, pt.Path(filename)))
|
||||||
|
|
||||||
full_filename = str(rname.with_stem("{}_{:04d}", rname.stem, i_foc))
|
full_filename = str(rname.with_stem("{}_{:04d}".format(rname.stem, i_foc)))
|
||||||
|
|
||||||
print(log_ident, file=log_output, end="")
|
print(log_ident, file=log_output, end="")
|
||||||
print(
|
print(
|
||||||
|
|||||||
Reference in New Issue
Block a user