##################### generated by xml-casa (v2) from hif_mstransform.xml ###########
##################### 252461e8e4304dd31cdc3fe294239fdf ##############################
from __future__ import absolute_import
import numpy
from casatools.typecheck import CasaValidator as _val_ctor
_pc = _val_ctor( )
from casatools.coercetype import coerce as _coerce
from .private.task_hif_mstransform import hif_mstransform as _hif_mstransform_t
from casatasks.private.task_logging import start_log as _start_log
from casatasks.private.task_logging import end_log as _end_log
class _hif_mstransform:
"""
hif_mstransform ---- Create new MeasurementSets for science target imaging
Create new MeasurementSets for imaging from the corrected column of the input
MeasurementSet. By default all science target data is copied to the new MS. The
new MeasurementSet is not re-indexed to the selected data and the new MS will
have the same source, field, and spw names and ids as it does in the parent MS.
Output
results -- If pipeline mode is 'getinputs' then None is returned. Otherwise
the results object for the pipeline task is returned.
--------- parameter descriptions ---------------------------------------------
vis The list of input MeasurementSets. Defaults to the list of
MeasurementSets specified in the h_init or hif_importdata task.
'': use all MeasurementSets in the context
Examples: 'ngc5921.ms', ['ngc5921a.ms', ngc5921b.ms', 'ngc5921c.ms']
outputvis The list of output transformed MeasurementSets to be used for
imaging. The output list must be the same length as the input
list. The default output name defaults to
<msrootname>_target.ms
Examples: 'ngc5921.ms',
['ngc5921a.ms', ngc5921b.ms', 'ngc5921c.ms']
field Select fields name(s) or id(s) to transform. Only fields with
data matching the intent will be selected.
Examples: '3C279', 'Centaurus*', '3C279,J1427-421'
intent Select intents for which associated fields will be imaged.
By default only TARGET data is selected.
Examples: 'PHASE,BANDPASS'
spw Select spectral window/channels to image. By default all
science spws for which the specified intent is valid are
selected .
chanbin Width (bin) of input channels to average to form an output
channel. If chanbin > 1 then chanaverage is automatically
switched to True.
timebin Bin width for time averaging. If timebin > 0s then
timeaverage is automatically switched to True.
pipelinemode The pipeline operating modeThe pipeline operating mode.
In 'automatic' mode the pipeline determines the values of all
context defined pipeline inputs automatically.
In 'interactive' mode the user can set the pipeline context
defined parameters manually.
In 'getinputs' mode the user can check the settings of all
pipeline parameters without running the task.
dryrun Run the task (False) or just display the command (True)
acceptresults Add the results of the task to the pipeline context (True) or
reject them (False).
--------- examples -----------------------------------------------------------
1. Create a science target MS from the corrected column in the input MS.
hif_mstransform()
2. Make a phase and bandpass calibrator targets MS from the corrected
column in the input MS.
hif_mstransform(intent='PHASE,BANDPASS')
"""
_info_group_ = """pipeline"""
_info_desc_ = """Create new MeasurementSets for science target imaging"""
def __call__( self, vis=[ ], outputvis=[ ], field='', intent='', spw='', chanbin=int(1), timebin='0s', pipelinemode='automatic', dryrun=False, acceptresults=True ):
schema = {'vis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'outputvis': {'type': 'cStrVec', 'coerce': [_coerce.to_list,_coerce.to_strvec]}, 'field': {'type': 'cStr', 'coerce': _coerce.to_str}, 'intent': {'type': 'cStr', 'coerce': _coerce.to_str}, 'spw': {'type': 'cStr', 'coerce': _coerce.to_str}, 'chanbin': {'type': 'cInt'}, 'timebin': {'type': 'cStr', 'coerce': _coerce.to_str}, 'pipelinemode': {'type': 'cStr', 'coerce': _coerce.to_str, 'allowed': [ 'automatic', 'interactive', 'getinputs' ]}, 'dryrun': {'type': 'cBool'}, 'acceptresults': {'type': 'cBool'}}
doc = {'vis': vis, 'outputvis': outputvis, 'field': field, 'intent': intent, 'spw': spw, 'chanbin': chanbin, 'timebin': timebin, 'pipelinemode': pipelinemode, 'dryrun': dryrun, 'acceptresults': acceptresults}
assert _pc.validate(doc,schema), str(_pc.errors)
_logging_state_ = _start_log( 'hif_mstransform', [ 'vis=' + repr(_pc.document['vis']), 'outputvis=' + repr(_pc.document['outputvis']), 'field=' + repr(_pc.document['field']), 'intent=' + repr(_pc.document['intent']), 'spw=' + repr(_pc.document['spw']), 'chanbin=' + repr(_pc.document['chanbin']), 'timebin=' + repr(_pc.document['timebin']), 'pipelinemode=' + repr(_pc.document['pipelinemode']), 'dryrun=' + repr(_pc.document['dryrun']), 'acceptresults=' + repr(_pc.document['acceptresults']) ] )
return _end_log( _logging_state_, 'hif_mstransform', _hif_mstransform_t( _pc.document['vis'], _pc.document['outputvis'], _pc.document['field'], _pc.document['intent'], _pc.document['spw'], _pc.document['chanbin'], _pc.document['timebin'], _pc.document['pipelinemode'], _pc.document['dryrun'], _pc.document['acceptresults'] ) )
hif_mstransform = _hif_mstransform( )