Skip to content

Commit

Permalink
rcal-949 Update with PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ddavis-stsci committed Nov 14, 2024
1 parent 04de8c5 commit 49104fc
Showing 1 changed file with 10 additions and 21 deletions.
31 changes: 10 additions & 21 deletions romancal/associations/skycell_asn.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,27 +61,16 @@ def skycell_asn(self):
product_release = self.parsed.release_product
suffix = "coadd"
sep = "_"
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'

product_name_mapping = {
"visit": "v" + parsed_visit_id['Execution'] + parsed_visit_id['Pass'] + parsed_visit_id['Segment'] + parsed_visit_id['Observation'],
"daily": "d" + parsed_visit_id['Execution'] + parsed_visit_id['Pass'] + parsed_visit_id['Segment'],
"pass": "p" + parsed_visit_id['Execution'] + parsed_visit_id['Pass'],
"full": "full",
"user": "user"
}

pr_name = product_name_mapping.get(product_type, "unknown")

asn_file_name = (
root_asn_name
Expand Down

0 comments on commit 49104fc

Please sign in to comment.