This commit is contained in:
2026-04-28 09:58:30 +03:00
parent 8a783405bb
commit 3ca66cd142

View File

@@ -20,9 +20,22 @@ import subprocess as sp
import numpy as np
import pathlib as pl
# --- FLI-hardware related (ROBOTEL variant)
# common "ccd_capture" executable commandline options
ccd_capture_cmd_common = [
"ccd_capture",
"-VVV",
"--plugin",
"libdevfli.so",
"-r",
"/tmp/10micron.fitsheader",
"-r",
"/tmp/telescope.fitsheader",
"-r",
"/tmp/dome.fitsheader",
]
def init_seq(seq_kwds):
# # replace extension since Eddy's 'fli_control' adds hardcoded '.fit'
@@ -40,8 +53,10 @@ def init_seq(seq_kwds):
#
foc_files = list(
# 27.04.2026
pt.absolute().parent.glob("{}_[0-9][0-9][0-9][0-9]{}".format(pt.stem, pt.suffix))
# 27.04.2026
pt.absolute().parent.glob(
"{}_[0-9][0-9][0-9][0-9]{}".format(pt.stem, pt.suffix)
)
# pt.absolute().parent.glob("{}_[0-9][0-9][0-9][0-9].fit".format(pt.stem))
)
@@ -67,8 +82,9 @@ def set_focus(foc_val):
# cmd = ["fli_control", "-g", str(int(foc_val))]
# 27.04.2026
cmd = ["ccd_capture", "-VVV", "--plugin", "libdevfli.so", "-r", "/tmp/10micron.fitsheader", "-r", "/tmp/telescope.fitsheader", "-r", "/tmp/dome.fitsheader", "-g", str(foc_val)]
# cmd = ["ccd_capture", "-VVV", "--plugin", "libdevfli.so", "-r", "/tmp/10micron.fitsheader", "-r", "/tmp/telescope.fitsheader", "-r", "/tmp/dome.fitsheader", "-g", str(foc_val)]
cmd = ccd_capture_cmd_common + ["-g", str(foc_val)]
ret = sp.run(cmd, stdout=sp.PIPE, stderr=sp.PIPE)
return ret.returncode
@@ -78,7 +94,6 @@ def get_image(filename, exp_time):
# Eddy's 'fli_control' related stub:
# filename is expected in form 'rootname_DDDD.ext'
# convert it to 'rootname'
# fname = str(filename).split("_")
# fname = fname[0]
@@ -93,8 +108,9 @@ def get_image(filename, exp_time):
# ]
# 27.04.2026
cmd = ["ccd_capture", "-VVV", "--plugin", "libdevfli.so", "-r", "/tmp/10micron.fitsheader", "-r", "/tmp/telescope.fitsheader", "-r", "/tmp/dome.fitsheader", "-x", str(exp_time), "-o", filename]
# cmd = ["ccd_capture", "-VVV", "--plugin", "libdevfli.so", "-r", "/tmp/10micron.fitsheader", "-r", "/tmp/telescope.fitsheader", "-r", "/tmp/dome.fitsheader", "-x", str(exp_time), "-o", filename]
cmd = ccd_capture_cmd_common + ["-x", str(exp_time), "-o", filename]
ret = sp.run(cmd, stdout=sp.PIPE, stderr=sp.PIPE)
return ret.returncode
@@ -102,7 +118,7 @@ def get_image(filename, exp_time):
if __name__ == "__main__":
parser = ap.ArgumentParser(
prog="{}".format(pl.Path(sys.argv[0]).name),
# 27.04.2026
# 27.04.2026
description="FLI CCD and focuser hardware: focussing sequence implementation. It is assumed that 'ccd_capture' software is installed in the OS.",
# description="FLI CCD and focuser hardware: focussing sequence implementation. It is assumed that 'fli_control' software is installed in the OS.",
)