Skip to content
Snippets Groups Projects
Commit bb55000f authored by Vlad Kondratiev's avatar Vlad Kondratiev
Browse files

added --fe option to enable FE mode

parent 53d6e3e8
No related branches found
No related tags found
No related merge requests found
...@@ -87,6 +87,8 @@ the coordinates, or use --pointing option", action="store_true") ...@@ -87,6 +87,8 @@ the coordinates, or use --pointing option", action="store_true")
default="", type=str) default="", type=str)
parser.add_argument("--stationlist", help="Station to use [str, can be multiple, e.g. \"CS001,CS002,CS003\"]", parser.add_argument("--stationlist", help="Station to use [str, can be multiple, e.g. \"CS001,CS002,CS003\"]",
default="", type=str) default="", type=str)
parser.add_argument("--fe", help="Enable Fly's Eye mode for BF pipeline 0, this will also exclude coherent/incoherent beams from BF pipeline 0",
action="store_true")
parser.add_argument("--mode", help="Observing mode (I or IQUV or XXYY), only for BF pipeline 0 [str]", parser.add_argument("--mode", help="Observing mode (I or IQUV or XXYY), only for BF pipeline 0 [str]",
default="", type=str) default="", type=str)
parser.add_argument("--subband", help="Subbands to select, can be comma-separated, range is allowed with .. [str]", parser.add_argument("--subband", help="Subbands to select, can be comma-separated, range is allowed with .. [str]",
...@@ -214,6 +216,7 @@ the coordinates, or use --pointing option", action="store_true") ...@@ -214,6 +216,7 @@ the coordinates, or use --pointing option", action="store_true")
else: else:
subband_list = [int(config["subband"])] subband_list = [int(config["subband"])]
if args.fe: config["fe"] = True
if args.mode != "": config["mode"] = args.mode if args.mode != "": config["mode"] = args.mode
if args.antennafield != "": config["antennafield"] = args.antennafield if args.antennafield != "": config["antennafield"] = args.antennafield
if args.filter != "": config["filter"] = args.filter if args.filter != "": config["filter"] = args.filter
...@@ -381,6 +384,36 @@ the coordinates, or use --pointing option", action="store_true") ...@@ -381,6 +384,36 @@ the coordinates, or use --pointing option", action="store_true")
for ii in range(n_bf_pipelines): for ii in range(n_bf_pipelines):
spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][ii]['station_groups'] = station_groups spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][ii]['station_groups'] = station_groups
# Enabling FE for BF pipeline 0
if "fe" in config:
if "Observation" in spec_doc['tasks']:
# Fly's Eye
if "flys eye" in spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][0]:
spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][0]['flys eye']['enabled'] = True
else:
# these values can further be modified via config file or command-line options
spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][0]['flys eye'] = \
{ "enabled": True,
"settings": {
"stokes": "I",
"quantisation": {"bits": 8, "enabled": False, "scale_max": 5, "scale_min": -5},
"subbands_per_file": 488,
"channels_per_subband": 16,
"time_integration_factor": 6
}
}
# Coherent
if "coherent" in spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][0] and \
"SAPs" in spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][0]['coherent'] and \
len(spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][0]['coherent']['SAPs']) > 0:
spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][0]['coherent']['SAPs'] = []
# Incoherent
if "incoherent" in spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][0] and \
"SAPs" in spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][0]['incoherent'] and \
len(spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][0]['incoherent']['SAPs']) > 0:
spec_doc['tasks']['Observation']['specifications_doc']['beamformer']['pipelines'][0]['incoherent']['SAPs'] = []
# Mode - Stokes I / IQUV or XXYY # Mode - Stokes I / IQUV or XXYY
if "mode" in config and config["mode"] != "": if "mode" in config and config["mode"] != "":
if "Observation" in spec_doc['tasks']: if "Observation" in spec_doc['tasks']:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment