Skip to content
Snippets Groups Projects
prep.cwl 9.98 KiB
Newer Older
class: Workflow
cwlVersion: v1.0
alex's avatar
alex committed
id: prep
label: prep
$namespaces:
  sbg: 'https://www.sevenbridges.com/'
inputs:
  - id: msin
    type: 'Directory[]'
    'sbg:x': -515.1839599609375
    'sbg:y': 330.674560546875
Alexander Drabent's avatar
Alexander Drabent committed
  - id: filter_baselines
    type: string
    'sbg:x': 254.234375
    'sbg:y': 684
  - id: raw_data
    type: boolean
    'sbg:x': 0
    'sbg:y': 563
alex's avatar
alex committed
  - id: propagatesolutions
    type: boolean
    'sbg:x': 0
    'sbg:y': 670
alex's avatar
alex committed
  - id: flagunconverged
    type: boolean
    'sbg:x': 559.319091796875
    'sbg:y': 837.5
alex's avatar
alex committed
  - id: demix
    type: boolean
    'sbg:x': 254.234375
    'sbg:y': 1326
alex's avatar
alex committed
  - id: max_dppp_threads
    type: int?
    default: 10
    'sbg:x': 254.234375
    'sbg:y': 214
  - id: memoryperc
    type: int
    'sbg:x': 254.234375
    'sbg:y': 107
Alexander Drabent's avatar
Alexander Drabent committed
  - id: flag_baselines
    type: 'string[]'
    'sbg:x': 254.234375
    'sbg:y': 442
Alexander Drabent's avatar
Alexander Drabent committed
  - id: avg_timeresolution
    type: float
    'sbg:x': 254.234375
    'sbg:y': 1554
Alexander Drabent's avatar
Alexander Drabent committed
  - id: avg_freqresolution
    type: string
    'sbg:x': 254.234375
    'sbg:y': 1661
Alexander Drabent's avatar
Alexander Drabent committed
  - id: process_baselines_cal
    type: string
    'sbg:x': 0
    'sbg:y': 777
Alexander Drabent's avatar
Alexander Drabent committed
  - id: demix_timestep
Alexander Drabent's avatar
Alexander Drabent committed
    type: int
    'sbg:x': 254.234375
    'sbg:y': 898
Alexander Drabent's avatar
Alexander Drabent committed
  - id: demix_freqstep
Alexander Drabent's avatar
Alexander Drabent committed
    type: int
    'sbg:x': 254.234375
    'sbg:y': 1219
Alexander Drabent's avatar
Alexander Drabent committed
  - id: demix_target
    type: string
    'sbg:x': 254.234375
    'sbg:y': 1005
Alexander Drabent's avatar
Alexander Drabent committed
  - id: demix_sources
    type: 'string[]'
    'sbg:x': 254.234375
    'sbg:y': 1112
alex's avatar
alex committed
  - id: min_length
alex's avatar
alex committed
    type: int?
    'sbg:x': 360
    'sbg:y': 1919.42626953125
alex's avatar
alex committed
  - id: overhead
alex's avatar
alex committed
    type: float?
    'sbg:x': 180
    'sbg:y': 1903.963134765625
alex's avatar
alex committed
  - id: min_separation
    type: int?
    'sbg:x': 0
    'sbg:y': 884
alex's avatar
alex committed
  - id: do_smooth
    type: boolean?
    default: false
    'sbg:x': 559.319091796875
    'sbg:y': 944.5
alex's avatar
alex committed
  - id: max_separation_arcmin
    type: float?
    'sbg:x': 0
    'sbg:y': 991
alex's avatar
alex committed
  - id: calibrator_path_skymodel
    type: Directory?
    'sbg:x': 0
    'sbg:y': 1098
alex's avatar
alex committed
  - id: A-Team_skymodel
    type: File?
    'sbg:x': 0
    'sbg:y': 1205
alex's avatar
alex committed
  - id: elevation
    type: string
    default: 0deg..15deg
    'sbg:x': 254.234375
    'sbg:y': 791
alex's avatar
alex committed
  - id: amplmin
    type: float
alex's avatar
alex committed
    default: 1.e-30
    'sbg:x': 254.234375
    'sbg:y': 1768
alex's avatar
alex committed
  - id: outh5parm
alex's avatar
alex committed
    outputSource:
      - h5parm_collector/outh5parm
    type: File
    'sbg:x': 1554.5106201171875
    'sbg:y': 884
  - id: check_Ateam_separation.png
    outputSource:
      - check_ateam_separation/output_imag
    'sbg:x': 559.319091796875
    'sbg:y': 1051.5
  - id: msout
    outputSource:
alex's avatar
alex committed
      - predict_calibrate/msout
    type: 'Directory[]'
    'sbg:x': 1329.937255859375
    'sbg:y': 663
  - id: parset
    outputSource:
      - ndppp_prep_cal/parset
    type: 'File[]'
    'sbg:x': 1027.490966796875
    'sbg:y': 884
