Parameters

All user-definable analysis parameters in BayesEoR are handled via the bayeseor.params.BayesEoRParser class:

class bayeseor.params.BayesEoRParser

Class used to parse command line arguments.

For more information on the command line syntax, please see

python run-analysis.py --help
useGPU

Use GPUs (’–gpu’, True) or CPUs (’–cpu’, False). Defaults to True (use GPUs).

Type:

bool, optional

single_node

Run an analysis on a single node or with an MPI size of 1. Defaults to False (do not run an analysis if MPI size is 1).

Type:

bool, optional

array_dir_prefix

Directory for matrix storage. Defaults to ‘./array-storage’.

Type:

str, optional

sparse_mats

Use sparse matrices (’–sparse-mats’, True) to reduce storage requirements or dense matrices (’–dense-mats’, False). Defaults to True (use sparse matrices).

Type:

bool, optional

overwrite_matrices

Overwrite existing matrix stack. Defaults to False (use existing matrix stack).

Type:

bool, optional

log_priors

Assume priors on power spectrum coefficients are in log_10 units (’–log-priors’, True) or linear units (’–lin-priors’, False). Defaults to True.

Type:

bool, optional

uprior_bins

Array indices of k-bins using a uniform prior. All other bins use the default log-uniform prior. Follows python slicing syntax. Can pass a range via ‘1:4’ (non-inclusive high end), a list of indices via ‘1,4,6’ (no spaces between commas), a single index ‘3’ or ‘-3’, or ‘all’. Defaults to an empty string (all k-bins use log-uniform priors).

Type:

str, optional

output_dir

Directory for sampler output. Defaults to ‘./chains/’.

Type:

str, optional

file_root

If None (default), start a new analysis. Otherwise, resume analysis from file_root.

Type:

str, optional

use_Multinest

Use MultiNest (’–multinest’, True) or Polychord (’–polychord’, False) as the sampler. Defaults to True (use MultiNest). Using Polychord is advised for large parameter spaces.

Type:

bool, optional

verbose

Print info/timing statements from posterior probability calulations. Defaults to False.

Type:

bool, optional

nf

Number of frequency channels.

Type:

int

neta

Number of line-of-sight Fourier modes. Defaults to nf.

Type:

int

freq_min

Minimum frequency in megahertz.

Type:

float

delta_freq

Frequency channel width in megahertz.

Type:

float

nside

HEALPix resolution parameter. Sets the resolution of the sky model. Note, the HEALPix resolution must be chosen such that there are two HEALPix pixels per minimum fringe wavelength from the model uv-plane to satisfy the Nyquist-Shannon sampling theorem.

Type:

int, optional

simple_za_filter

Filter pixels in the sky model by zenith angle only (True). Otherwise, filter pixels in a rectangular region set by the field of view values along the RA and Dec axes (False, default).

Type:

bool, optional

nu

Number of pixels on the u-axis of the model uv-plane for the EoR model.

Type:

int

nv

Number of pixels on the v-axis of the model uv-plane for the EoR model.

Type:

int, optional

fov_ra_eor

Field of view (FoV) of the Right Ascension (RA) axis of the EoR sky model in degrees.

Type:

float

fov_dec_eor

FoV of the Declination (Dec) axis of the EoR sky model in degrees. Defaults to the value of fov_ra_eor (square FoV).

Type:

float, optional

nu_fg

Number of pixels on the u-axis of the model uv-plane for the foreground (FG) model. Defaults to the value of nu.

Type:

int, optional

nv_fg

Number of pixels on the v-axis of the model uv-plane for the FG model. Defaults to the value of nu_fg or nv if nu_fg is not defined.

Type:

int, optional

fov_ra_fg

FoV of the RA axis of the FG sky model in degrees. Defaults to the value of fov_ra_eor.

Type:

float, optional

fov_dec_fg

FoV of the Dec axis of the FG sky model in degrees. Defaults to the value of fov_ra_fg or fov_dec_eor if fov_ra_fg is not defined.

Type:

float, optional

fit_for_monopole

Include (True) or exclude (False) the (u, v) == (0, 0) pixel in the model uv-plane. Defaults to False.

Type:

bool, optional

nq

Number of Large Spectral Scale Model (LSSM) quadratic basis vectors. If passing beta, the quadratic basis vectors are replaced by power law basis vectors according to the spectral indices in beta.

Type:

int, optional

beta

Brightness temperature power law spectral index/indices used in the LSSM. Can be a single spectral index, ‘[2.63]’, or multiple spectral indices can be passed, ‘[2.63,2.82]’, to use multiple power law spectral basis vectors. Do not put spaces after commas if using multiple spectral indices.

Type:

list of float, optional

inverse_LW_power

Prior on the inverse power of the LSSM coefficients. A large value, 1e16, constrains the LSSM coefficients to be zero. A small value, 1e-16, leaves the LSSM coefficients unconstrained (default).

Type:

float, optional

use_LWM_Gaussian_prior

Use a Gaussian prior on the LSSM (True, NOT CURRENTLY IMPLEMENTED). Otherwise, use a uniform prior (False, default).

Type:

bool, optional

fit_for_spectral_model_parameters

Fit for the optimal LSSM spectral indices.

Type:

bool, optional

pl_min

Minimum brightness temperature spectral index when fitting for the optimal LSSM spectral indices.

Type:

float, optional

pl_max

Maximum brightness temperature spectral index when fitting for the optimal LSSM spectral indices.

