Commit 44b996a94ea7db8c63fe3de2c0212b93ce8f7117

Authored by Alain Klotz
1 parent 43905108
Exists in dev

Bug fix ImgProcessing

Showing 1 changed file with 7 additions and 12 deletions   Show diff stats
src/core/pyros_django/img_process/A_ImgProcessor.py
... ... @@ -379,13 +379,6 @@ class A_ImgProcessor(Agent):
379 379 log.info("\n" + "-"*60 + f"\n--- Flat correction\n" + "-"*60 + "\n")
380 380 self.flat_correction()
381 381  
382   - # - Save the L1a file name
383   - self._ima.fcontext = "img_L1a"
384   - param_img['ftype'] = 'L1A'
385   - fname = self._ima.naming_set(param_img)
386   - fname = self._ima.join(fname)
387   - self._ima.save(fname)
388   -
389 382 # - Inversion of mirrors or mirorxy
390 383 log.info("\n" + "-"*60 + f"\n--- Mirror correction\n" + "-"*60 + "\n")
391 384 self.inversion_correction()
... ... @@ -394,9 +387,9 @@ class A_ImgProcessor(Agent):
394 387 log.info("\n" + "-"*60 + f"\n--- Cosmetic correction\n" + "-"*60 + "\n")
395 388 self.cosmetic_correction()
396 389  
397   - # - Save the L1b file name
398   - self._ima.fcontext = "img_L1b"
399   - param_img['ftype'] = 'L1B'
  390 + # - Save the L1a file name
  391 + self._ima.fcontext = "img_L1a"
  392 + param_img['ftype'] = 'L1A'
400 393 fname = self._ima.naming_set(param_img)
401 394 fname = self._ima.join(fname)
402 395 self._ima.save(fname)
... ... @@ -406,12 +399,14 @@ class A_ImgProcessor(Agent):
406 399 nmatched = self.wcs_calibration()
407 400  
408 401 # - Save the L1a file name
409   - self._ima.fcontext = "img_L1c"
410   - param_img['ftype'] = 'L1C'
  402 + self._ima.fcontext = "img_L1b"
  403 + param_img['ftype'] = 'L1B'
411 404 fname = self._ima.naming_set(param_img)
412 405 fname = self._ima.join(fname)
413 406 self._ima.save(fname)
414 407  
  408 + # - TODO Resampling (img_L1c)
  409 +
415 410 # - Delete the file in incoming directory
416 411 os.remove(fitsfile)
417 412 log.info(f"Delete the raw image {fitsfile}")
... ...