From a658b352604a9c453e7eb4f674410d0f434c7c2d Mon Sep 17 00:00:00 2001 From: Nicky Hochmuth Date: Thu, 10 Oct 2024 16:41:20 +0200 Subject: [PATCH] fix for ANC also get fits updated headers while publishing --- stixcore/processing/publish.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stixcore/processing/publish.py b/stixcore/processing/publish.py index 9b6ac5ff..21bfa816 100644 --- a/stixcore/processing/publish.py +++ b/stixcore/processing/publish.py @@ -358,7 +358,7 @@ def send_mail_report(files): def update_ephemeris_headers(fits_file, spice): - """Updates all SPICE related data in FITS header. + """Updates all SPICE related data in FITS header and data table. Parameters ---------- @@ -368,7 +368,7 @@ def update_ephemeris_headers(fits_file, spice): Spice kernel manager with loaded spice kernels. """ product = Product(fits_file) - if product.level in ['L1', 'L2']: + if product.level in ['L1', 'L2', 'ANC']: ephemeris_headers = \ spice.get_fits_headers(start_time=product.utc_timerange.start, average_time=product.utc_timerange.center) @@ -379,7 +379,7 @@ def update_ephemeris_headers(fits_file, spice): # rename the header filename to be complete hdu.header['FILENAME'] = get_complete_file_name(hdu.header['FILENAME']) hdu.header.update(ephemeris_headers) - # just update the first prima HDU + # just update the first primary HDU break logger.info(f"updated ephemeris headers of {fits_file}") @@ -430,7 +430,7 @@ def add_history(p, name): def copy_file(scp, p, target_dir, add_history_entry=True): - """Copies FITS file top the designated SOAR out directory. Will use remote copy if set up. + """Copies FITS file to the designated SOAR out directory. Will use remote copy if set up. Parameters ----------