alex's avatar
alex committed
  - id: calibrator_name
    outputSource:
      - find_skymodel_cal/model_name
    type: string
    'sbg:x': 559.319091796875
    'sbg:y': 1158.5
alex's avatar
alex committed
  - id: outh5parm_logfile
alex's avatar
alex committed
    outputSource:
alex's avatar
alex committed
      - h5parm_collector/log
    type: 'File[]'
    'sbg:x': 1554.5106201171875
    'sbg:y': 777
alex's avatar
alex committed
  - id: logfiles
alex's avatar
alex committed
    outputSource:
      - concat_logfiles_calib/output
      - ms_concat/logfile
alex's avatar
alex committed
      - concat_logfiles_predict/output
      - concat_logfiles_blsmooth/output
      - make_sourcedb/log
      - find_skymodel_cal/logfile
      - concat_logfiles_prep_cal/output
      - make_sourcedb_ateam/log
      - check_ateam_separation/logfile
      - aoflag/logfile
alex's avatar
alex committed
    type: 'File[]'
    linkMerge: merge_flattened
    'sbg:x': 1554.5106201171875
    'sbg:y': 991
alex's avatar
alex committed
        source:
          - msin
    run: ../../steps/selectfirstdirectory.cwl
    label: select_only_first
    'sbg:x': -303.7861022949219
    'sbg:y': 542.37646484375
  - id: ndppp_prep_cal
    in:
      - id: baselines_to_flag
        default: []
alex's avatar
alex committed
        source:
          - flag_baselines
      - id: elevation_to_flag
        source: elevation
      - id: min_amplitude_to_flag
        source: amplmin
      - id: memoryperc
        default: 20
        source: memoryperc
      - id: raw_data
Alexander Drabent's avatar
Alexander Drabent committed
        default: false
        source: raw_data
      - id: demix
Alexander Drabent's avatar
Alexander Drabent committed
        default: false
        source: demix
      - id: msin
        linkMerge: merge_flattened
        source:
          - msin
      - id: msin_baseline
        default: '*'
        source: filter_baselines
      - id: skymodel
alex's avatar
alex committed
        source: make_sourcedb_ateam/sourcedb
      - id: timeresolution
        default: 1
Alexander Drabent's avatar
Alexander Drabent committed
        source: avg_timeresolution
      - id: freqresolution
        default: 12.21kHz
Alexander Drabent's avatar
Alexander Drabent committed
        source: avg_freqresolution
      - id: demix_timestep
        default: 1
        source: demix_timestep
      - id: demix_freqstep
        default: 1
        source: demix_freqstep
      - id: demix_baseline
        default: '*'
        source: process_baselines_cal
alex's avatar
alex committed
      - id: target_source
Alexander Drabent's avatar
Alexander Drabent committed
        source: demix_target
alex's avatar
alex committed
      - id: ntimechunk
        default: 10
        source: max_dppp_threads
alex's avatar
alex committed
      - id: subtract_sources
alex's avatar
alex committed
        source:
          - demix_sources
    out:
      - id: msout
      - id: logfile
alex's avatar
alex committed
    run: ../../subworkflow/ndppp_prep_cal.cwl
    label: ndppp_prep_cal
    scatter:
      - msin
    'sbg:x': 559.319091796875
    'sbg:y': 497.5
alex's avatar
alex committed
  - id: predict_calibrate
    in:
      - id: msin
        linkMerge: merge_flattened
        source:
          - aoflag/output_ms
alex's avatar
alex committed
      - id: do_smooth
        source: do_smooth
      - id: sourcedb
        source: make_sourcedb/sourcedb
      - id: flagunconverged
        source: flagunconverged
      - id: propagatesolutions
        source: propagatesolutions
    out:
      - id: msout
      - id: BLsmooth.log
      - id: predict_cal.log
      - id: calib_cal.log
      - id: outh5parm
    run: ../../subworkflow/predict_calibrate.cwl
    label: predict_calibrate
    scatter:
      - msin
    'sbg:x': 1027.490966796875
    'sbg:y': 749
  - id: ms_concat
    in:
      - id: min_length
        source: min_length
      - id: overhead
        source: overhead
      - id: msin
        linkMerge: merge_flattened
        source:
          - ndppp_prep_cal/msout
    out:
      - id: concat_meta_ms
      - id: concat_additional_ms
      - id: ms_outs
      - id: logfile
    run: ../../lofar-cwl/steps/ms_concat.cwl
    label: ms_concat
    'sbg:x': 700
    'sbg:y': 749
  - id: aoflag
    in:
      - id: msin
        linkMerge: merge_flattened
        source:
          - ndppp_prep_cal/msout
      - id: concat_meta_ms
        source: ms_concat/concat_meta_ms
      - id: concat_additional_ms
        source: ms_concat/concat_additional_ms
      - id: verbose
        default: true
      - id: combine-spws
        default: true
    out:
      - id: output_ms
      - id: logfile
    run: ../../steps/aoflag.cwl
    label: aoflag
    'sbg:x': 850
    'sbg:y': 749
  - id: check_ateam_separation
    in:
      - id: ms
        source:
      - id: min_separation
        source: min_separation
    out:
      - id: output_imag
      - id: logfile
