diff --git a/src/core/pyros_django/img_process/A_ImgProcessor.py b/src/core/pyros_django/img_process/A_ImgProcessor.py index 9c0d4bc..aeaab30 100755 --- a/src/core/pyros_django/img_process/A_ImgProcessor.py +++ b/src/core/pyros_django/img_process/A_ImgProcessor.py @@ -111,22 +111,23 @@ class A_ImgProcessor(Agent): # === Get all file contexts from the channel config self._fn = channel['fn_contexts'] + # === Get all file contexts from pyros config + self._fn = self.config.fn + log.info(f"=== List of file name contexts available for the unit") + self.check_contexts(False) + log.info(f"{self._fn.longitude=}") + # === Instanciate an object Ima to make image processing self._ima = guitastro.Ima() # === Set longitude to ima object to generate the night yyyymmdd and subdirectories yyyy/mm/dd - longitude = home.longitude - log.info(f"{longitude=}") - self._ima.longitude(longitude) + self._ima.longitude = self._fn.longitude # === Copy and update the channel file contexts into the Ima object self._ima.fcontext_replace(self._fn) log.info(f"=== List of file name contexts available for the channel {channel['name']} ({channel['symbol']})") for fcname in self._ima.fcontexts: self._ima.fcontext = fcname - if self.is_in_test_mode(): - self._ima.rootdir = os.path.abspath(self._ima.rootdir.replace("/PRODUCTS/","/PRODUCTS/TESTS/")) - os.makedirs(self._ima.rootdir, exist_ok=True) log.info(f"{fcname} : {self._ima.fdescription} {self._ima.rootdir}/[{self._ima.pathing()}]/[{self._ima.naming()}]{self._ima.extension}") # === Status of routine processing -- libgit2 0.21.2