diff --git a/imap_processing/swe/packet_definitions/swe_packet_definition.xml b/imap_processing/swe/packet_definitions/swe_packet_definition.xml
index 818c2f946..144dbc601 100644
--- a/imap_processing/swe/packet_definitions/swe_packet_definition.xml
+++ b/imap_processing/swe/packet_definitions/swe_packet_definition.xml
@@ -52,7 +52,6 @@
-
10080
@@ -61,7 +60,6 @@
-
@@ -69,7 +67,6 @@
-
@@ -77,7 +74,6 @@
-
@@ -85,7 +81,6 @@
-
@@ -93,7 +88,6 @@
-
@@ -101,7 +95,6 @@
-
@@ -114,7 +107,6 @@
-
@@ -169,7 +161,6 @@
-
@@ -177,7 +168,6 @@
-
@@ -185,7 +175,6 @@
-
@@ -193,7 +182,6 @@
-
@@ -201,7 +189,6 @@
-
@@ -209,7 +196,6 @@
-
@@ -235,7 +221,6 @@
-
@@ -258,7 +243,6 @@
-
@@ -268,7 +252,6 @@
-
@@ -276,7 +259,6 @@
-
@@ -300,7 +282,7 @@
CCSDS Packet Application Process ID
-
+
CCSDS Packet Grouping Flags (3=not part of group)
@@ -731,10 +713,9 @@
-
+
-
@@ -746,6 +727,7 @@
+
@@ -776,6 +758,7 @@
+
@@ -855,6 +838,7 @@
+
@@ -875,6 +859,7 @@
+
diff --git a/imap_processing/tests/__init__.py b/imap_processing/tests/__init__.py
new file mode 100644
index 000000000..e69de29bb
diff --git a/imap_processing/tests/test_decom.py b/imap_processing/tests/test_decom.py
new file mode 100644
index 000000000..f5edf1bde
--- /dev/null
+++ b/imap_processing/tests/test_decom.py
@@ -0,0 +1,64 @@
+"""Tests aspects of the decommutation process that is generic to all instruments"""
+
+import pytest
+
+from imap_processing import imap_module_directory
+
+# Scrape the repo for all packet definition XML files
+xtce_document_list = imap_module_directory.glob("*/packet_definitions/*.xml")
+
+
+@pytest.fixture(params=xtce_document_list, scope="session")
+def xtce_document(request):
+ if "idex" in str(request.param):
+ pytest.xfail(
+ "Packet Definition does not include properly formatted CCSDS Header"
+ )
+ else:
+ return request.param
+
+
+def test_ccsds_header(xtce_document):
+ """Test if the XTCE document contains the proper CCSDS header information"""
+
+ # Define what is expected in the XTCE document
+ header_keys = [
+ ("VERSION", "UINT3"),
+ ("TYPE", "UINT1"),
+ ("SEC_HDR_FLG", "UINT1"),
+ ("PKT_APID", "UINT11"),
+ ("SEQ_FLGS", "UINT2"),
+ ("SRC_SEQ_CTR", "UINT14"),
+ ("PKT_LEN", "UINT16"),
+ ]
+ header_entry_list = (
+ ""
+ ' '
+ ' '
+ ' '
+ ' '
+ ' '
+ ' '
+ ' '
+ ""
+ )
+
+ # Read in the XTCE document
+ with open(xtce_document) as f:
+ document = f.read()
+
+ # Check that each header key is defined as a Parameter
+ for key in header_keys:
+ assert (
+ f'
CCSDS Packet Application Process ID
-
+
CCSDS Packet Grouping Flags (3=not part of group)
@@ -358,14 +358,14 @@
+
-
-
+
diff --git a/imap_processing/ultra/packet_definitions/P_U45_IMAGE_RATES.xml b/imap_processing/ultra/packet_definitions/P_U45_IMAGE_RATES.xml
index 973b32d66..22301f2d4 100644
--- a/imap_processing/ultra/packet_definitions/P_U45_IMAGE_RATES.xml
+++ b/imap_processing/ultra/packet_definitions/P_U45_IMAGE_RATES.xml
@@ -162,7 +162,7 @@
CCSDS Packet Application Process ID
-
+
CCSDS Packet Grouping Flags (3=not part of group)
@@ -199,7 +199,7 @@
-
+
diff --git a/imap_processing/ultra/packet_definitions/P_U45_IMG_ENA_PHXTOF_HI_ANG.xml b/imap_processing/ultra/packet_definitions/P_U45_IMG_ENA_PHXTOF_HI_ANG.xml
index d2be42892..ad503510d 100644
--- a/imap_processing/ultra/packet_definitions/P_U45_IMG_ENA_PHXTOF_HI_ANG.xml
+++ b/imap_processing/ultra/packet_definitions/P_U45_IMG_ENA_PHXTOF_HI_ANG.xml
@@ -158,7 +158,7 @@
CCSDS Packet Application Process ID
-
+
CCSDS Packet Grouping Flags (3=not part of group)
@@ -183,7 +183,7 @@
-
+
diff --git a/imap_processing/ultra/packet_definitions/P_U45_IMG_RAW_EVENTS.xml b/imap_processing/ultra/packet_definitions/P_U45_IMG_RAW_EVENTS.xml
index 6444277ad..4d77802ea 100644
--- a/imap_processing/ultra/packet_definitions/P_U45_IMG_RAW_EVENTS.xml
+++ b/imap_processing/ultra/packet_definitions/P_U45_IMG_RAW_EVENTS.xml
@@ -158,7 +158,7 @@
CCSDS Packet Application Process ID
-
+
CCSDS Packet Grouping Flags (3=not part of group)
@@ -198,7 +198,7 @@
-
+