From 544d7f603aa93ba150ab824818f729088035957f Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Tue, 22 Oct 2024 15:48:31 -0400 Subject: [PATCH 01/15] initial commit. Changed name of another variable (is_zero) to avoid confusion. --- drizzlepac/haputils/analyze.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index 8751f2f9b..7a8ce258c 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -16,7 +16,7 @@ from enum import Enum from astropy.io import fits -from astropy.io.fits import getheader +from astropy.io.fits import getheader, getdata from astropy.table import Table from astropy.stats import sigma_clipped_stats import numpy as np @@ -364,6 +364,8 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): for i, input_file in enumerate(input_file_list): header_hdu = 0 header_data = getheader(input_file, header_hdu) + science_hdu = 1 + science_data = getdata(input_file, science_hdu) # Keywords to use potentially for downstream analysis instrume = (header_data['INSTRUME']).upper() @@ -424,14 +426,18 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # Determine if the image has one of these conditions. The routine # will exit processing upon the first satisfied condition. + + # Science image array is filled with zero values + science_array_of_zeros = True if np.all(science_data==0) else False # Compute if the exposure time is very close to zero as it will be # needed when deciding whether or not to use the particular Grism/Prism data - is_zero = True if math.isclose(exptime, 0.0, abs_tol=1e-5) else False + exposure_time_near_zero = True if math.isclose(exptime, 0.0, abs_tol=1e-5) else False no_proc_key = None no_proc_value = None do_process = True + # Imaging vs spectroscopic or coronagraphic if obstype != 'IMAGING': no_proc_key = hdr_keys['OBSKEY'] @@ -494,7 +500,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): split_sfilter = sfilter.upper().split('_') for item in split_sfilter: # This is the only circumstance when Grism/Prism data WILL be processed. - if item.startswith(('G', 'PR')) and not is_zero and type.upper() == "SVM": + if item.startswith(('G', 'PR')) and not exposure_time_near_zero and type.upper() == "SVM": no_proc_key = None no_proc_value = None log.info("The Grism/Prism data, {}, will be processed.".format(input_file)) @@ -503,7 +509,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): if type.upper() == "MVM": no_proc_value += ", Grism/Prism data and MVM processing" log.warning("The Grism/Prism data {} with MVM processing will be ignored.".format(input_file)) - elif is_zero: + elif exposure_time_near_zero: no_proc_value += ", Grism/Prism data and EXPTIME = 0.0" log.warning("The Grism/Prism data {} with zero exposure time will be ignored.".format(input_file)) @@ -533,6 +539,10 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # GYROS mode so some drift) generate_msg(input_file, msg_type, no_proc_key, no_proc_value) + elif science_array_of_zeros: + do_process=False + log.warning(f'Science data for {input_file} filled with zeros, not aligning.') + else: analyze_data_good_index.append(i) From 8371898b9c55a18dfea9c62f16027ba75f2a5428 Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Wed, 23 Oct 2024 14:49:09 -0400 Subject: [PATCH 02/15] added changelog entry. --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7c7c57f80..21e8012dd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -21,6 +21,8 @@ number of the code change for that issue. These PRs can be viewed at: 3.7.2 (unreleased) ================== +- Ensure that exposures with science data of all zeros is not processed. [#998] + - Modifications to support an upgrade to Photutils v1.13.0. Changes were made to accommodate new APIs, modified low-level functionality, and address columns of a table in get_cutouts() by name rather than position to ensure the correct From b84b29f1cce943d9d079aa70c63e0166df9226e4 Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 12:50:28 -0400 Subject: [PATCH 03/15] ammeded count_sci_extension for analyze.py --- drizzlepac/haputils/analyze.py | 21 +++++++++++++++------ drizzlepac/util.py | 12 +++++++++--- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index 7a8ce258c..6e6d84fa2 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -31,6 +31,7 @@ from stsci.tools.bitmask import bitfield_to_boolean_mask from .astrometric_utils import classify_sources +from ..util import count_sci_extensions __taskname__ = 'analyze' @@ -364,8 +365,6 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): for i, input_file in enumerate(input_file_list): header_hdu = 0 header_data = getheader(input_file, header_hdu) - science_hdu = 1 - science_data = getdata(input_file, science_hdu) # Keywords to use potentially for downstream analysis instrume = (header_data['INSTRUME']).upper() @@ -427,8 +426,18 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # Determine if the image has one of these conditions. The routine # will exit processing upon the first satisfied condition. - # Science image array is filled with zero values - science_array_of_zeros = True if np.all(science_data==0) else False + # Check if all science image arrays are filled with zero values + non_zero_data_in_array = False # start assuming data is zeros + science_ext_ind_array = count_sci_extensions(input_file_list, return_ind=True) + # make sure science extesion exists + if len(science_ext_ind_array)>0: + for sci_ext_ind in science_ext_ind_array: + science_data = getdata(input_file, sci_ext_ind) + # change flag if good data in any science array + if np.all(science_data==0): + non_zero_data_in_array = True + else: + raise ValueError(f'No science extension in file: {input_file}') # Compute if the exposure time is very close to zero as it will be # needed when deciding whether or not to use the particular Grism/Prism data @@ -539,9 +548,9 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # GYROS mode so some drift) generate_msg(input_file, msg_type, no_proc_key, no_proc_value) - elif science_array_of_zeros: + elif non_zero_data_in_array==False: do_process=False - log.warning(f'Science data for {input_file} filled with zeros, not aligning.') + log.warning(f'Science data for {input_file} filled with zeros. Dataset cannot be aligned.') else: analyze_data_good_index.append(i) diff --git a/drizzlepac/util.py b/drizzlepac/util.py index f62b6e182..53db89735 100644 --- a/drizzlepac/util.py +++ b/drizzlepac/util.py @@ -436,17 +436,19 @@ def updateNEXTENDKw(fobj): if 'nextend' in fobj[0].header: fobj[0].header['nextend'] = len(fobj) - 1 -def count_sci_extensions(filename): +def count_sci_extensions(filename, return_ind=False): """ Return the number of SCI extensions and the EXTNAME from a input MEF file. """ num_sci = 0 + index=[] extname = 'SCI' hdu_list = fileutil.openImage(filename, memmap=False) - for extn in hdu_list: + for i, extn in enumerate(hdu_list): if 'extname' in extn.header and extn.header['extname'] == extname: num_sci += 1 + index.append(i) if num_sci == 0: extname = 'PRIMARY' @@ -454,7 +456,11 @@ def count_sci_extensions(filename): hdu_list.close() - return num_sci, extname + if return_ind: + return index + + else: + return num_sci, extname def verifyUniqueWcsname(fname, wcsname, include_primary=True): From d701a7583330d56ae3f63bbebfad13071f59809c Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:51:12 -0400 Subject: [PATCH 04/15] added warning message. --- drizzlepac/haputils/analyze.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index 6e6d84fa2..9f72d0396 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -436,6 +436,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # change flag if good data in any science array if np.all(science_data==0): non_zero_data_in_array = True + log.warning(f'Warning, (SCI, {sci_ext_ind}) is all zeros, but processing will continue') else: raise ValueError(f'No science extension in file: {input_file}') @@ -533,6 +534,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # If no_proc_key is set to a keyword, then this image has been found to not be viable for # alignment purposes. + import ipdb; ipdb.set_trace() if no_proc_key is not None: if no_proc_key != hdr_keys['FGSKEY']: do_process = False @@ -547,7 +549,6 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # processing should be allowed, but there may be some issue with the result (e.g., # GYROS mode so some drift) generate_msg(input_file, msg_type, no_proc_key, no_proc_value) - elif non_zero_data_in_array==False: do_process=False log.warning(f'Science data for {input_file} filled with zeros. Dataset cannot be aligned.') From a30afff7a7d268a74738cb76b0e0b352f9b774c0 Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:16:42 -0400 Subject: [PATCH 05/15] fixed bug, better warning message with filename. --- drizzlepac/haputils/analyze.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index 9f72d0396..9a1a35ef0 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -428,7 +428,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # Check if all science image arrays are filled with zero values non_zero_data_in_array = False # start assuming data is zeros - science_ext_ind_array = count_sci_extensions(input_file_list, return_ind=True) + science_ext_ind_array = count_sci_extensions(input_file, return_ind=True) # make sure science extesion exists if len(science_ext_ind_array)>0: for sci_ext_ind in science_ext_ind_array: @@ -436,7 +436,8 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # change flag if good data in any science array if np.all(science_data==0): non_zero_data_in_array = True - log.warning(f'Warning, (SCI, {sci_ext_ind}) is all zeros, but processing will continue') + log.warning(f'{input_file} (SCI, {sci_ext_ind}) is all zeros, + but processing will continue with the other science extensions.') else: raise ValueError(f'No science extension in file: {input_file}') @@ -534,7 +535,6 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # If no_proc_key is set to a keyword, then this image has been found to not be viable for # alignment purposes. - import ipdb; ipdb.set_trace() if no_proc_key is not None: if no_proc_key != hdr_keys['FGSKEY']: do_process = False From 481e40eae08d7c916d719473ece04ce9a03b9e22 Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:22:09 -0400 Subject: [PATCH 06/15] linting issue. --- drizzlepac/haputils/analyze.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index 9a1a35ef0..85e0f06d0 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -86,7 +86,7 @@ MIN_LINES = 4 # Minimum number of detected lines for consideration of bad guiding -# Return codes +# Return codes class Ret_code(Enum): """ Define return status codes for Operations @@ -305,7 +305,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): log.setLevel(log_level) analyze_data_good_index = [] - + acs_filt_name_list = [DEFAULT_KEYS['FILKEY1'], DEFAULT_KEYS['FILKEY2']] # Interpret input filenames and adjust size of column accordingly @@ -425,7 +425,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # Determine if the image has one of these conditions. The routine # will exit processing upon the first satisfied condition. - + # Check if all science image arrays are filled with zero values non_zero_data_in_array = False # start assuming data is zeros science_ext_ind_array = count_sci_extensions(input_file, return_ind=True) @@ -436,8 +436,9 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # change flag if good data in any science array if np.all(science_data==0): non_zero_data_in_array = True - log.warning(f'{input_file} (SCI, {sci_ext_ind}) is all zeros, - but processing will continue with the other science extensions.') + log.warning( + f"{input_file} (SCI, {sci_ext_ind}) is all zeros, but processing will continue with the other science extensions." + ) else: raise ValueError(f'No science extension in file: {input_file}') @@ -448,7 +449,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): no_proc_key = None no_proc_value = None do_process = True - + # Imaging vs spectroscopic or coronagraphic if obstype != 'IMAGING': no_proc_key = hdr_keys['OBSKEY'] @@ -523,7 +524,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): elif exposure_time_near_zero: no_proc_value += ", Grism/Prism data and EXPTIME = 0.0" log.warning("The Grism/Prism data {} with zero exposure time will be ignored.".format(input_file)) - + if item.startswith(('BLOCK')): no_proc_key = hdr_keys['FILKEY'] no_proc_value = sfilter @@ -552,7 +553,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): elif non_zero_data_in_array==False: do_process=False log.warning(f'Science data for {input_file} filled with zeros. Dataset cannot be aligned.') - + else: analyze_data_good_index.append(i) From 93953fbe2d9e3528f108b0c2f260624ecb8659aa Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:01:56 -0400 Subject: [PATCH 07/15] fixed flag. error changed to warning. --- drizzlepac/haputils/analyze.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index 85e0f06d0..8c7bc762a 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -432,15 +432,16 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # make sure science extesion exists if len(science_ext_ind_array)>0: for sci_ext_ind in science_ext_ind_array: + import ipdb; ipdb.set_trace() science_data = getdata(input_file, sci_ext_ind) - # change flag if good data in any science array - if np.all(science_data==0): + # change flag if good data in any science extensnion array + if np.logical_not(np.all(science_data==0)): non_zero_data_in_array = True log.warning( f"{input_file} (SCI, {sci_ext_ind}) is all zeros, but processing will continue with the other science extensions." ) else: - raise ValueError(f'No science extension in file: {input_file}') + log.warning(f'No science extension in file: {input_file}') # Compute if the exposure time is very close to zero as it will be # needed when deciding whether or not to use the particular Grism/Prism data From 516c3bc4cd3f209f9fb077f2b70f14009f708835 Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:03:02 -0400 Subject: [PATCH 08/15] remove set_trace. --- drizzlepac/haputils/analyze.py | 1 - 1 file changed, 1 deletion(-) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index 8c7bc762a..35964c064 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -432,7 +432,6 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # make sure science extesion exists if len(science_ext_ind_array)>0: for sci_ext_ind in science_ext_ind_array: - import ipdb; ipdb.set_trace() science_data = getdata(input_file, sci_ext_ind) # change flag if good data in any science extensnion array if np.logical_not(np.all(science_data==0)): From 04878ca399a0dd9d60b1434968e138142679671f Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:50:50 -0400 Subject: [PATCH 09/15] documentation for ammendment to count_sci_extensions function. --- drizzlepac/util.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drizzlepac/util.py b/drizzlepac/util.py index 53db89735..6e93a8eec 100644 --- a/drizzlepac/util.py +++ b/drizzlepac/util.py @@ -438,7 +438,21 @@ def updateNEXTENDKw(fobj): def count_sci_extensions(filename, return_ind=False): """ Return the number of SCI extensions and the EXTNAME from a input MEF file. - """ + + Parameters + ---------- + filename : str + Filename of the file you would like to count the extensions of. + return_ind : bool, optional + Whether to return a list of the indices of the true "SCI" science extensions, + by default False. + + Returns + ------- + _type_ + _description_ + """ + num_sci = 0 index=[] extname = 'SCI' From fe2bd19422ea063776a47571933a15e7f1fe3af3 Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:53:06 -0400 Subject: [PATCH 10/15] comments for returns of count_sci_extensions. --- drizzlepac/util.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drizzlepac/util.py b/drizzlepac/util.py index 6e93a8eec..abdeaadb1 100644 --- a/drizzlepac/util.py +++ b/drizzlepac/util.py @@ -449,8 +449,13 @@ def count_sci_extensions(filename, return_ind=False): Returns ------- - _type_ - _description_ + tuple + Science extension and number of extensions. + + or (if return_ind=True) + + list + indices of the "SCI" science extensions. """ num_sci = 0 From d252a329e1e4f1551ee9c15ebcdd1de29319ba3a Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:59:20 -0400 Subject: [PATCH 11/15] RAW file comment. --- drizzlepac/haputils/analyze.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index 35964c064..7d1bda9be 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -426,7 +426,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # Determine if the image has one of these conditions. The routine # will exit processing upon the first satisfied condition. - # Check if all science image arrays are filled with zero values + # Check if all science image arrays in the RAW file are filled with zero values non_zero_data_in_array = False # start assuming data is zeros science_ext_ind_array = count_sci_extensions(input_file, return_ind=True) # make sure science extesion exists From a1e466aa3a443c8595f41678d9d680bce0849aa2 Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:01:48 -0400 Subject: [PATCH 12/15] np.logical not --> not, spelling mistake. --- drizzlepac/haputils/analyze.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index 7d1bda9be..29a743ee2 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -429,12 +429,12 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # Check if all science image arrays in the RAW file are filled with zero values non_zero_data_in_array = False # start assuming data is zeros science_ext_ind_array = count_sci_extensions(input_file, return_ind=True) - # make sure science extesion exists + # make sure science extension exists if len(science_ext_ind_array)>0: for sci_ext_ind in science_ext_ind_array: science_data = getdata(input_file, sci_ext_ind) # change flag if good data in any science extensnion array - if np.logical_not(np.all(science_data==0)): + if not np.all(science_data==0): non_zero_data_in_array = True log.warning( f"{input_file} (SCI, {sci_ext_ind}) is all zeros, but processing will continue with the other science extensions." From fba40a116a87bbf9e4bbca8dd5e9554b1a68fe34 Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:13:10 -0400 Subject: [PATCH 13/15] warning in correct bool. --- drizzlepac/haputils/analyze.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index 29a743ee2..fab0047bb 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -436,9 +436,11 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): # change flag if good data in any science extensnion array if not np.all(science_data==0): non_zero_data_in_array = True + else: log.warning( f"{input_file} (SCI, {sci_ext_ind}) is all zeros, but processing will continue with the other science extensions." ) + else: log.warning(f'No science extension in file: {input_file}') From fce11ebbdb0f217a27e4f0ff703d8239c88e987f Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:25:30 -0400 Subject: [PATCH 14/15] spelling mistake. --- drizzlepac/haputils/analyze.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index fab0047bb..9bdd81f6b 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -433,7 +433,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): if len(science_ext_ind_array)>0: for sci_ext_ind in science_ext_ind_array: science_data = getdata(input_file, sci_ext_ind) - # change flag if good data in any science extensnion array + # change flag if good data in any science extension array if not np.all(science_data==0): non_zero_data_in_array = True else: From 98bbb9d2cd3e687308199ad8ff78aa9caffffe57 Mon Sep 17 00:00:00 2001 From: Steve Goldman <32876747+s-goldman@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:28:05 -0400 Subject: [PATCH 15/15] added process_msg. --- drizzlepac/haputils/analyze.py | 1 + 1 file changed, 1 insertion(+) diff --git a/drizzlepac/haputils/analyze.py b/drizzlepac/haputils/analyze.py index 9bdd81f6b..7b206dd36 100644 --- a/drizzlepac/haputils/analyze.py +++ b/drizzlepac/haputils/analyze.py @@ -554,6 +554,7 @@ def analyze_data(input_file_list, log_level=logutil.logging.DEBUG, type=""): generate_msg(input_file, msg_type, no_proc_key, no_proc_value) elif non_zero_data_in_array==False: do_process=False + process_msg="SCI data all zeros" log.warning(f'Science data for {input_file} filled with zeros. Dataset cannot be aligned.') else: