From f7addf12c1bc8a09917a926bd099ba128aa71b36 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 18:21:21 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- romancal/associations/skycell_asn.py | 51 +++++++++++++++------------- romancal/lib/basic_utils.py | 21 +++++++----- 2 files changed, 40 insertions(+), 32 deletions(-) diff --git a/romancal/associations/skycell_asn.py b/romancal/associations/skycell_asn.py index 0fd3f1f15..12ea0c805 100644 --- a/romancal/associations/skycell_asn.py +++ b/romancal/associations/skycell_asn.py @@ -51,38 +51,43 @@ def skycell_asn(self): ("nx", int(pm.PATCH_TABLE[item]["nx"])), ("ny", int(pm.PATCH_TABLE[item]["ny"])), ("orient", float(pm.PATCH_TABLE[item]["orientat"])), - ("orientat_projection_center", float(pm.PATCH_TABLE[item]["orientat_projection_center"])), + ( + "orientat_projection_center", + float(pm.PATCH_TABLE[item]["orientat_projection_center"]), + ), ] ) parsed_visit_id = parse_visitID(member_list[0][1:20]) - program_id = parsed_visit_id['Program'] + program_id = parsed_visit_id["Program"] root_asn_name = self.parsed.output_file_root product_type = self.parsed.product_type product_release = self.parsed.release_product suffix = "coadd" sep = "_" - instrument = 'wfi' - if product_type == 'visit': - pr_name = ('v' + - parsed_visit_id['Execution'] + - parsed_visit_id['Pass'] + - parsed_visit_id['Segment'] + - parsed_visit_id['Observation']) - elif product_type == 'daily': - pr_name = ('d' + - parsed_visit_id['Execution'] + - parsed_visit_id['Pass'] + - parsed_visit_id['Segment']) - elif product_type == 'pass': - pr_name = ('p' + - parsed_visit_id['Execution'] + - parsed_visit_id['Pass']) - elif product_type == 'full': - pr_name = 'full' - elif product_type == 'user': - pr_name = 'user' + instrument = "wfi" + if product_type == "visit": + pr_name = ( + "v" + + parsed_visit_id["Execution"] + + parsed_visit_id["Pass"] + + parsed_visit_id["Segment"] + + parsed_visit_id["Observation"] + ) + elif product_type == "daily": + pr_name = ( + "d" + + parsed_visit_id["Execution"] + + parsed_visit_id["Pass"] + + parsed_visit_id["Segment"] + ) + elif product_type == "pass": + pr_name = "p" + parsed_visit_id["Execution"] + parsed_visit_id["Pass"] + elif product_type == "full": + pr_name = "full" + elif product_type == "user": + pr_name = "user" else: - pr_name = 'unknown' + pr_name = "unknown" asn_file_name = ( root_asn_name diff --git a/romancal/lib/basic_utils.py b/romancal/lib/basic_utils.py index 040507799..ee8dc8e41 100644 --- a/romancal/lib/basic_utils.py +++ b/romancal/lib/basic_utils.py @@ -121,8 +121,9 @@ def recarray_to_ndarray(x, to_dtype="