From dc1cfcfbc9c38de00ba47f85711a9b0178dc6075 Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Thu, 26 Oct 2023 13:49:07 -0400 Subject: [PATCH] Changed aperture name --- drizzlepac/haputils/processing_utils.py | 6 ++-- drizzlepac/haputils/product.py | 38 ++++++++++++------------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drizzlepac/haputils/processing_utils.py b/drizzlepac/haputils/processing_utils.py index 1b7cf6ecf..2c0f4aad4 100644 --- a/drizzlepac/haputils/processing_utils.py +++ b/drizzlepac/haputils/processing_utils.py @@ -171,9 +171,9 @@ def refine_product_headers(product, total_obj_list): phdu['filter'] = get_acs_filters(hdu, delimiter=';') # WFPC2 update aperture if in poller file - if (total_obj_list[0].aperture != 'empty_aperture') & (phdu['instrume'] =='WFPC2'): - log.info(f"Updating aperture header keyword from {phdu['aperture']} to {total_obj_list[0].aperture}") - phdu['aperture'] = total_obj_list[0].aperture + if (total_obj_list[0].aperture_from_poller != 'empty_aperture') & (phdu['instrume'] =='WFPC2'): + log.info(f"Updating aperture header keyword from {phdu['aperture']} to {total_obj_list[0].aperture_from_poller}") + phdu['aperture'] = total_obj_list[0].aperture_from_poller else: log.debug("Not updating aperture keyword.") diff --git a/drizzlepac/haputils/product.py b/drizzlepac/haputils/product.py index ba0e327f0..3dc4b6ba2 100755 --- a/drizzlepac/haputils/product.py +++ b/drizzlepac/haputils/product.py @@ -64,7 +64,7 @@ class HAPProduct: """ def __init__( - self, prop_id, obset_id, instrument, detector, aperture, filename, filetype, log_level + self, prop_id, obset_id, instrument, detector, aperture_from_poller, filename, filetype, log_level ): # set logging level to user-specified level log.setLevel(log_level) @@ -79,7 +79,7 @@ def __init__( self.obset_id = obset_id self.instrument = instrument self.detector = detector - self.aperture = aperture + self.aperture_from_poller = aperture_from_poller self.filetype = filetype self.rules_file = None self.basename = ( @@ -537,13 +537,13 @@ class TotalProduct(HAPProduct): """ def __init__( - self, prop_id, obset_id, instrument, detector, aperture, filename, filetype, log_level + self, prop_id, obset_id, instrument, detector, aperture_from_poller, filename, filetype, log_level ): super().__init__( - prop_id, obset_id, instrument, detector, aperture, filename, filetype, log_level + prop_id, obset_id, instrument, detector, aperture_from_poller, filename, filetype, log_level ) self.info = "_".join( - [prop_id, obset_id, instrument, detector, aperture, filename, filetype] + [prop_id, obset_id, instrument, detector, aperture_from_poller, filename, filetype] ) self.exposure_name = filename[0:6] @@ -703,18 +703,18 @@ def __init__( obset_id, instrument, detector, - aperture, + aperture_from_poller, filename, filters, filetype, log_level, ): super().__init__( - prop_id, obset_id, instrument, detector, aperture, filename, filetype, log_level + prop_id, obset_id, instrument, detector, aperture_from_poller, filename, filetype, log_level ) self.info = "_".join( - [prop_id, obset_id, instrument, detector, aperture, filename, filters, filetype] + [prop_id, obset_id, instrument, detector, aperture_from_poller, filename, filters, filetype] ) if filename[0:7].lower() != "metawcs": self.exposure_name = filename[0:6] @@ -851,18 +851,18 @@ def __init__( obset_id, instrument, detector, - aperture, + aperture_from_poller, filename, filters, filetype, log_level, ): super().__init__( - prop_id, obset_id, instrument, detector, aperture, filename, filetype, log_level + prop_id, obset_id, instrument, detector, aperture_from_poller, filename, filetype, log_level ) self.info = "_".join( - [prop_id, obset_id, instrument, detector, aperture, filename, filters, filetype] + [prop_id, obset_id, instrument, detector, aperture_from_poller, filename, filters, filetype] ) self.filters = filters self.full_filename = self.copy_exposure(filename) @@ -1017,18 +1017,18 @@ def __init__( obset_id, instrument, detector, - aperture, + aperture_from_poller, filename, filters, filetype, log_level, ): super().__init__( - prop_id, obset_id, instrument, detector, aperture, filename, filetype, log_level + prop_id, obset_id, instrument, detector, aperture_from_poller, filename, filetype, log_level ) self.info = "_".join( - [prop_id, obset_id, instrument, detector, aperture, filename, filters, filetype] + [prop_id, obset_id, instrument, detector, aperture_from_poller, filename, filters, filetype] ) self.filters = filters self.full_filename = self.copy_exposure(filename) @@ -1114,14 +1114,14 @@ def __init__( obset_id, instrument, detector, - aperture, + aperture_from_poller, filename, layer, filetype, log_level, ): super().__init__( - prop_id, obset_id, instrument, detector, aperture, filename, filetype, log_level + prop_id, obset_id, instrument, detector, aperture_from_poller, filename, filetype, log_level ) filter_str = layer[0] @@ -1350,14 +1350,14 @@ def __init__( obset_id, instrument, detector, - aperture, + aperture_from_poller, skycell_name, layer, filetype, log_level, ): super().__init__( - prop_id, obset_id, instrument, detector, aperture, skycell_name, filetype, log_level + prop_id, obset_id, instrument, detector, aperture_from_poller, skycell_name, filetype, log_level ) # May need to exclude 'filter' component from layer_str filter_str = layer[0] @@ -1375,7 +1375,7 @@ def __init__( layer_scale = layer[1] self.info = "_".join( - ["hst", skycell_name, instrument, detector, aperture, filter_str, layer_str] + ["hst", skycell_name, instrument, detector, aperture_from_poller, filter_str, layer_str] ) self.exposure_name = skycell_name self.cell_id = skycell_name.strip("skycell-")