Type:

float, optional

pl_grid_spacing

Grid spacing for the power law spectral index axis when fitting for the optimal LSSM spectral indices.

Type:

float, optional

sigma

Standard deviation of the visibility noise. Only used if adding noise to the input visibility data. If inputing noise along with the data, sigma is calculated from the noise directly.

Type:

float, optional

noise_seed

Seed for numpy.random. Used to generate the noise vector if adding noise to the input visibility data. Defaults to 742123.

Type:

float, optional

fit_noise

If True, fit for the noise level. Defaults to False.

Type:

bool, optional

model_instrument

Forward model an instrument (’–model-instrument’, True) or exclude instrumental effects (’–no-instrument’, False).

Type:

bool, optional

nt

Number of times/observations.

Type:

int

integration_time_seconds

Time between observations in seconds.

Type:

float

inst_model

Path to a numpy compatible dictionary containing the instrument model. A valid instrument model contains the uv-sampling with shape (Ntimes, Nbls, 3) accessible via the key ‘uvw_model’ and a redundancy array to account for any redundant averaging with shape (Ntimes, Nbls, 1) accessible via the key ‘redundancy_model’.

Type:

str, optional

tele_latlonalt

Telescope location in latitude (deg), longitude (deg), and altitude (meters). Passed as a list of floats, e.g. ‘[30.1,125.6,80.4]’. Do not put spaces after commas. Defaults to the HERA telescope location.

Type:

list of float, optional

central_jd

Central Julian Date of the observations.

Type:

float

beam_type

Can be ‘uniform’, ‘gaussian’, or ‘airy’ (case insensitive).

Type:

str

beam_peak_amplitude

Peak amplitude of the beam. Defaults to 1.0.

Type:

float, optional

beam_center

Beam center offsets from the phase center in RA and Dec in degrees. Default behavior is the beam center aligns with the phase center. Passed as a list of floats, e.g. ‘[-1.3,0.01]’. Do not put a space after the comma.

Type:

list of float, optional

drift_scan

Model the instrument in drift scan mode (’–drift-scan’, True) or in phased mode (’–phased’, False). Defaults to True (drift scan mode).

Type:

bool, optional

fwhm_deg

Full Width at Half Maximum (FWHM) of beam in degrees.

Type:

float, optional

antenna_diameter

Antenna diameter in meters.

Type:

float, optional

cosfreq

Cosine frequency if using a ‘gausscosine’ beam.

Type:

float, optional

achromatic_beam

If True, force the beam to be achromatic. The frequency at which the beam will be calculated is set via beam_ref_freq.

Type:

bool, optional

beam_ref_freq

Beam reference frequency in megahertz. Defaults to the minimum frequency.

Type:

bool, optional

nu_sh

Number of pixels on a side for the u-axis in the SubHarmonic Grid (SHG) model uv-plane.

Type:

int, optional

nv_sh

Number of pixels on a side for the v-axis in the SHG model uv-plane. Defaults to the value of nu_sh.

Type:

int, optional

nq_sh

Number of LSSM quadratic modes for the SHG.

Type:

int, optional

fot_for_shg_amps

If True, fit for the amplitudes of the SHG pixels. Defaults to False.

Type:

bool, optional

taper_func

Tapering function to apply to the frequency axis of the model visibilities. Can be any valid argument to scipy.signal.windows.get_window.

Type:

str, optional

data_path

Path to numpy readable visibility data file in units of mK sr.

Type:

str, optional

noise_data_path

Path to noise file associated with data_path.

Type:

str, optional

eor_sim_path

Path to 21cmFAST EoR simulation cube.

Type:

str, optional

eor_random_seed

Used to seed numpy.random if generating a mock EoR white noise signal, i.e. passing no data file via ‘–data-path’.

Type:

int, optional

config

Path to a yaml configuration file parsable by jsonargparse.ArgumentParser.

Type:

str, optional

Setting Parameters

The jsonargparse package allows for all of these parameters to be set via the command line or a yaml configuration file. An example yaml file has been provided (example-config.yaml)

# Compute params
useGPU: True
single_node: True
# Frequency params
nf: 38
nu_min_MHz: 158.304048743
channel_width_MHz: 0.237618986858
# EoR model params
nu: 15
fov_ra_eor: 12.9080728652
nside: 128
# Noise params
sigma: 0.00615864342588761
# Instrument model params
include_instrumental_effects: True
nt: 34
integration_time_seconds: 11.0
inst_model: ./test_data/
central_jd: 2458098.3065661727
beam_type: gaussian
fwhm_deg: 9.306821090681533
# Data params
data_path: ./test_data/visibilities.npy
# Prior params
priors: [[-2.0, 2.0], [-1.2, 2.8], [-0.7, 3.3], [0.7, 2.7], [1.1, 3.1],
         [1.5, 3.5], [2.0, 4.0], [2.4, 4.4], [2.7, 4.7]]

Any variable that can be set via a command line argument can also be set in this yaml configuration file (command line arguments containing dashes in the variable name must be replaced with underscores, i.e. the command line argument --data-path can be set in the configuration file via data_path: "/path/to/data.npy"). The example configuration file also specifies the minimally sufficient variables that must be set for a BayesEoR analysis.

The command line interface in BayesEoR uses several classes from the jsonargparse package, notably the ArgumentParser and ActionYesNo classes. For more information on these classes, please refer to the jsonargparse documentation.