From d722ad0417d9c7d43b1b20602015ef7454ceaadd Mon Sep 17 00:00:00 2001 From: Alain Klotz Date: Mon, 22 May 2023 15:52:43 +0200 Subject: [PATCH] Draft of new yaml for fn_contexts. --- config/pyros/config_pyros.yml | 11 ----------- privatedev/config/tnc/observatory_tnc.yml | 55 +++++++++++++++++++++++++++++++++++-------------------- pyros.py | 2 +- src/core/pyros_django/observation_manager/AgentImagesProcessor.py | 17 +++++++++++++++-- 4 files changed, 51 insertions(+), 34 deletions(-) diff --git a/config/pyros/config_pyros.yml b/config/pyros/config_pyros.yml index 5f99e34..efabcde 100644 --- a/config/pyros/config_pyros.yml +++ b/config/pyros/config_pyros.yml @@ -4,17 +4,6 @@ general: color_theme: sienna nb_element_per_page: 20 fn_contexts: - pyros_img_L0: - root_dir: "data/images/" - description: "pyros_img_L0" - extension: ".fit" - naming: "PyROS.img.1" - pyros_img_L1: - root_dir: "data/images/" - description: "pyros_img_L1" - extension: ".fits" - pathnaming: "PyROS.img.1" - pyros_seq: root_dir: "data/sequence/" description: "pyros_seq" diff --git a/privatedev/config/tnc/observatory_tnc.yml b/privatedev/config/tnc/observatory_tnc.yml index 8b7d8fd..0d43786 100644 --- a/privatedev/config/tnc/observatory_tnc.yml +++ b/privatedev/config/tnc/observatory_tnc.yml @@ -234,29 +234,36 @@ OBSERVATORY: name: plc computer: MainComputer path: private/plugin/agent_devices + + + # ========== debut new + # ============================================ + # Agents of the channel up1 # ============================================ - - AGENT_DEVICE: - name: optic_up1 - computer: MainComputer - path: ~ - device: Takahashi_Epsilon_180ED_001 - is_real: False - AGENT_DEVICE: - name: focuser_up1 + name: AD_focuser_up1 computer: MainComputer path: private/plugin/agent_devices device: Optec_TFC19740_001 is_real: False - AGENT_DEVICE: - name: camera_up1 + name: AD_camera_up1 computer: MainComputer path: private/plugin/agent_devices device: FLI_Kepler4040_001 protocol: private/plugin/agent_devices/camera_protocol.py is_real: False + # SF11-IPC (for AKz) + - AGENT: + name: AgentImagesProcessor_up1_akz + computer: AKlotzPersoComputer + protocol: privatedev/plugin/agent/AgentImagesProcessor_tnc_up1.py + + # ========== fin new + # ============================================ - AGENT_DEVICE: name: optic_up2 @@ -353,12 +360,6 @@ OBSERVATORY: name: AgentImagesProcessor computer: MainComputer - # SF11-IPC (for AKz) - - AGENT: - name: AgentImagesProcessor_tnc_up1_akz - computer: AKlotzPersoComputer - protocol: privatedev/plugin/agent/AgentImagesProcessor_tnc_up1.py - - AGENT: name: AgentImagesProcessor_tnc_up1_ako @@ -494,15 +495,29 @@ OBSERVATORY: CHANNELS: + # ========== debut new - CHANNEL: name: OpticalChannel_up1 symbol: CH1 - COMPONENT_AGENTS: - - OpticImager: optic_up1 - - DetectorFocuser: focuser_up1 - - DetectorSensor: camera_up1 - - DetectorShutter: camera_up1 - - DetectorTimer: camera_up1 + AGENTS: + AD_camera_up1 + AD_focuser_up1 + A_AgentImagesProcessor_up1_akz + COMPONENTS: + Takahashi_Epsilon_180ED_001 + fn_contexts: + img_L0: + root_dir: "data/images/" + description: "pyros_img_L0" + extension: ".fit" + naming: "PyROS.img.1" + img_L1: + root_dir: "data/images/" + description: "pyros_img_L1" + extension: ".fits" + pathnaming: "PyROS.img.1" + + # ========== fin new - CHANNEL: name: OpticalChannel_up2 diff --git a/pyros.py b/pyros.py index 56db274..676aa8c 100755 --- a/pyros.py +++ b/pyros.py @@ -60,7 +60,7 @@ AGENTS = { "AgentM": "monitoring", "AgentSP": "scientific_programs", "AgentScheduler": "scheduler", - "agentImagesProcessor": "observation_manager", + "AgentImagesProcessor": "observation_manager", "AgentImagesCalibrator": "observation_manager", "agentSST": "agent", "Agent": "agent", diff --git a/src/core/pyros_django/observation_manager/AgentImagesProcessor.py b/src/core/pyros_django/observation_manager/AgentImagesProcessor.py index e933898..38ed183 100755 --- a/src/core/pyros_django/observation_manager/AgentImagesProcessor.py +++ b/src/core/pyros_django/observation_manager/AgentImagesProcessor.py @@ -1,8 +1,21 @@ #!/usr/bin/env python3 # # To launch this agent from the root of Pyros: -# cd /srv/develop/pyros -# .\PYROS -t start AgentImagesProcessor -o tnc -fg +# +# Linux console: +# cd /srv/develop/pyros/docker +# ./PYROS_DOCKER_START.sh +# +# Launch from Power Shell: +# To go from docker to Powershell: pyros_user@ORION:~/app$ exit (or Ctrl+d) +# Prompt is now PS ...> +# cd \srv\develop\pyros +# .\PYROS -t new-start -o tnc -fg -a AgentImagesProcessor_tmc_up1_akz +# +# Launch from docker: +# To go from Powershell to docker: PS ...> .\PYROS_DOCKER_SHELL +# Prompt is now pyros_user@ORION:~/app$ +# ./PYROS -t new-start -o tnc -fg -a AgentImagesProcessor_tmc_up1_akz # # --------------------------------------------------- -- libgit2 0.21.2