Skip to content
Snippets Groups Projects
Commit 4e841506 authored by alex's avatar alex
Browse files

recent changes, finish prep step

Former-commit-id: 9e2c9bca
parent f30afa5b
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@ inputs:
type:
- File
- string
default: '/data/skymodels/Ateam_LBA_CC.skymodel'
inputBinding:
position: 0
prefix: in=
......
......@@ -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
- id: ms
type:
- Directory
- type: array
items: Directory
inputBinding:
position: 0
- id: skymodels
type: Directory
doc: Input measurement set
- id: DirSkymodelCal
type:
- Directory
- string
default: '/data/skymodels'
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)
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
......@@ -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
......@@ -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
......
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment