From a7e1c593d3898f98c16597491db9d4d8a7ebdc4a Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Thu, 8 Sep 2022 15:58:14 -0400 Subject: [PATCH 1/2] fix in maude_decom.get_aca_packets from blobs: use image function from PEA, not OBC --- chandra_aca/maude_decom.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/chandra_aca/maude_decom.py b/chandra_aca/maude_decom.py index c069d4a..4fb5ecb 100644 --- a/chandra_aca/maude_decom.py +++ b/chandra_aca/maude_decom.py @@ -192,9 +192,10 @@ def _aca_image_msid_list(pea): 'image_status': [f'AOIMAGE{i}' for i in range(8)], # IMAGE STATUS FLAG 'fiducial_flag': [f'AOACFID{i}' for i in range(8)], # FIDUCIAL LIGHT FLAG (OBC) - 'image_function': [f'AOACFCT{i}' for i in range(8)], # IMAGE FUNCTION (OBC) + 'image_function_obc': [f'AOACFCT{i}' for i in range(8)], # IMAGE FUNCTION (OBC) + 'image_function': [f'{msid_prefix}AIMGF{i}1' for i in range(8)], # IMAGE FUNCTION (PEA) # this one exists also as FUNCTION2/3/4 - # 'image_function_pea': + # 'image_function': # [f'{msid_prefix}AIMGF{i}1' for i in range(8)], # IMAGE FUNCTION1 (PEA) 'saturated_pixel': [f'{msid_prefix}ASPXF{i}' for i in range(8)], # DEFECTIVE PIXEL FLAG From 230752867ecee647f69db1c555f25bd3938005df Mon Sep 17 00:00:00 2001 From: Javier Gonzalez Date: Wed, 14 Sep 2022 08:56:27 -0400 Subject: [PATCH 2/2] add unit test to show disagreement between blobs and frames in terms of IMGFUNC --- chandra_aca/tests/test_maude_decom.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chandra_aca/tests/test_maude_decom.py b/chandra_aca/tests/test_maude_decom.py index 8a6af94..835332a 100755 --- a/chandra_aca/tests/test_maude_decom.py +++ b/chandra_aca/tests/test_maude_decom.py @@ -495,6 +495,12 @@ def test_blob_frame_consistency(): slot_data = slot_data[slot_data['IMGNUM'] == slot] slot_data_2 = slot_data_2[slot_data_2['IMGNUM'] == slot] assert len(slot_data) == len(slot_data_2) + compare_tables(slot_data, slot_data_2, exclude=['COMMPROG_REPEAT']) + + start, stop = 686105735.6057751, 686105740.7507753 + slot_data = maude_decom.get_aca_packets(start, stop, blobs=False) + slot_data_blobs = maude_decom.get_aca_packets(start, stop, blobs=True) + compare_tables(slot_data, slot_data_blobs, exclude=['COMMPROG_REPEAT']) def test_get_aca_packets_blobs():