diff --git a/lofar-cwl/steps/makesourcedb.cwl b/lofar-cwl/steps/makesourcedb.cwl index eb5c2e7c7b8f09c0a2c97ea4512bb241cff17fb5..30c09253d64705615c090b4c8020e3c7002cf523 100755 --- a/lofar-cwl/steps/makesourcedb.cwl +++ b/lofar-cwl/steps/makesourcedb.cwl @@ -10,6 +10,7 @@ inputs: type: - File - string + default: '/data/skymodels/Ateam_LBA_CC.skymodel' inputBinding: position: 0 prefix: in= diff --git a/steps/find_skymodel_cal.cwl b/steps/find_skymodel_cal.cwl index 51a1dc4a8f7500fccac5cef763cd15d50ecaa505..6bfc52d0c8a70250bbb4b768d0db8d96e0ac1629 100644 --- a/steps/find_skymodel_cal.cwl +++ b/steps/find_skymodel_cal.cwl @@ -5,44 +5,25 @@ $namespaces: id: find_skymodel_cal_py baseCommand: - python3 + - /usr/local/bin/find_skymodel_cal.py inputs: - - id: msin - type: Directory - doc: MS containing the calibrator - inputBinding: - position: 0 - - id: skymodels - type: Directory - doc: Directory containing the sky models - - id: skymodels_extension - type: string? - doc: path extension of the sky models - -label: find_skymodel_cal.py -arguments: - - '-c' - - | - import sys - - from unittest.mock import MagicMock - sys.modules['lofarpipe.support.data_map'] = MagicMock() - - - from find_skymodel_cal import main as find_skymodel - import json - mss = sys.argv[1:] - skymodels = "$(inputs.skymodels.path)" - - extension = "$(inputs.skymodels_extension)" - output = {} - if extension != 'null': - output = find_skymodel(mss, skymodels, './', extension) - else: - output = find_skymodel(mss, skymodels, './') - - cwl_output = {'class': 'File', 'path': output['SkymodelCal']} - with open('./out.json', 'w') as fp: - json.dump(cwl_output, fp) + - id: ms + type: + - Directory + - type: array + items: Directory + inputBinding: + position: 0 + doc: Input measurement set + - id: DirSkymodelCal + type: + - Directory + - string + default: '/data/skymodels' + doc: Directory containing the sky models + inputBinding: + position: 1 + prefix: '--DirSky' outputs: - id: output_models type: File @@ -50,10 +31,10 @@ outputs: loadContents: true glob: 'out.json' outputEval: $(JSON.parse(self[0].contents)) - +label: find_skymodel_cal.py requirements: - class: InlineJavascriptRequirement hints: DockerRequirement: - dockerPull: lofareosc/prefactor-ci:master + dockerPull: lofareosc/prefactor diff --git a/workflows/HBA_calibrator.cwl b/workflows/HBA_calibrator.cwl index 1e84665e1833386275e3616214bdc46f7311ed9b..942787c9f84caba18e8902e8be34cddba821865a 100644 --- a/workflows/HBA_calibrator.cwl +++ b/workflows/HBA_calibrator.cwl @@ -160,17 +160,15 @@ inputs: 'sbg:y': 1200 - id: max_separation_arcmin type: float? - default: 1 + default: 1.0 'sbg:x': -1000 'sbg:y': 1300 - id: calibrator_path_skymodel - type: string? - default: /data/skymodels + type: Directory? 'sbg:x': -1000 'sbg:y': 1400 - id: A-Team_skymodel - type: string? - default: /data/skymodels/Ateam_LBA_CC.skymodel + type: File? 'sbg:x': -1000 'sbg:y': 1500 - id: cal_solutions @@ -320,4 +318,3 @@ steps: 'sbg:y': 0 requirements: - class: SubworkflowFeatureRequirement - - class: ScatterFeatureRequirement diff --git a/workflows/prefactor_calibrator.cwl b/workflows/prefactor_calibrator.cwl index d71d33b4f9c7e92ff00c9efeb6060db7e44141d0..3355c043ed1de9c944ccf877aa727ed346959b1d 100644 --- a/workflows/prefactor_calibrator.cwl +++ b/workflows/prefactor_calibrator.cwl @@ -160,17 +160,15 @@ inputs: 'sbg:y': 1200 - id: max_separation_arcmin type: float? - default: 1 + default: 1.0 'sbg:x': -1000 'sbg:y': 1300 - id: calibrator_path_skymodel - type: string? - default: /data/skymodels + type: Directory? 'sbg:x': -1000 'sbg:y': 1400 - id: A-Team_skymodel - type: string? - default: /data/skymodels/Ateam_LBA_CC.skymodel + type: File? 'sbg:x': -1000 'sbg:y': 1500 - id: cal_solutions diff --git a/workflows/prefactor_calibrator/prep.cwl b/workflows/prefactor_calibrator/prep.cwl index 511b6adb67fcff295edf29c1745ed69b90018331..ebe7e9cad1cbc2622653fdb036e70ee1900afa0f 100644 --- a/workflows/prefactor_calibrator/prep.cwl +++ b/workflows/prefactor_calibrator/prep.cwl @@ -70,22 +70,28 @@ inputs: type: int? 'sbg:x': -1000 'sbg:y': 600 - - id: A-Team_skymodel - type: string? - default: /data/skymodels/Ateam_LBA_CC.skymodel + - id: max_separation_arcmin + type: float? 'sbg:x': -1000 'sbg:y': 700 + - id: calibrator_path_skymodel + type: Directory? + 'sbg:x': -1000 + 'sbg:y': 800 + - id: A-Team_skymodel + type: File? + 'sbg:x': -1000 + 'sbg:y': 900 - id: elevation type: string - default: '0deg..20deg' + default: 0deg..20deg 'sbg:x': -1000 - 'sbg:y': 800 + 'sbg:y': 1000 - id: amplmin type: float - default: 1e-30 + default: 1.e-30 'sbg:x': -1000 - 'sbg:y': 800 - + 'sbg:y': 1100 outputs: - id: check_Ateam_separation.png outputSource: @@ -128,10 +134,12 @@ steps: in: - id: baselines_to_flag default: [] - source: flag_baselines - - id: ntimechunk - default: 10 - source: max_dppp_threads + source: + - flag_baselines + - id: elevation_to_flag + source: elevation + - id: min_amplitude_to_flag + source: amplmin - id: memoryperc default: 20 source: memoryperc @@ -143,7 +151,8 @@ steps: source: demix - id: msin linkMerge: merge_flattened - source: msin + source: + - msin - id: msin_baseline default: '*' source: filter_baselines @@ -166,12 +175,12 @@ steps: source: process_baselines_cal - id: target_source source: demix_target + - id: ntimechunk + default: 10 + source: max_dppp_threads - id: subtract_sources - source: demix_sources - - id: elevation_to_flag - source: elevation - - id: min_amplitude_to_flag - source: amplmin + source: + - demix_sources out: - id: msout - id: logfile @@ -207,6 +216,20 @@ steps: label: make_sourcedb_ateam 'sbg:x': -500 'sbg:y': 300 + - id: find_skymodel_cal + in: + - id: ms + source: msin + - id: max_seperation_arcmin + source: max_separation_arcmin + - id: DirSkymodelCal + source: calibrator_path_skymodel + out: + - id: output_models + run: ../../steps/find_skymodel_cal.cwl + label: find_skymodel_cal + 'sbg:x': -500 + 'sbg:y': 500 requirements: - class: SubworkflowFeatureRequirement - - class: ScatterFeatureRequirement \ No newline at end of file + - class: ScatterFeatureRequirement