aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/configs/00-general.conf.spec
blob: baa7d5edd823a5190585e6010c053f706b68dae8 (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
# Configurations for "fg21sim"
# -*- mode: conf -*-
#
# Syntax: `ConfigObj`, https://github.com/DiffSK/configobj
#
# This file contains the general configurations, which control the general
# behaviors, or will be used in other configuration sections.


# Foreground components to be simulated
[foregrounds]
# Diffuse Galactic synchrotron emission (unpolarized)
galactic/synchrotron = boolean(default=False)

# Diffuse Galactic free-free emission
galactic/freefree = boolean(default=False)

# Galactic supernova remnants emission
galactic/snr = boolean(default=False)

#  Extragalactic clusters of galaxies emission
extragalactic/clusters = boolean(default=False)

# Emission from multiple types of extragalactic point sources
# NOTE: This component is not well integrated and tested at the moment
extragalactic/pointsources = boolean(default=False)


# Simulation sky/region configurations
[sky]
# Type of the input/output simulation sky
# + patch:
#       Input/output sky template is only a (square) patch of the sky.
#       The simulated output maps have the same coverage/field as the
#       input template, as well as the coordinate projection.
# + healpix:
#       Input/output sky template covers (almost) all sky, and stored
#       in HEALPix format.  The simulated output maps will also be
#       all-sky using the HEALPix projection.
type = option("patch", "healpix", default="patch")

  # Configurations for input/output sky patch
  [[patch]]
  # The (R.A., Dec.) coordinate of the sky patch center [deg]
  xcenter = float(default=0.0, min=0.0, max=360.0)
  ycenter = float(default=0.0, min=-90.0, max=90.0)

  xsize = integer(default=None, min=1)
  ysize = integer(default=None, min=1)
  # The image dimensions (i.e., number of pixels) of the sky patch,
  # along the X (R.A./longitude) and Y (Dec./latitude) axes.

  # Pixel size [ arcsec ]
  pixelsize = float(default=None, min=0.0)

  # Configurations for input/output HEALPix sky
  [[healpix]]
  # HEALPix Nside value, i.e., pixel resolution
  nside = integer(min=1, default=1024)


# Frequencies specification of the simulation products
[frequency]
# Unit of the frequency value
unit = option("MHz", default="MHz")

# How to specify the frequencies
# + custom:
#       directly specify the frequency values using the "frequencies" config
# + calc:
#       calculate the frequency values by "start", "stop", and "step"
type = option("custom", "calc", default="custom")

# The frequency values to be simulated if above "type" is "custom".
frequencies = float_list(default=list())

# Parameters to calculate the frequencies
# start and stop frequency value (both inclusive)
start = float(default=None, min=0.0)
stop = float(default=None, min=0.0)
step = float(default=None, min=0.0)


# Configuration for output products
[output]
# Unit of the sky map pixel value
unit = option("K", default="K")

# Use single-precision float instead of double (also save spaces)
use_float = boolean(default=True)

# Filename pattern for the output products, which will be finally
# formatted using `str.format()`.
filename_pattern = string(default="{prefix}_{frequency:06.2f}.fits")

# Whether calculate the checksum for the output file (e.g., "CHECKSUM"
# keyword in FITS header)?
# NOTE:
# FITS checksum calculation may account for half the time to output the data.
checksum = boolean(default=False)

# Whether overwrite existing files
clobber = boolean(default=False)

# Whether combine all components and output
combine = boolean(default=True)
# Prefix for the combined files
combine_prefix = string(default="fg")
# Output directory to place the combined products
# NOTE: This config is mandatory and should be provided by the user
#       if above "combine=True".
output_dir = string(default=None)

# Filename of the simulation products manifest (JSON format)
manifest = string(default="products_manifest.json")


# Cosmological parameters
[cosmology]
# Hubble constant at z=0 [ km/s/Mpc ]
H0 = float(default=71.0, min=0.0)
# Density of non-relativistic matter in units of the critical density at z=0
OmegaM0 = float(default=0.27, min=0.0, max=1.0)
# Density of the baryon at present day
Omegab0 = float(default=0.046, min=0.0, max=1.0)
# Present-day rms density fluctuations on a scale of 8 h^-1 Mpc
sigma8 = float(default=0.834, min=0.0)


# Configurations for initialization/reconfiguration of the `logging` module
[logging]
# DEBUG:    Detailed information, typically of interest only when diagnosing
#           problems.
# INFO:     Confirmation that things are working as expected.
# WARNING:  An dinciation that something unexpected happended, or indicative
#           of some problem in the near future (e.g., "disk space low").
#           The software is still working as expected.
# ERROR:    Due to a more serious problem, the software has not been able to
#           perform some function.
# CRITICAL: A serious error, indicating that the program itself may be unable
#           to continue running.
level = option("DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL", default="DEBUG")

# Set the format of displayed messages
format = string(default="%(asctime)s [%(levelname)s] <%(name)s> %(message)s")

# Set the date/time format in messages
datefmt = string(default="%Y-%m-%dT%H:%M:%S")

# Set the logging filename (will create a `FileHandler`)
# If set to "" (empty string), then the `FileHandler` will be disabled.
filename = string(default="")
# Whether append messages to the above logging file instead of overwrite
appendmode = boolean(default=True)

# Set the stream used to initialize the `StreamHandler`
# If set to "" (empty string), then the `StreamHandler` will be disabled.
stream = option("stderr", "stdout", "", default="stderr")