Skip to content

Commit 558ea83

Browse files
authored
Cal filename fix (#456)
* L1 should not be file with range but CAL
1 parent 4d3d45a commit 558ea83

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

stixcore/io/product_processors/fits/processors.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -763,10 +763,8 @@ def generate_filename(cls, product, *, version=0, status="", header=True):
763763
f"{product.utc_timerange.center.strftime('%Y%m%dT000000')}-"
764764
+ f"{product.utc_timerange.center.strftime('%Y%m%dT235959')}"
765765
)
766-
elif (
767-
product.type not in ["sci", "flarelist"]
768-
or (product.name == "burst-aspect")
769-
or (product.type == "cal" and product.level == "CAL")
766+
elif (product.type not in ["sci", "flarelist"] or (product.name == "burst-aspect")) and not (
767+
product.type == "cal" and product.level == "CAL"
770768
):
771769
date_range = product.utc_timerange.center.strftime("%Y%m%d")
772770

stixcore/products/CAL/energy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,4 @@ def from_level1(cls, l1product, parent="", idlprocessor=None, ecc_manager=None):
411411
products.append(cal)
412412
# end of for each spectrum
413413

414-
if len(products) > 1:
415-
pass
416414
return products

0 commit comments

Comments
 (0)