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
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. |
|
|
|
Arguments: |
|
<<<<<<< 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='import_idi2ms.py', 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() |
|
|
|
|
|
subprocess.call(f"casa --nogui -c {pathlib.Path(__file__).parent.absolute()}/_import_idi2ms.py ", |
|
# subprocess.call(f"casa --nogui -c {pathlib.Path(__file__).parent.absolute()}/_import_idi2ms.py {args.msfile} {args.idifiles}", |
|
stdout=subprocess.PIPE, stderr=subprocess.STDOUT) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|