diff --git a/stixcore/io/product_processors/fits/processors.py b/stixcore/io/product_processors/fits/processors.py index 03dd8a5c..e8a1351a 100644 --- a/stixcore/io/product_processors/fits/processors.py +++ b/stixcore/io/product_processors/fits/processors.py @@ -763,10 +763,8 @@ def generate_filename(cls, product, *, version=0, status="", header=True): f"{product.utc_timerange.center.strftime('%Y%m%dT000000')}-" + f"{product.utc_timerange.center.strftime('%Y%m%dT235959')}" ) - elif ( - product.type not in ["sci", "flarelist"] - or (product.name == "burst-aspect") - or (product.type == "cal" and product.level == "CAL") + elif (product.type not in ["sci", "flarelist"] or (product.name == "burst-aspect")) and not ( + product.type == "cal" and product.level == "CAL" ): date_range = product.utc_timerange.center.strftime("%Y%m%d") diff --git a/stixcore/products/CAL/energy.py b/stixcore/products/CAL/energy.py index b8803ae3..e24a8b03 100644 --- a/stixcore/products/CAL/energy.py +++ b/stixcore/products/CAL/energy.py @@ -411,6 +411,4 @@ def from_level1(cls, l1product, parent="", idlprocessor=None, ecc_manager=None): products.append(cal) # end of for each spectrum - if len(products) > 1: - pass return products