forked from EOSC-LOFAR/prefactor-cwl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sky_cal.cwl
52 lines (41 loc) · 1.1 KB
/
sky_cal.cwl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
cwlVersion: v1.0
class: CommandLineTool
baseCommand: [python]
label: "Find calibrator skymodel"
hints:
DockerRequirement:
dockerPull: kernsuite/prefactor
inputs:
ms:
type: Directory
DirSkymodelCal:
type: string
default: /usr/share/prefactor/skymodels/
extensionSky:
type: string
default: ".skymodel"
arguments:
- prefix: -c
valueFrom: |
from find_skymodel_cal import main
from shutil import copyfile
from os import path
DirSkymodelCal="$(inputs.DirSkymodelCal)"
SkymodelCal = main(ms_input="$(inputs.ms.path)",
DirSkymodelCal=DirSkymodelCal,
extensionSky="$(inputs.extensionSky)",
)["SkymodelCal"]
print("SkymodelCal: {}".format(SkymodelCal))
copyfile(path.join(DirSkymodelCal, SkymodelCal), "selected.skymodel")
outputs:
skymodel:
type: File
outputBinding:
glob: "selected.skymodel"
$namespaces:
s: http://schema.org/
$schemas:
- https://schema.org/docs/schema_org_rdfa.html
s:license: "https://mit-license.org/"
s:author:
s:person.url: "http://orcid.org/0000-0002-6136-3724"