Commits

Ajay Vibhute authored 10cbebfe6cf Merge
Pull request #1395: PIPE-1033: Moved zero clipping commands before template

Merge in PIPE/pipeline from PIPE-1033-flagging-of-zeros-is-not-reported-correctly-in-vla-pipeline-weblog to main * commit 'ed7dcb79786cec26dd2cbf8a6382154c38e811dd': PIPE-1033: dummy commit PIPE-1033: updated 'clip' agent position PIPE-1033: Moved zero clipping commands before template

pipeline/hifv/tasks/flagging/flagdetervla.py

Modified
438 438 if flag_cmds:
439 439 if 'name' in summary_dict_cmds:
440 440 summary_dict['report1'] = summary_dict_cmds
441 441 summary_dict['report0'] = before_summary_dict
442 442 else:
443 443 summary_dict = summary_dict_cmds
444 444 summary_dict['before'] = before_summary_dict
445 445
446 446 agent_summaries = dict((v['name'], v) for v in summary_dict.values())
447 447
448 - ordered_agents = ['before', 'anos', 'online', 'shadow', 'intents', 'qa0', 'qa2', 'template', 'autocorr',
449 - 'edgespw', 'clip', 'quack',
448 + ordered_agents = ['before', 'clip', 'anos', 'online', 'shadow', 'intents', 'qa0', 'qa2', 'template', 'autocorr',
449 + 'edgespw', 'quack',
450 450 'baseband']
451 451
452 452 summary_reps = [agent_summaries[agent]
453 453 for agent in ordered_agents
454 454 if agent in agent_summaries]
455 455
456 456 # return the results object, which will be used for the weblog
457 457 return FlagDeterVLAResults(summary_reps, flag_cmds)
458 458
459 459 def _get_flag_commands(self):
460 460 """ Adding quack and clip
461 461 """
462 462 # flag_cmds = super(FlagDeterVLA, self)._get_flag_commands()
463 463
464 464 flag_cmds = []
465 465
466 466 inputs = self.inputs
467 467
468 + # PIPE-1033: Moving zero flagging before template.
469 + # Flag mode clip
470 + if inputs.clip:
471 + flag_cmds.append('mode=\'clip\' correlation=\'ABS_ALL\' clipzeros=True reason=\'clip\'')
472 + flag_cmds.append('mode=\'summary\' name=\'clip\'')
468 473 # flag anos?
469 474 if inputs.online:
470 475 if not os.path.exists(inputs.fileonline):
471 476 LOG.warning('Online ANOS flag file \'%s\' was not found. Online ANOS'
472 477 'flagging for %s disabled.' % (inputs.fileonline,
473 478 inputs.ms.basename))
474 479 else:
475 480 # ANTENNA_NOT_ON_SOURCE FLAG
476 481 cmdlist = self._read_flagfile(inputs.fileonline)
477 482 flag_cmds.extend([cmd for cmd in cmdlist if ('ANTENNA_NOT_ON_SOURCE' in cmd)])
532 537 # Flag end 5 percent of each spw or minimum of 3 channels
533 538 if inputs.edgespw:
534 539 to_flag = self._get_edgespw_cmds()
535 540 if to_flag:
536 541 spw_arg = ','.join(to_flag)
537 542 flag_cmds.append(spw_arg)
538 543 flag_cmds.append('mode=\'summary\' name=\'edgespw\'')
539 544
540 545 # VLA specific commands
541 546
542 - # Flag mode clip
543 - if inputs.clip:
544 - flag_cmds.append('mode=\'clip\' correlation=\'ABS_ALL\' clipzeros=True reason=\'clip\'')
545 - flag_cmds.append('mode=\'summary\' name=\'clip\'')
546 -
547 547 # Flag quack
548 548 if inputs.quack:
549 549 flag_cmds.append(self._get_quack_cmds())
550 550 flag_cmds.append('mode=\'summary\' name=\'quack\'')
551 551
552 552 # Flag 20MHz of each edge of basebands
553 553 if inputs.baseband:
554 554 to_flag = self._get_baseband_cmds()
555 555 if to_flag:
556 556 flag_cmds.append(to_flag)

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut