Skip to content
Snippets Groups Projects
applytarget.cwl 3.01 KiB
Newer Older
class: CommandLineTool
alex's avatar
alex committed
cwlVersion: v1.1
$namespaces:
  sbg: 'https://www.sevenbridges.com/'
id: applytarget
baseCommand:
alex's avatar
alex committed
  - DP3
inputs:
  - id: msin
    type: Directory
    inputBinding:
      position: 0
      prefix: msin=
      separate: false
    doc: Input Measurement Set
  - id: msout_name
    type: string
alex's avatar
alex committed
    default: '.'
    inputBinding:
      position: 0
alex's avatar
alex committed
      prefix: msout=
      separate: false
    doc: Name of output MS
  - default: DATA
    id: msin_datacolumn
    type: string
    inputBinding:
      position: 0
      prefix: msin.datacolumn=
      separate: false
    doc: Input data Column
  - id: parmdb
    type: File
    inputBinding:
      position: 0
      prefix: applycal.parmdb=
      separate: false
    doc: >-
      Path of parmdb in which the parameters are stored. This can also be an
      H5Parm file, in that case the filename has to end in '.h5'
  - id: msout_datacolumn
    type: string
    inputBinding:
      position: 0
      prefix: msout.datacolumn=
      separate: false
    doc: Output data column
  - default: gain
    id: correction
    type: string
    inputBinding:
      position: 0
      prefix: applycal.correction=
      separate: false
    doc: >
      Type of correction to perform. When using H5Parm, this is for now the name
      of the soltab; the type will be deduced from the metadata in that soltab,
      except for full Jones, in which case correction should be 'fulljones'.
  - default: 'sol000'
    id: solset
    type: string
    inputBinding:
      position: 0
      prefix: applycal.solset=
      separate: false
  - id: storagemanager
    type: string
    default: ""
    inputBinding:
      prefix: msout.storagemanager=
alex's avatar
alex committed
      separate: false
  - id: databitrate
    type: int?
    inputBinding:
       prefix: msout.storagemanager.databitrate=
       separate: false
  - id: updateweights
    type: string?
    inputBinding:
      position: 0
      prefix: applycal.updateweights=
      separate: false
alex's avatar
alex committed
  - id: save2json
    default: true
    type: boolean?
    inputBinding:
      position: 0
      prefix: count.savetojson=True
  - id: jsonfilename
    type: string?
    default: 'out.json'
    inputBinding:
      prefix: count.jsonfilename=
      separate: false
outputs:
  - id: msout
    doc: Output Measurement Set
    type: Directory
    outputBinding:
alex's avatar
alex committed
      glob: '$(inputs.msout_name=="."?inputs.msin.basename:inputs.msout_name)'
alex's avatar
alex committed
  - id: flagged_fraction_dict
    type: string
    outputBinding:
        loadContents: true
        glob: $(inputs.jsonfilename)
        outputEval: $(JSON.parse(self[0].contents).flagged_fraction_dict)
  - id: logfile
alex's avatar
alex committed
    type: File[]
    outputBinding:
      glob: 'applycal_$(inputs.correction).log'
stdout: applycal_$(inputs.correction).log
stderr: applycal_$(inputs.correction)_err.log
arguments:
  - 'steps=[applycal,count]'
requirements:
  - class: InitialWorkDirRequirement
    listing:
      - entry: $(inputs.msin)
        writable: true
  - class: InlineJavascriptRequirement
hints:
  - class: DockerRequirement
alex's avatar
alex committed
    dockerPull: 'lofareosc/prefactor3-cwl'