-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCatalog_Gen_original.py
52 lines (39 loc) · 1.76 KB
/
Catalog_Gen_original.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from __future__ import absolute_import, division, print_function
import argparse
from SSINS import Catalog_Plot as cp
from SSINS import SS
import numpy as np
parser = argparse.ArgumentParser()
parser.add_argument('obs', action='store', help='How the observation will be referred to')
parser.add_argument('inpath', action='store', help='The path to the data file, and the file_type')
parser.add_argument('outpath', action='store', help='The base directory for saving all outputs')
args = parser.parse_args()
# Here is a dictionary for the RFI class keywords
data_kwargs = {'read_kwargs': {'file_type': 'miriad', 'ant_str': 'cross'},
'obs': args.obs,
'inpath': args.inpath,
'outpath': args.outpath}
# The type of catalog you would like made - options are 'INS', 'VDH', 'MF', and 'ES'
catalog_types = ['INS', 'VDH', 'MF']
catalog_data_kwargs = {'INS': {},
'VDH': {'fit_hist': True},
'MF': {'sig_thresh': 5,
'shape_dict': {'TV4': (1.74e8, 1.82e8),
'TV5': (1.82e8, 1.9e8),
'TV6': (1.9e8, 1.98e8),
'TV7': (1.98e8, 2.06e8)},
'tests': ['match']},
'ES': {}}
catalog_plot_kwargs = {'INS': {},
'VDH': {},
'MF': {},
'ES': {}}
sky_sub = SS(**data_kwargs)
"""
Do not edit things beneath this line!
"""
for cat in catalog_types:
getattr(sky_sub, '%s_prepare' % (cat))(**catalog_data_kwargs[cat])
getattr(cp, '%s_plot' % (cat))(getattr(sky_sub, cat), **catalog_plot_kwargs[cat])
sky_sub.save_data()
sky_sub.save_meta()