Commit caf55b1afe77ebe6f0d6a24bc1db3848eaa75dda
1 parent
dc9d1ad0
Exists in
dev
Modif longitude
Showing
1 changed file
with
7 additions
and
6 deletions
Show diff stats
src/core/pyros_django/img_process/A_ImgProcessor.py
@@ -111,22 +111,23 @@ class A_ImgProcessor(Agent): | @@ -111,22 +111,23 @@ class A_ImgProcessor(Agent): | ||
111 | # === Get all file contexts from the channel config | 111 | # === Get all file contexts from the channel config |
112 | self._fn = channel['fn_contexts'] | 112 | self._fn = channel['fn_contexts'] |
113 | 113 | ||
114 | + # === Get all file contexts from pyros config | ||
115 | + self._fn = self.config.fn | ||
116 | + log.info(f"=== List of file name contexts available for the unit") | ||
117 | + self.check_contexts(False) | ||
118 | + log.info(f"{self._fn.longitude=}") | ||
119 | + | ||
114 | # === Instanciate an object Ima to make image processing | 120 | # === Instanciate an object Ima to make image processing |
115 | self._ima = guitastro.Ima() | 121 | self._ima = guitastro.Ima() |
116 | 122 | ||
117 | # === Set longitude to ima object to generate the night yyyymmdd and subdirectories yyyy/mm/dd | 123 | # === Set longitude to ima object to generate the night yyyymmdd and subdirectories yyyy/mm/dd |
118 | - longitude = home.longitude | ||
119 | - log.info(f"{longitude=}") | ||
120 | - self._ima.longitude(longitude) | 124 | + self._ima.longitude = self._fn.longitude |
121 | 125 | ||
122 | # === Copy and update the channel file contexts into the Ima object | 126 | # === Copy and update the channel file contexts into the Ima object |
123 | self._ima.fcontext_replace(self._fn) | 127 | self._ima.fcontext_replace(self._fn) |
124 | log.info(f"=== List of file name contexts available for the channel {channel['name']} ({channel['symbol']})") | 128 | log.info(f"=== List of file name contexts available for the channel {channel['name']} ({channel['symbol']})") |
125 | for fcname in self._ima.fcontexts: | 129 | for fcname in self._ima.fcontexts: |
126 | self._ima.fcontext = fcname | 130 | self._ima.fcontext = fcname |
127 | - if self.is_in_test_mode(): | ||
128 | - self._ima.rootdir = os.path.abspath(self._ima.rootdir.replace("/PRODUCTS/","/PRODUCTS/TESTS/")) | ||
129 | - os.makedirs(self._ima.rootdir, exist_ok=True) | ||
130 | log.info(f"{fcname} : {self._ima.fdescription} {self._ima.rootdir}/[{self._ima.pathing()}]/[{self._ima.naming()}]{self._ima.extension}") | 131 | log.info(f"{fcname} : {self._ima.fdescription} {self._ima.rootdir}/[{self._ima.pathing()}]/[{self._ima.naming()}]{self._ima.extension}") |
131 | 132 | ||
132 | # === Status of routine processing | 133 | # === Status of routine processing |