The specification

  • Kliko is based on standard docker containers
  • Container mush have a CMD specified, which would be the main program of the container. It should not require arguments.
  • logging should be written to STDOUT and STDERR.
  • We define two types of compute containers, split IO and joined IO containers.
  • For split IO Input files will be mounted read only into /input. Output file should be written to /output, which will be mounted by the host.
  • For joined IO containers input & output is the /work folder which will be mounted RW.
  • parameters for the computation will be given when the container is run in the form of a file in json format called parameters.json in /input
  • Which parameters the container will accept should be defined in a yaml file /kliko.yml
  • The kliko.yml file should follow the schema defined in kliko/schema.yml.
  • an example parameters definition file can be found in examples/form.yml
  • fields with type file will enable supply of custom input files. these will be put in the /input folder.

The kliko.yml file

The kliko file should be in YAML format and has these required fields:

schema_version

The version of the kliko specification. note that this is independent of the versioning of the Kliko library.

name

Name of the kliko image. For example radioastro/simulator.

description

A more detailed description of the image.

author

Who made the container.

email

email adres of the author.

url

Where to find the specific kliko project on the web.

io

Which IO mode to use, could be join or split. For split IO Input files will be mounted read only into /input. Output file should be written to /output, which will be mounted by the host. For joined IO containers input & output is the /work folder which will be mounted RW.

Sections

The paramaters are grouped in sections. Sections are just lists of fields.

fields

A section consists of a list of fields.

field

each field has 2 obligatory keys, a name and a type. Name is a short reference to the field which needs to be unique. This will be the name for internal reference. The type defines the type of the field and can be one of choice, char, float, file, bool or int.

Optional keys are:
  • initial: supply a initial (default) value for a field

  • max_length: define a maximum length in case of string type

  • choices: define a list of choices in case of a choice field. The choices should be a mapping

  • label: The label used for representing the field to the end user. If no label is given the name of the field

    is used.

  • required: Indicates if the field is required or optional

  • help_text: An optional help text that is presented to the end user next to the field.

An example kliko.yml file

Below is an example kliko file.

  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
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
schema_version: 1
name: simulator form
description: simulator form
container: skasa/simulator
author: Gijs Molenaar
email: gijsmolenaar@gmail.com
url: http://github.com/ska-sa/rodrigues/
io: split

