AgentImagesProcessor_tnc_up1.py
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env python3
#
# To launch this agent from the root of Pyros:
# verify this agent is associated to the computer in the obs config at UNITS/UNIT/AGENTS/AGENT/computer: AKlotzPersoComputer
# cd /srv/develop/pyros
# .\PYROS -t new-start -o tnc -fg (-cp ORION si pas PC ORION)
#
# ---------------------------------------------------
import sys
import os
pwd = os.environ['PROJECT_ROOT_PATH']
if pwd not in sys.path:
sys.path.append(pwd)
from src.core.pyros_django.observation_manager.AgentImagesProcessor import AgentImagesProcessor
from src.core.pyros_django.agent.Agent import Agent, build_agent, log
# = Specials
import glob
import shutil
import guitastro
path = os.path.join(pwd, "vendor/guitastro")
if path not in sys.path:
sys.path.append(path)
class AgentImagesProcessor_tnc_up1(AgentImagesProcessor):
def bias_correction(self):
# - Search the bias
log.info("TOTO")
path_bias = os.path.join( self._paths['ima_bias'], self._date_night )
fitsbiasfiles = glob.glob(f"{path_bias}/*.fit")
log.info(f"fitsbiasfiles = {fitsbiasfiles}")
if len(fitsbiasfiles) > 0:
# - Select the bias
pass
if __name__ == "__main__":
agent = build_agent(AgentImagesProcessor_tnc_up1)
agent.run()