alex's avatar
alex committed
    run: ../../steps/check_ateam_separation.cwl
    label: check_Ateam_separation
    'sbg:x': 254.234375
    'sbg:y': 1440
alex's avatar
alex committed
  - id: make_sourcedb_ateam
    in:
      - id: sky_model
alex's avatar
alex committed
        source: A-Team_skymodel
alex's avatar
alex committed
      - id: logname
        default: make_sourcedb_ateam.log
    out:
      - id: sourcedb
      - id: log
alex's avatar
alex committed
    run: ../../lofar-cwl/steps/makesourcedb.cwl
    label: make_sourcedb_ateam
    'sbg:x': 254.234375
    'sbg:y': 328
alex's avatar
alex committed
  - id: find_skymodel_cal
    in:
alex's avatar
alex committed
      - id: msin
alex's avatar
alex committed
        source:
alex's avatar
alex committed
      - id: skymodels
alex's avatar
alex committed
        source: calibrator_path_skymodel
      - id: max_separation_arcmin
        source: max_separation_arcmin
alex's avatar
alex committed
    out:
      - id: output_models
alex's avatar
alex committed
      - id: model_name
      - id: logfile
alex's avatar
alex committed
    run: ../../steps/find_skymodel_cal.cwl
    label: find_skymodel_cal
    'sbg:x': 254.234375
    'sbg:y': 563
alex's avatar
alex committed
  - id: make_sourcedb
    in:
      - id: sky_model
        source: find_skymodel_cal/output_models
alex's avatar
alex committed
      - id: output_file_name
        default: calibrator.sourcedb
alex's avatar
alex committed
    out:
      - id: sourcedb
      - id: log
    run: ../../lofar-cwl/steps/makesourcedb.cwl
    label: make_sourcedb
    'sbg:x': 559.319091796875
    'sbg:y': 723.5
alex's avatar
alex committed
  - id: concat_logfiles_prep_cal
alex's avatar
alex committed
    in:
      - id: file_list
alex's avatar
alex committed
        linkMerge: merge_flattened
        source:
          - ndppp_prep_cal/logfile
alex's avatar
alex committed
      - id: file_prefix
        default: ndppp_prep_cal
    out:
      - id: output
    run: ../../steps/concatenate_files.cwl
alex's avatar
alex committed
    label: concat_logfiles_prep_cal
    'sbg:x': 1027.490966796875
    'sbg:y': 991
alex's avatar
alex committed
  - id: concat_logfiles_blsmooth
    in:
      - id: file_list
        source:
          - predict_calibrate/BLsmooth.log
      - id: file_prefix
alex's avatar
alex committed
        default: blsmooth_prep
alex's avatar
alex committed
    out:
      - id: output
    run: ../../steps/concatenate_files.cwl
    label: concat_logfiles_blsmooth
    'sbg:x': 1329.937255859375
    'sbg:y': 1105
alex's avatar
alex committed
  - id: concat_logfiles_predict
    in:
      - id: file_list
alex's avatar
alex committed
        linkMerge: merge_flattened
alex's avatar
alex committed
        source:
          - predict_calibrate/predict_cal.log
      - id: file_prefix
        default: predict_cal
    out:
      - id: output
    run: ../../steps/concatenate_files.cwl
    label: concat_logfiles_predict
    'sbg:x': 1329.937255859375
    'sbg:y': 891
alex's avatar
alex committed
  - id: concat_logfiles_calib
    in:
      - id: file_list
        source:
          - predict_calibrate/calib_cal.log
      - id: file_prefix
alex's avatar
alex committed
        default: calib_cal_prep
alex's avatar
alex committed
    out:
      - id: output
    run: ../../steps/concatenate_files.cwl
    label: concat_logfiles_calib
    'sbg:x': 1329.937255859375
    'sbg:y': 998
alex's avatar
alex committed
  - id: h5parm_collector
    in:
      - id: h5parmFiles
        source:
          - predict_calibrate/outh5parm
      - id: squeeze
        default: true
      - id: verbose
        default: true
      - id: clobber
        default: true
    out:
      - id: outh5parm
      - id: log
    run: ../../lofar-cwl/steps/H5ParmCollector.cwl
    label: H5parm_collector
    'sbg:x': 1329.937255859375
    'sbg:y': 777
requirements:
  - class: InlineJavascriptRequirement
  - class: StepInputExpressionRequirement
  - class: SubworkflowFeatureRequirement
  - class: ScatterFeatureRequirement