Skip to content

Commit

Permalink
forwidefield
Browse files Browse the repository at this point in the history
  • Loading branch information
jurjen93 committed Oct 24, 2024
1 parent 12ccb9d commit 15f6d4c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions subtract/subtract_with_wsclean.py
Original file line number Diff line number Diff line change
Expand Up @@ -958,15 +958,14 @@ def main():
concat=args.concat, applybeam=args.applybeam, speedup_facet_subtract=args.speedup_facet_subtract,
applycal_h5=applycalh5 if not args.scratch_toil else applycalh5.split('/')[-1], dirname=dirname)

if args.scratch_toil:
if args.scratch_toil and args.forwidefield:
# copy averaged MS back to output folder
for ms in msout: fast_copy(ms, f'{outpath}/{dirname.replace("Dir","facet_")}-{ms.split("/")[-1]}')
# clean up scratch directory (for big MS)
os.system(f'cp *.log {outpath} && rm -rf *.ms')
os.chdir(outpath)
print(f'DONE: See output --> {dirname.replace("Dir","facet_")}-*.ms')

else:
elif args.forwidefield:
for ms in msout: os.system(f"mv {ms} {dirname.replace("Dir","facet_")}-{ms.split("/")[-1]}")

elif args.scratch_toil:
Expand All @@ -976,7 +975,6 @@ def main():
os.chdir(outpath)
else:
for ms in subpred.mslist: os.system(f'mv {ms} subfov_{ms.split("/")[-1]}')
print(f"DONE: Output is SUBTRACT_DATA column in input MS")

if __name__ == "__main__":
main()

0 comments on commit 15f6d4c

Please sign in to comment.