fgbuster.observation_helpers¶
Handy access to instrument configuration, map generation and other pysm3 functionalities
Functions
|
Get a pre-defined instrumental configuration |
|
Generate noise maps for the instrument |
|
Get a pre-defined instrumental configuration |
|
Get a pre-defined PySM sky |
|
-
fgbuster.observation_helpers.
get_sky
(nside, tag='c1d0s0')[source]¶ Get a pre-defined PySM sky
- Parameters
nside (int) – healpix nside of the sky templates
tag (string) – See the pysm documentation for a complete list of available options. Default is ‘c1d0s0’, i.e. cmb (c1), dust with constant temperature and spectral index (d0), and synchrotron with constant spectral index (s0).
- Returns
sky – See the pysm documentation
- Return type
pysm3.Sky
-
fgbuster.observation_helpers.
get_instrument
(tag='')[source]¶ Get a pre-defined instrumental configuration
- Parameters
tag (string) – name of the pre-defined experimental configurations. It can contain the name of multiple experiments separated by a space. Call the function with a random input to get the available instruments.
- Returns
instr – It contains the experimetnal configuration of the desired instrument(s).
- Return type
pandas.DataFrame
-
fgbuster.observation_helpers.
get_observation
(instrument='', sky=None, noise=False, nside=None, unit='uK_CMB')[source]¶ Get a pre-defined instrumental configuration
- Parameters
instrument –
It can be either a str (see
get_instrument()
) or an object that provides the following as a key or an attribute.frequency (required)
depth_p (required if
noise=True
)depth_i (required if
noise=True
)
They can be anything that is convertible to a float numpy array. If only one of
depth_p
ordepth_i
is provided, the other is inferred assuming that the former is sqrt(2) higher than the latter.sky (str of pysm3.Sky) – Sky to observe. It can be a pysm3.Sky or a tag to create one.
noise (bool) – If true, add Gaussian, uncorrelated, isotropic noise.
nside (int) – Desired output healpix nside. It is optional if sky is a pysm3.Sky, and required if it is a str or
None
.unit (str) – Unit of the output. Only K_CMB and K_RJ (and multiples) are supported.
- Returns
observation – Shape is
(n_freq, 3, n_pix)
- Return type
array
-
fgbuster.observation_helpers.
get_noise_realization
(nside, instrument, unit='uK_CMB')[source]¶ Generate noise maps for the instrument
- Parameters
nside (int) – Desired output healpix nside.
instrument –
Object that provides the following as a key or an attribute.
frequency (required)
depth_p (required if
noise=True
)depth_i (required if
noise=True
)
They can be anything that is convertible to a float numpy array. If only one of
depth_p
ordepth_i
is provided, the other is inferred assuming that the former is sqrt(2) higher than the latter.unit (str) – Unit of the output. Only K_CMB and K_RJ (and multiples) are supported.
sky (str of pysm3.Sky) – Sky to observe. It can be a pysm3.Sky or a tag to create one.
noise (bool) – If true, add Gaussian, uncorrelated, isotropic noise.
- Returns
observation – Shape is
(n_freq, 3, n_pix)
.- Return type
array