sections:
  -
    name: telescope
    description: Observatory
    fields:
      -
        name: name
        type: char
        initial: new simulation
        max_length: 200
      -
        name: observatory
        type: choice
        choices:
            MeerKAT: MeerKAT
            Kat-7: Kat-7
            JVLA-A: JVLA-A
        initial: MeerKAT
      -
        name: output
        type: choice
        choices:
          Image: Image
          Visibilities: Visibilities
        initial: Image
        label: Output type
      -
        name: sefd
        type: float
        label: SEFD
        required: False
        help_text: System defaults will be used if left blank
  -
     name: sky
     description: Sky model
     fields:
       -
         name: sky_type
         type: choice
         choices:
           Tigger-LSM: Tigger-LSM
           ASCII: ASCII
           FITS: FITS
           KATALOG: KATALOG
       -
         name: sky_model
         type: file
         required: False
       -
         name: katalog_id
         type: choice
         label: KATALOG
         required: False
         initial: nvss6deg
         choices:
           nvss6deg: nvss6deg
           scubed1deg: scubed1deg
           3c147_field: 3c147_field
           3c147_field_no_core: 3c147_field_no_core
       -
         name: radius
         type: float
         label: Radius
         initial: 0.5
         required: False
         help_text: Radius of degrees
       -
         name: fluxrange
         type: char
         label: Flux range
         initial: 0.001-1
         max_length: 32
         help_text: Flux range in Jy
       -
         name: ms_dec
         type: char
         label: Declination
         initial: -30d0m0s
         help_text: in dms
       -
         name: ms_ra
         type: char
         label: Right ascension
         initial: 0h0m0s
         help_text: in hms
         max_length: 32
       -
         name: add_noise
         type: bool
         initial: True
         required: False
       -
         name: vis_noise_std
         type: float
         label: Visibility noise std
         initial: 0
         help_text: Generates from SEFD if 0
  -
     name: observation
     description: Observation setup
     fields:
       -
         name: ms_synthesis
         type: float
         label: Synthesis time
         initial: 0.25
         help_text: in hours
       -
         name: ms_dtime
         type: int
         label: Integration time
         initial: 10
         help_text: in seconds
       -
         name: ms_freq0
         type: float
         label: Start frequency
         initial: 700
         help_text: in MHz
       -
         name: ms_dfreq
         type: float
         label: Channel width
         initial: 50e3
         help_text: in kHz
       -
         name: ms_nchan
         type: int
         label: Channels
         initial: 1
         help_text: Number of frequency channels

  -
     name: imaging
     description: imaging settings
     fields:
       -
         name: use_default_im 
         type: bool
         label: Use default imaging settings
         initial: True
         required: False
       -
         name: imager 
         type: choice
         label: Imager
         initial: LW
         choices:
           LWIMAGER: LWIMAGER
           WSCLEAN: WSCLEAN
           CASA: CASA
       -
         name: im_npix 
         type: int
         label: Image size
         initial: 512
         help_text: in pixels
       -
         name: im_cellsize 
         type: float
         label: Pixel size
         help_text: in arcseconds
         initial: 1
       -
         name: im_weight 
         type: choice
         label: uv-Weighting
         choices:
           Natural: Natural
           Uniform: Uniform
           Briggs: Briggs
           initial: N
       -
         name: im_robust 
         type: float
         label: Robust
         initial: 0
         help_text: Briggs robust parameter
       -
         name: im_weight_fov 
         type: float
         label: Weight FoV
         help_text: in arcminutes
         required: False
       -
         name: im_wprojplanes 
         type: int
         label: w-Projection planes
         initial: 0
       -
         name: im_mode 
         type: choice
         label: Imaging mode
         choices:
           channel: channel
           mfs: mfs
           velocity: velocity
           frequency: frequency
         initial: channel
       -
         name: channelise 
         type: int
         label: Image channelise
         initial: 0
         help_text: 0 means average all, 1 per channel, etc.
       -
         name: im_stokes
         type: char
         label: Stokes
         initial: I
         max_length: 4



  -
     name: lwimager
     description: LWIMAGER deconvolution settings
     fields:
       -
         name: lwimager
         type: bool
         label: Deconvolve with me!
         required: False
       -
         name: lwimager_niter
         type: int
         label: NITER
         initial: 1000
       -
         name: lwimager_gain
         type: float
         label: Loop gain
         initial: 0.1
       -
         name: lwimager_threshold
         type: float
         label: Clean Threshold
         initial: 0
         help_text: In Jy

       -
         name: lwimager_sigmalevel
         type: float
         label: Clean sigma level
         initial: 0
         help_text: In sigma above noise
       -
         name: lwimager_operation
         type: choice
         label: Clean algorithm
         choices:
           csclean: csclean
           hogbom: hogbom
           clark: clark
           multiscale: multiscale
         initial: csclean
       -
         name: lwimager_cyclefactor
         type: float
         label: Cycle factor
         initial: 1.5
       -
         name: lwimager_cyclespeedup
         type: float
         label: Cycle speed up
         initial: -1
       -
         name: lwimager_stoppointmode
         type: float
         label: Stop point mode
         initial: -1
       -
         name: lwimager_nscales
         type: int
         label: Scales for MS clean
         initial: 4
       -
         name: lwimager_uservector
         type: char
         label: Clean scales
         required: False
         help_text: Comma seperated scales in pixels
         max_length: 64

  -
     name: wsclean
     description: WSCLEAN deconvolution settings
     fields:
       -
         name: wsclean
         type: bool
         label: Deconvolve with me!
         required: False
       -
         name: wsclean_niter
         type: int
         label: NITER
         initial: 1000
       -
         name: wsclean_gain
         type: float
         label: Minor loop gain
         initial: 0.1
       -
         name: wsclean_mgain
         type: float
         label: Major loop gain
         initial: 0.9
       -
         name: wsclean_threshold
         type: float
         label: Clean Threshold
         initial: 0
         help_text: In Jy
       -
         name: wsclean_sigmalevel
         type: float
         label: Clean sigma level
         initial: 0
         help_text: In sigma above noise
       -
         name: wsclean_joinpolarizations
         type: bool
         label: Join polarizations
         required: False
       -
         name: wsclean_joinchannels
         type: bool
         label: Join channels
         required: False
       -
         name: wsclean_multiscale
         type: bool
         label: Multiscale clean
         required: False
       -
         name: wsclean_multiscale_dash_threshold_dash_bias
         type: float
         label: Multi scale threshold bias
         initial: 0.7
       -
         name: wsclean_multiscale_dash_scale_dash_bias
         type: float
         label: Multi scale bias
         initial: 0.6
       -
         name: wsclean_cleanborder
         type: float
         label: Clean border
         initial: 5
         help_text: In percentage of image width/height
       -
         name: wsclean_smallpsf
         type: bool
         label: Small PSF
         required: False
         help_text: Resize the psf to speed up minor clean iterations
       -
         name: wsclean_nonegative
         type: bool
         label: No negative
         required: False
         help_text: Do not allow negative components during cleaning
       -
         name: wsclean_stopnegative
         type: bool
         label: Stop on negative
         required: False
       -
         name: wsclean_beamsize
         type: char
         label: Restoring beam size
         required: False
         help_text: In arcseconds
         max_length: 32

  -
     name: casa
     description: CASA deconvolution settings
     fields:
       -
         name: casa
         type: bool
         label: Deconvolve with me!
         required: False
       -
         name: casa_niter
         type: int
         label: NITER
         initial: 1000
       -
         name: casa_threshold
         type: float
         label: Threshold
         initial: 0
       -
         name: casa_sigmalevel
         type: float
         label: Clean sigma level
         initial: 0
         help_text: In sigma above noise
       -
         name: casa_gain
         type: float
         label: Loop Gain
         initial: 0.1
         help_text: Clean Loop gain
       -
         name: casa_psfmode
         type: choice
         label: PSF mode
         initial: clark
         choices:
           clark: clark
           clarkstokes: clarkstokes
           hogbom: hogbom

       -
         name: casa_imagermode
         type: choice
         label: Imager mode
         required: False
         choices:
           csclean: csclean
           mosiac: mosiac
         initial: csclean
       -
         name: casa_gridmode
         type: choice
         label: Grid mode
         required: False
         choices:
           widefield: widefield
           aprojection: aprojection
         initial: widefield
         help_text: A-projection only works JVLA
       -
         name: casa_nterms
         type: int
         label: NTERMS
         initial: 1
         help_text: See CASA clean task
       -
         name: casa_reffreq
         type: float
         label: MFS ref Frequency
         required: False
         help_text: in MHz
       -
         name: casa_multiscale
         type: char
         label: Multiscale
         required: False
         help_text: Deconvolution scales in pixels
         max_length: 200
       -
         name: casa_negcomponent
         type: float
         label: Negative Components
         initial: -1
         help_text: See CASA clean task
       -
         name: casa_smallscalebias
         type: float
         label: Small scale bias
         initial: 0.6
         help_text: See CASA clean task
       -
         name: casa_restoringbeam
         type: char
         label: Restoring beam
         required: False
         max_length: 32
       -
         name: casa_cyclefactor
         type: float
         label: Cycle factor
         initial: 1.5
       -
         name: casa_cyclespeedup
         type: int
         label: Cycle speed up
         initial: -1


  -
     name: moresane
     description: MORESANE deconvolution settings
     fields:

       -
         name: moresane
         type: bool
         label: Deconvolve with me!
         required: False
       -
         name: moresane_scalecount
         type: int
         label: Scale count
         required: False
         help_text: See MORESANE help
       -
         name: moresane_subregion
         type: int
         label: Sub region
         required: False
         help_text: Inner region to deconvolve in pixels
       -
         name: moresane_startscale
         type: int
         label: Start scale
         initial: 1
       -
         name: moresane_stopscale
         type: int
         label: Stop scale
         initial: 20
       -
         name: moresane_sigmalevel
         type: float
         label: Threshold level
         initial: 3
         help_text: in sigma above noise
       -
         name: moresane_loopgain 
         type: float
         label: Loop gain
         initial: 0.1
       -
         name: moresane_tolerance 
         type: float
         label: Tolerance
         initial: .75
       -
         name: moresane_accuracy 
         type: float
         label: Accuracy
         initial: 1e-6
       -
         name: moresane_majorloopmiter 
         type: int
         label: Major loop iterations
         initial: 100
       -
         name: moresane_minorloopmiter 
         type: int
         label: Minor loop iterations
         initial: 50
       -
         name: moresane_convmode 
         type: choice
         label: Convolution mode
         initial: circular
         choices:
           circular: circular
           linear: linear

       -
         name: moresane_enforcepositivity 
         type: bool
         label: Enforce Positivity
         required: False
       -
         name: moresane_edgesupression 
         type: bool
         label: Edge Suppression
         required: False
       -
         name: moresane_edgeoffset 
         type: int
         label: Edge offset
         initial: 0
       -
         name: moresane_mfs 
         type: bool
         label: MFS map
         required: False
         help_text: Comes with an spi map

       -
         name: moresane_spi_dash_sigmalevel 
         type: float
         label: spi threshold level
         initial: 10
         help_text: In sigma above noise

