Skip to content

Commit

Permalink
concat case
Browse files Browse the repository at this point in the history
  • Loading branch information
jurjen93 committed Oct 8, 2024
1 parent 266fc9c commit 1443ba2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ms_helpers/concat_with_dummies.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,16 @@ def make_parset(mss, concat_name, data_column, time_avg, freq_avg, time_res, fre
for dir, ms in ms_dict.items():

if concat_name is None:
concatname = ('_'.join([i for i in ms[0].split('_') if 'mhz' not in i.lower()]).
replace('mstargetphase','')+'.concat.ms').replace('..', '.').split('/')[-1]

# Special case
matchf = re.search(r'facet_\d{2}-', ms[0].split('/')[-1])
matchL = re.search(r'L\d{6}', ms[0].split('/')[-1])
if matchf is not None and matchL is not None:
concatname = matchf.group()+matchL.group()+'.ms'

else:
concatname = ('_'.join([i for i in ms[0].split('_') if 'mhz' not in i.lower()]).
replace('mstargetphase','')+'.concat.ms').replace('..', '.').split('/')[-1]
parsetname = case_insensitive_replace(concatname, '.concat.ms', '.parset')

else:
Expand Down

0 comments on commit 1443ba2

Please sign in to comment.