Skip to content

Commit

Permalink
fix for ANC also get fits updated headers while publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
nicHoch committed Oct 11, 2024
1 parent 11ebb6a commit a658b35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions stixcore/processing/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
----------
Expand All @@ -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)
Expand All @@ -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}")

Expand Down Expand Up @@ -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
----------
Expand Down

0 comments on commit a658b35

Please sign in to comment.