fixes: real sky tested

This commit is contained in:
2024-10-11 21:48:45 +03:00
parent b7750ee029
commit ce817b64a1
3 changed files with 16 additions and 6 deletions

View File

@@ -125,6 +125,10 @@ def focussing_app(parser, init_seq_func, set_focus_func, get_image_func):
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(
[focus_start, focus_stop],
init_seq_func,
@@ -141,7 +145,7 @@ def focussing_app(parser, init_seq_func, set_focus_func, get_image_func):
return result["ret_code"]
# 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_stop = result["focus_value"] + r

View File

@@ -21,8 +21,8 @@ import pathlib as pl
def init_seq(seq_kwds):
# remove extension as Eddy's 'fli_control' add hardcoded '.fit'
pt = pl.Path(seq_kwds["root_filename"]).with_suffix("")
# replace extension as Eddy's 'fli_control' add hardcoded '.fit'
pt = pl.Path(seq_kwds["root_filename"]).with_suffix(".fit")
seq_kwds["root_filename"] = str(pt)
#
@@ -35,7 +35,13 @@ def init_seq(seq_kwds):
seq_kwds["start_idx"] = 1
N = len(foc_files)
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

View File

@@ -335,7 +335,7 @@ def focussingSequence(
ret_val["ret_code"] = -1
return ret_val
N = 7
N = 5
if len(focus_range) > 2:
if np.isclose(focus_range[2], 0):
@@ -421,7 +421,7 @@ def focussingSequence(
# filename = "{}_{:04d}{}".format(fname, i_foc, file_ext)
# 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(