Skip to content

Commit

Permalink
concatname bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jurjen93 committed Jul 18, 2024
1 parent f7d3e06 commit cc52b4c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ms_helpers/concat_with_dummies.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from glob import glob
import argparse
import os
from pprint import pprint


def get_largest_divider(inp, max=1000):
Expand Down Expand Up @@ -167,17 +168,20 @@ def make_parset(mss, concat_name, data_column, time_avg, freq_avg, time_res, fre
ms_dict = split_ms_phasedir(mss)
parsets = []

print(ms_dict)
pprint(ms_dict)

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]
parsetname = concatname.replace('.concat.ms', '.parset')

else:
concatname = concat_name
parsetname = concatname.replace('.concat.ms', '.parset')
parsetname = concatname.replace('.ms', '.parset')

txtname = parsetname.replace('.parset', '.txt')

if fill_freq_gaps(input=ms, make_dummies=True, output_name=txtname, only_basename=only_basename):
Expand Down

0 comments on commit cc52b4c

Please sign in to comment.