aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/webui/templates/configs.html
blob: 2c6aaf6ca4d322127ca9071e963ac2fe364d7c63 (plain)
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
{#
 # Copyright (c) 2016 Weitian LI <liweitianux@live.com>
 # MIT license
 #
 # Configuration part
 #}
<section id="configs" class="container target">
  <h2>Configurations</h2>
  <hr />

  <!-- Configuration Form -->
  <form id="conf-form" class="form-inline">
    <!-- General controlling configs -->
    <fieldset id="conf-control">
      <div class="row">
        <div class="column column-50 form-group">
          <label for="conf-workdir">Working Directory:</label>
          <input class="form-control" type="text" id="conf-workdir" name="workdir" />
        </div>
        <div class="column column-40 form-group">
          <label for="conf-configfile">Configuration File:</label>
          <input class="form-control" type="text" id="conf-configfile" name="configfile" />
        </div>
      </div>
      <div class="text-center">
        <!-- NOTE: HTML5 "button" element has a default behavior of submit.
             Credit: https://stackoverflow.com/a/10836076/4856091
           -->
        <button type="button" class="button-small" id="reset-defaults"><span class="fa fa-undo" aria-hidden="true"></span> Reset to Defaults</button>
        <button type="button" class="button-small" id="load-configfile"><span class="fa fa-download" aria-hidden="true"></span> Load from Configuration File</button>
        <button type="button" class="button-small" id="save-configfile"><span class="fa fa-save" aria-hidden="true"></span> Save to Configuration File</button>
      </div>
    </fieldset>

    <!-- Configuration section "[common]" -->
    <fieldset id="conf-common">
      <h4>Common</h4>
      <hr class="hr-thin hr-condensed hr-dashed" />
      <div class="row">
        <div class="column column-30 form-group">
          <label for="conf-common-nside"><i>N</i><sub>side</sub>:</label>
          <input class="form-control" type="number" id="conf-common-nside" name="common/nside" />
        </div>
        <div class="column column-30 form-group">
          <label for="conf-common-lmin"><i>l</i><sub>min</sub>:</label>
          <input class="form-control" type="number" id="conf-common-lmin" name="common/lmin" />
        </div>
        <div class="column column-30 form-group">
          <label for="conf-common-lmax"><i>l</i><sub>max</sub>:</label>
          <input class="form-control" type="number" id="conf-common-lmax" name="common/lmax" />
        </div>
      </div>
      <div class="row">
        <fieldset id="conf-common-components" class="column checkboxes">
          <!-- XXX: cannot inline if use "legend" tag -->
          <label class="legend">Components:</label>
          <div class="form-group">
            <input class="form-control" type="checkbox" id="conf-common-components-gsync" name="common/components" value="galactic/synchrotron" />
            <label for="conf-common-components-gsync">galactic/synchrotron</label>
          </div>
          <div class="form-group">
            <input class="form-control" type="checkbox" id="conf-common-components-gfree" name="common/components" value="galactic/freefree" />
            <label for="conf-common-components-gsync">galactic/freefree</label>
          </div>
          <div class="form-group">
            <input class="form-control" type="checkbox" id="conf-common-components-gsnr" name="common/components" value="galactic/freefree" />
            <label for="conf-common-components-gsync">galactic/snr</label>
          </div>
          <div class="form-group">
            <input class="form-control" type="checkbox" id="conf-common-components-egcluster" name="common/components" value="extragalactic/clusters" />
            <label for="conf-common-components-gsync">extragalactic/clusters</label>
          </div>
        </fieldset>
      </div>
    </fieldset>

    <!-- Configuration section "[frequency]" -->
    <fieldset id="conf-frequency">
      <h4>Frequency</h4>
      <hr class="hr-thin hr-condensed hr-dashed" />
      <div class="row">
        <div class="column column-30 form-group">
          <label for="conf-frequency-unit">Unit:</label>
          <input class="form-control" type="text" id="conf-frequency-unit" name="frequency/unit" />
        </div>
      </div>
      <div class="row">
        <fieldset id="conf-frequency-type" class="column radios">
          <!-- XXX: cannot inline if use "legend" tag -->
          <label class="legend">Type:</label>
          <div class="form-group">
            <input class="form-control" type="radio" id="conf-frequency-type-custom" name="frequency/type" value="custom" />
            <label for="conf-frequency-type-custom">custom</label>
          </div>
          <div class="form-group">
            <input class="form-control" type="radio" id="conf-frequency-type-calc" name="frequency/type" value="calc" />
            <label for="conf-frequency-type-calc">calculate</label>
          </div>
        </fieldset>
      </div>
      <div class="row">
        <div class="column column-60 form-group">
          <label for="conf-frequency-frequencies">Custom Frequencies:</label>
          <input class="form-control" type="text" id="conf-frequency-frequencies" name="frequency/frequencies" placeholder="comma-separated list of frequencies" />
        </div>
      </div>
      <div class="row">
        <fieldset id="conf-frequency-calc" class="column">
          <!-- XXX: cannot inline if use "legend" tag -->
          <label class="legend">Calculate Frequencies:</label>
          <div class="form-group">
            <label class="sr-only" for="conf-frequency-strat">Start</label>
            <input class="form-control" type="number" id="conf-frequency-start" name="frequency/start" placeholder="start frequency" />
          </div>
          <div class="form-group">
            <label class="sr-only" for="conf-frequency-stop">Stop</label>
            <input class="form-control" type="number" id="conf-frequency-stop" name="frequency/stop" placeholder="stop frequency" />
          </div>
          <div class="form-group">
            <label class="sr-only" for="conf-frequency-step">Step</label>
            <input class="form-control" type="number" id="conf-frequency-step" name="frequency/step" placeholder="frequency step" />
          </div>
        </fieldset>
      </div>
    </fieldset>

    <!-- Configuration section "[output]" -->
    <fieldset id="conf-output">
      <h4>Output</h4>
      <hr class="hr-thin hr-condensed hr-dashed" />
      <div class="row">
        <div class="column column-30 form-group">
          <label for="conf-output-unit">Unit:</label>
          <input class="form-control" type="text" id="conf-output-unit" name="output/unit" />
        </div>
      </div>
      <div class="row">
        <fieldset id="conf-output-filetype" class="column radios">
          <!-- XXX: cannot inline if use "legend" tag -->
          <label class="legend">File Type:</label>
          <div class="form-group">
            <input class="form-control" type="radio" id="conf-output-filetype-fits" name="output/filetype" value="fits" checked="checked" />
            <label for="conf-output-filetype-fits">FITS</label>
          </div>
        </fieldset>
      </div>
      <div class="row">
        <div class="column column-50 form-group">
          <label for="conf-output-filename-pattern">Filename Pattern:</label>
          <input class="form-control" type="text" id="conf-output-filename-pattern" name="output/filename_pattern" />
        </div>
      </div>
      <div class="row">
        <div class="column form-group">
          <input class="form-control" type="checkbox" id="conf-output-use-float" name="output/use_float" value="true" checked="checked" />
          <label for="conf-output-use-float">Use single-precision float instead of double</label>
        </div>
      </div>
      <div class="row">
        <div class="column form-group">
          <input class="form-control" type="checkbox" id="conf-output-checksum" name="output/checksum" value="true" />
          <label for="conf-output-checksum">Calculate the checksum for output files</label>
        </div>
      </div>
      <div class="row">
        <div class="column form-group">
          <input class="form-control" type="checkbox" id="conf-output-clobber" name="output/clobber" value="true" />
          <label for="conf-output-clobber">Overwrite existing files</label>
        </div>
      </div>
      <div class="row">
        <div class="column form-group">
          <input class="form-control" type="checkbox" id="conf-output-combine" name="output/combine" value="true" />
          <label for="conf-output-combine">Add all components and save the combined maps</label>
        </div>
      </div>
      <div class="row">
        <div class="column form-group">
          <label for="conf-output-combine-prefix">Combined Filename Prefix:</label>
          <input class="form-control" type="text" id="conf-output-combine-prefix" name="output/combine_prefix" />
        </div>
      </div>
      <div class="row">
        <div class="column form-group">
          <label for="conf-output-outdir">Combined Files Output Directory:</label>
          <input class="form-control" type="text" id="conf-output-outdir" name="output/output_dir" />
        </div>
      </div>
    </fieldset>

    <!-- Configuration section "[cosmology]" -->
    <fieldset id="conf-cosmology">
      <h4>Cosmology</h4>
      <hr class="hr-thin hr-condensed hr-dashed" />
      <div class="row">
        <div class="column column-50 form-group">
          <label for="conf-cosmology-h0">Hubble Parameter (<i>H</i><sub>0</sub>):</label>
          <input class="form-control" type="number" id="conf-cosmology-h0" name="cosmology/H0" />
        </div>
        <div class="column column-50 form-group">
          <label for="conf-cosmology-omegam0">Matter Density (<i>Ω</i><sub>M0</sub>):</label>
          <input class="form-control" type="number" id="conf-cosmology-omegam0" name="cosmology/OmegaM0" />
        </div>
      </div>
    </fieldset>

    <!-- Configuration section "[logging]" -->
    <fieldset id="conf-logging">
      <h4>Logging</h4>
      <hr class="hr-thin hr-condensed hr-dashed" />
      <div class="row">
        <fieldset id="conf-logging-level" class="column radios">
          <!-- XXX: cannot inline if use "legend" tag -->
          <label class="legend">Level:</label>
          <div class="form-group">
            <input class="form-control" type="radio" id="conf-logging-level-debug" name="logging/level" value="DEBUG" />
            <label for="conf-logging-level-debug">debug</label>
          </div>
          <div class="form-group">
            <input class="form-control" type="radio" id="conf-logging-level-info" name="logging/level" value="INFO" checked="checked" />
            <label for="conf-logging-level-info">info</label>
          </div>
          <div class="form-group">
            <input class="form-control" type="radio" id="conf-logging-level-warning" name="logging/level" value="WARNING" />
            <label for="conf-logging-level-warning">warning</label>
          </div>
          <div class="form-group">
            <input class="form-control" type="radio" id="conf-logging-level-error" name="logging/level" value="ERROR" />
            <label for="conf-logging-level-error">error</label>
          </div>
          <div class="form-group">
            <input class="form-control" type="radio" id="conf-logging-level-critical" name="logging/level" value="CRITICAL" />
            <label for="conf-logging-level-critical">critical</label>
          </div>
        </fieldset>
      </div>
      <div class="row">
        <div class="column form-group">
          <label for="conf-logging-format">Message Format:</label>
          <input class="form-control" type="text" id="conf-logging-format" name="logging/format" />
        </div>
      </div>
      <div class="row">
        <div class="column form-group">
          <label for="conf-logging-datefmt">Date/time Format:</label>
          <input class="form-control" type="text" id="conf-logging-datefmt" name="logging/datefmt" />
        </div>
      </div>
      <div class="row">
        <div class="column">
          <div class="form-group">
            <label for="conf-logging-logfile">Log File:</label>
            <input class="form-control" type="text" id="conf-logging-logfile" name="logging/filename" />
          </div>
          <div class="form-group">
            <input class="form-control" type="checkbox" id="conf-logging-logfile-append" name="logging/filemode" value="a" checked="checked" />
            <label for="conf-logging-logfile-append">Append mode</label>
          </div>
        </div>
      </div>
    </fieldset>

    <!-- Configuration section "[galactic]" -->
    <fieldset id="conf-g">
      <h4>Galactic Components</h4>
      <hr class="hr-thin hr-condensed hr-dashed" />

      <!-- Configuration sub-section "[galactic][synchrotron]" -->
      <fieldset id="conf-g-synchrotron">
        <h5>Synchrotron Emission</h5>
        <div class="row">
          <div class="column column-40 form-group">
            <label for="conf-g-synchrotron-template">Template Map:</label>
            <input class="form-control" type="text" id="conf-g-synchrotron-template" name="galactic/synchrotron/template" />
          </div>
          <div class="column column-30 form-group">
            <label for="conf-g-synchrotron-template-freq">Frequency:</label>
            <input class="form-control" type="number" id="conf-g-synchrotron-template-freq" name="galactic/synchrotron/template_freq" placeholder="MHz" />
          </div>
          <div class="column column-30 form-group">
            <label for="conf-g-synchrotron-template-unit">Unit:</label>
            <input class="form-control" type="text" id="conf-g-synchrotron-template-unit" name="galactic/synchrotron/template_unit" />
          </div>
        </div>
        <div class="row">
          <div class="column column-40 form-group">
            <label for="conf-g-synchrotron-indexmap">Spectral Index Map:</label>
            <input class="form-control" type="text" id="conf-g-synchrotron-indexmap" name="galactic/synchrotron/indexmap" />
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <input class="form-control" type="checkbox" id="conf-g-synchrotron-smallscales" name="galactic/synchrotron/add_smallscales" value="true" checked="checked" />
            <label for="conf-g-synchrotron-smallscales">Add fluctuations on the small scales based on the angular power spectrum</label>
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <input class="form-control" type="checkbox" id="conf-g-synchrotron-save" name="galactic/synchrotron/save" value="true" checked="checked" />
            <label for="conf-g-synchrotron-save">Save this component standalone</label>
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <label for="conf-g-synchrotron-prefix">Filename Prefix:</label>
            <input class="form-control" type="text" id="conf-g-synchrotron-prefix" name="galactic/synchrotron/prefix" />
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <label for="conf-g-synchrotron-outdir">Output Directory:</label>
            <input class="form-control" type="text" id="conf-g-synchrotron-outdir" name="galactic/synchrotron/output_dir" />
          </div>
        </div>
      </fieldset>

      <!-- Configuration sub-section "[galactic][freefree]" -->
      <fieldset id="conf-g-freefree">
        <h5>Free-free Emission</h5>
        <div class="row">
          <div class="column column-40 form-group">
            <label for="conf-g-freefree-halphamap">Hα Template Map:</label>
            <input class="form-control" type="text" id="conf-g-freefree-halphapam" name="galactic/freefree/halphamap" />
          </div>
          <div class="column column-30 form-group">
            <label for="conf-g-freefree-halphamap-unit">Unit:</label>
            <input class="form-control" type="text" id="conf-g-freefree-halphamap-unit" name="galactic/freefree/halphamap_unit" />
          </div>
        </div>
        <div class="row">
          <div class="column column-40 form-group">
            <label for="conf-g-freefree-dustmap">Dust Template Map:</label>
            <input class="form-control" type="text" id="conf-g-freefree-dustmap" name="galactic/freefree/dustmap" />
          </div>
          <div class="column column-30 form-group">
            <label for="conf-g-freefree-dustmap-unit">Unit:</label>
            <input class="form-control" type="text" id="conf-g-freefree-dustmap-unit" name="galactic/freefree/dustmap_unit" />
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <input class="form-control" type="checkbox" id="conf-g-freefree-save" name="galactic/freefree/save" value="true" checked="checked" />
            <label for="conf-g-freefree-save">Save this component standalone</label>
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <label for="conf-g-freefree-prefix">Filename Prefix:</label>
            <input class="form-control" type="text" id="conf-g-freefree-prefix" name="galactic/freefree/prefix" />
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <label for="conf-g-freefree-outdir">Output Directory:</label>
            <input class="form-control" type="text" id="conf-g-freefree-outdir" name="galactic/freefree/output_dir" />
          </div>
        </div>
      </fieldset>

      <!-- Configuration sub-section "[galactic][snr]" -->
      <fieldset id="conf-g-snr">
        <h5>Supernova Remnants Emission</h5>
        <div class="row">
          <div class="column column-50 form-group">
            <label for="conf-g-snr-catalog">Input Catalog:</label>
            <input class="form-control" type="text" id="conf-g-snr-catalog" name="galactic/snr/catalog" />
          </div>
          <div class="column column-50 form-group">
            <label for="conf-g-snr-catalog-out">Output Catalog:</label>
            <input class="form-control" type="text" id="conf-g-snr-catalog-out" name="galactic/snr/catalog_outfile" />
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <label for="conf-g-snr-resolution">Grid Resolution:</label>
            <input class="form-control" type="number" id="conf-g-snr-resolution" name="galactic/snr/resolution" placeholder="arcmin" />
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <input class="form-control" type="checkbox" id="conf-g-snr-save" name="galactic/snr/save" value="true" checked="checked" />
            <label for="conf-g-snr-save">Save this component standalone</label>
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <label for="conf-g-snr-prefix">Filename Prefix:</label>
            <input class="form-control" type="text" id="conf-g-snr-prefix" name="galactic/snr/prefix" />
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <label for="conf-g-snr-outdir">Output Directory:</label>
            <input class="form-control" type="text" id="conf-g-snr-outdir" name="galactic/snr/output_dir" />
          </div>
        </div>
      </fieldset>
    </fieldset>

    <!-- Configuration section "[extragalactic]" -->
    <fieldset id="conf-eg">
      <h4>Extragalactic Components</h4>
      <hr class="hr-thin hr-condensed hr-dashed" />

      <!-- Configuration sub-section "[extragalactic][clusters]" -->
      <fieldset id="conf-eg-clusters">
        <h5>Clusters of Galaxies Emission</h5>
        <div class="row">
          <div class="column column-50 form-group">
            <label for="conf-eg-clusters-catalog">Input Catalog:</label>
            <input class="form-control" type="text" id="conf-eg-clusters-catalog" name="extragalactic/clusters/catalog" />
          </div>
          <div class="column column-50 form-group">
            <label for="conf-eg-clusters-catalog-out">Output Catalog:</label>
            <input class="form-control" type="text" id="conf-eg-clusters-catalog-out" name="extragalactic/clusters/catalog_outfile" />
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <label for="conf-eg-clusters-halo-fraction">Halo Fraction:</label>
            <input class="form-control" type="number" id="conf-eg-clusters-halo-fraction" name="extragalactic/clusters/halo_fraction" />
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <label for="conf-eg-clusters-resolution">Grid Resolution:</label>
            <input class="form-control" type="number" id="conf-eg-clusters-resolution" name="extragalactic/clusters/resolution" placeholder="arcmin" />
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <input class="form-control" type="checkbox" id="conf-eg-clusters-save" name="extragalactic/clusters/save" value="true" checked="checked" />
            <label for="conf-eg-clusters-save">Save this component standalone</label>
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <label for="conf-eg-clusters-prefix">Filename Prefix:</label>
            <input class="form-control" type="text" id="conf-eg-clusters-prefix" name="extragalactic/clusters/prefix" />
          </div>
        </div>
        <div class="row">
          <div class="column form-group">
            <label for="conf-eg-clusters-outdir">Output Directory:</label>
            <input class="form-control" type="text" id="conf-eg-clusters-outdir" name="extragalactic/clusters/output_dir" />
          </div>
        </div>
      </fieldset>
    </fieldset>
  </form>
</section>