Collection of scripts and small programs used by the EVN Support Scientists at JIVE during the regular data processing of EVN observations.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.3 KiB

#!/usr/bin/env python3
import sys
import argparse
import subprocess
import pathlib
usage = "%(prog)s [-h] <idifiles> <msfile>"
description = """Converts a set of FITS IDI files into a single MS file by using the 'importfitsidi()'
function from CASA, with the standard parameters expected for EVN data.
<<<<<<< HEAD
- idifiles : str
A single word referring to the FITS IDI files to be read (using wildcards). Must start/end with quotes.
>>>>>>> 81c1de29e2bf61290ed797878b6577bbd4a8e475
- msfile : str
Name of the MS file to be created.
- idifiles : str
FITS IDI files to be read (either a space-separated list or a single word using wildcards).
help_idifiles = "FITS IDI files to be read. Allows wildcards (then it nees to be passed with '..')."
parser = argparse.ArgumentParser(description=description, prog='', usage=usage)
parser.add_argument('msfile', type=str, help='Name of the MS file to be created.')
parser.add_argument('idifiles', type=str, help=help_idifiles)
args = parser.parse_args()"casa --nogui -c {pathlib.Path(__file__).parent.absolute()}/ ",
#"casa --nogui -c {pathlib.Path(__file__).parent.absolute()}/ {args.msfile} {args.idifiles}",
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)