Skip to content

Commit

Permalink
Merge pull request #59 from jjtobin/cont.dat_update
Browse files Browse the repository at this point in the history
add support for new cont.dat format
  • Loading branch information
jjtobin authored Oct 24, 2024
2 parents 52709af + 927d599 commit 9333832
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion selfcal_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1397,7 +1397,14 @@ def parse_contdotdat(contdotdat_file,target):
continue
if desiredTarget==True:
if 'SpectralWindow' in line:
spw = int(line.split()[-1])
#code to adapt to new cont.dat format
splitline=line.split()
if len(splitline)==3:
spw = int(splitline[-2])
spwname=splitline[-1]
else:
spw = int(splitline[-1])
spwname=''
contdotdat[spw] = []
else:
contdotdat[spw] += [line.split()[0].split("G")[0].split("~")]
Expand Down

0 comments on commit 9333832

Please sign in to comment.