Blame view

privatedev/plugin/agent/AgentImagesProcessor_tnc_up1.py 1.28 KB
001a62c9   Alexis Koralewski   Update tnc config...
1
2
3
4
5
6
7
8
9
#!/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
#
# ---------------------------------------------------

a5118f00   Alain Klotz   Nouvel agent.
10
11
import sys

febde77e   Alain Klotz   correction des pa...
12
13
14
15
import os
pwd = os.environ['PROJECT_ROOT_PATH']
if pwd not in sys.path:
    sys.path.append(pwd)
a5118f00   Alain Klotz   Nouvel agent.
16

027eaa78   Alexis Koralewski   Fixing AgentSST i...
17
from src.core.pyros_django.observation_manager.AgentImagesProcessor import AgentImagesProcessor
febde77e   Alain Klotz   correction des pa...
18
19
20
21
22
23
24
25
26
27
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)

a5118f00   Alain Klotz   Nouvel agent.
28
29
30
31
32
33
34
35
36
37
38
39
40
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
027eaa78   Alexis Koralewski   Fixing AgentSST i...
41
42
43
44
45

if __name__ == "__main__":

    agent = build_agent(AgentImagesProcessor_tnc_up1)
    agent.run()