Skip to content

Commit f8e5fa9

Browse files
committed
raise error instead of using first l1a de
1 parent 4808e87 commit f8e5fa9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

imap_processing/ultra/l1b/ultra_l1b.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ def ultra_l1b(data_dict: dict, ancillary_files: dict) -> list[xr.Dataset]:
5050
if l1a_de_products:
5151
l1a_de_product = l1a_de_products[0]
5252
if len(l1a_de_products) > 1:
53-
logger.warning(
54-
f"Multiple L1a de products found when we only expect"
55-
f" one. Using the first one: {l1a_de_product}"
53+
raise ValueError(
54+
f"Multiple L1a de products found for instrument {instrument_id}. "
55+
f"Expected only one but found {len(l1a_de_products)}: "
56+
f"{l1a_de_products}"
5657
)
5758
l1b_de_product = l1a_de_product.replace("l1a", "l1b")
5859
de_dataset = calculate_de(

0 commit comments

Comments
 (0)