Loading a Kliko container with the previous kliko file is loaded up in RODRIGUES will result in the form below:

_images/rodrigues.png

Processing this form will result in the following parameters.json file which is presented to the Kliko container on runtime:

 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
{
  "wsclean_threshold": 0.0,
  "im_stokes": "I",
  "casa_smallscalebias": 0.6,
  "casa_threshold": 0.0,
  "sky_model": null,
  "casa_niter": 1000,
  "wsclean_sigmalevel": 0.0,
  "im_cellsize": 1.0,
  "im_robust": 0.0,
  "moresane_scalecount": null,
  "casa_reffreq": null,
  "casa_multiscale": "",
  "lwimager_threshold": 0.0,
  "casa_cyclefactor": 1.5,
  "wsclean_cleanborder": 5.0,
  "lwimager_nscales": 4,
  "im_npix": 512,
  "casa_cyclespeedup": -1,
  "moresane_edgesupression": false,
  "im_weight": "initial",
  "wsclean_beamsize": "",
  "radius": 0.5,
  "wsclean_gain": 0.1,
  "im_weight_fov": null,
  "im_wprojplanes": 0,
  "ms_ra": "0h0m0s",
  "moresane_accuracy": 1e-06,
  "ms_freq0": 700.0,
  "lwimager_cyclefactor": 1.5,
  "wsclean_multiscale_dash_threshold_dash_bias": 0.7,
  "lwimager_niter": 1000,
  "moresane_spi_dash_sigmalevel": 10.0,
  "ms_nchan": 1,
  "wsclean_niter": 1000,
  "im_mode": "channel",
  "moresane_majorloopmiter": 100,
  "casa_gridmode": "widefield",
  "fluxrange": "0.001-1",
  "moresane_mfs": false,
  "name": "new simulation",
  "channelise": 0,
  "moresane_subregion": null,
  "lwimager_operation": "csclean",
  "wsclean_multiscale": false,
  "casa_psfmode": "clark",
  "moresane_tolerance": 0.75,
  "lwimager": false,
  "lwimager_uservector": "",
  "lwimager_stoppointmode": -1.0,
  "casa_sigmalevel": 0.0,
  "sefd": null,
  "lwimager_gain": 0.1,
  "moresane_edgeoffset": 0,
  "moresane_loopgain": 0.1,
  "katalog_id": "nvss6deg",
  "wsclean_joinpolarizations": false,
  "ms_dfreq": 50000.0,
  "output": "Image",
  "wsclean": false,
  "wsclean_nonegative": false,
  "wsclean_stopnegative": false,
  "moresane_convmode": "circular",
  "ms_synthesis": 0.25,
  "casa_negcomponent": -1.0,
  "casa_imagermode": "csclean",
  "ms_dec": "-30d0m0s",
  "moresane_minorloopmiter": 50,
  "use_default_im": true,
  "casa_nterms": 1,
  "ms_dtime": 10,
  "moresane_enforcepositivity": false,
  "moresane": false,
  "add_noise": true,
  "wsclean_multiscale_dash_scale_dash_bias": 0.6,
  "moresane_sigmalevel": 3.0,
  "moresane_stopscale": 20,
  "casa_restoringbeam": "",
  "casa": false,
  "wsclean_mgain": 0.9,
  "wsclean_joinchannels": false,
  "imager": "CASA",
  "vis_noise_std": 0.0,
  "moresane_startscale": 1,
  "lwimager_cyclespeedup": -1.0,
  "lwimager_sigmalevel": 0.0,
  "observatory": "MeerKAT",
  "wsclean_smallpsf": false,
  "sky_type": "Tigger-LSM",
  "casa_gain": 0.1
}