Parameters
The zdm package uses a hierarchical parameter system organized into
dataclasses. All parameters are accessible through the State
object.
State Object
The State object is the central configuration container:
from zdm import parameters
state = parameters.State()
# Access parameter groups
print(state.cosmo.H0) # Cosmology parameters
print(state.energy.gamma) # Energy parameters
print(state.host.lmean) # Host galaxy parameters
Updating Parameters
Single parameter update:
state.update_param('H0', 70.0)
Multiple parameter update via dictionary:
vparams = {
'cosmo': {'H0': 70.0},
'energy': {'gamma': -1.1}
}
state.update_param_dict(vparams)
Cosmology Parameters (cosmo)
Parameters for Lambda-CDM cosmology. Default values from Planck18.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
67.66 |
km/s/Mpc |
Hubble constant |
|
0.0 |
– |
Curvature density parameter |
|
0.6889 |
– |
Dark energy density parameter |
|
0.3111 |
– |
Matter density parameter |
|
0.0490 |
– |
Baryon density parameter |
|
0.0224 |
– |
Baryon density times h^2 |
|
True |
– |
Keep Omega_b_h2 fixed when varying H0 |
FRB Demographics Parameters (FRBdemo)
Parameters controlling FRB source population evolution.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
0 |
– |
Evolution function: 0=SFR^n, 1=(1+z)^(2.7n) |
|
1 |
– |
Scaling method: 0=k-correction, 1=rate interpretation |
|
1.77 |
– |
Scaling of FRB rate with star-formation rate |
|
3.3249 |
– |
log10 rate constant (Gpc^-3 day^-1 at z=0) |
Energy Parameters (energy)
Parameters for the FRB luminosity/energy function.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
30.0 |
log10(erg) |
Minimum FRB energy |
|
41.84 |
log10(erg) |
Maximum FRB energy |
|
1.54 |
– |
Spectral index (rate ~ nu^alpha) |
|
-1.16 |
– |
Luminosity function slope |
|
2 |
– |
LF type: 0=power-law, 1=gamma, 2=spline+gamma, 3=gamma+linear+log10 |
Host Galaxy Parameters (host)
Parameters for the host galaxy DM contribution.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
2.16 |
log10(pc/cm^3) |
Log-mean of host DM distribution |
|
0.51 |
log10(pc/cm^3) |
Log-sigma of host DM distribution |
Milky Way Parameters (MW)
Parameters for Galactic DM contributions.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
35.0 |
pc/cm^3 |
Assumed DM for Galactic ISM |
|
50.0 |
pc/cm^3 |
DM contribution from Galactic halo |
|
0 |
– |
Halo model: 0=uniform, 1=Yamasaki & Totani, 2=Das+ |
|
0.0 |
– |
Fractional uncertainty in Galactic ISM DM |
|
15.0 |
pc/cm^3 |
Uncertainty in halo DM |
|
False |
– |
Use log-normal for DMG distributions |
IGM Parameters (IGM)
Parameters for the intergalactic medium DM distribution.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
-0.49 |
– |
log10(F), cosmic web fluctuation parameter |
Width Parameters (width)
Parameters for intrinsic FRB width distribution.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
-0.29 |
log10(ms) |
Log-mean of intrinsic width distribution |
|
0.65 |
log10(ms) |
Log-sigma of intrinsic width distribution |
|
2 |
– |
Width method: 0=ignore, 1=intrinsic, 2=+scattering, 3=+z-dep, 4=specific |
|
2 |
– |
Width function: 0=log-constant, 1=log-normal, 2=half-lognormal |
|
12 |
– |
Number of width bins |
|
0.5 |
– |
Starting fraction for width histogramming |
Scattering Parameters (scat)
Parameters for FRB scattering distribution.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
-1.3 |
log10(ms) |
Mean of log-scattering distribution at 600 MHz |
|
0.2 |
log10(ms) |
Sigma of log-scattering distribution |
|
1000 |
MHz |
Reference frequency for scattering |
|
-4.0 |
– |
Frequency scaling power-law index |
|
2 |
– |
Scattering function: 0=log-constant, 1=lognormal, 2=half-lognormal |
|
False |
– |
Calculate p(tau|w,DM,z) arrays |
Repeater Parameters (rep)
Parameters for repeating FRB population models.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
-3.0 |
log10(day^-1) |
Minimum repeater rate |
|
1.0 |
log10(day^-1) |
Maximum repeater rate |
|
-2.375 |
– |
Differential index of repeater density |
|
0.01 |
– |
Constant repeater density |
|
1e39 |
erg |
Energy at which rates are defined |
Analysis Parameters (analysis)
Parameters controlling analysis behavior.
Parameter |
Default |
Unit |
Description |
|---|---|---|---|
|
True |
– |
Generate new z-DM grids |
|
“Std” |
– |
Calculation detail: “Full” or “Std” |
|
-1.0 |
degrees |
Minimum absolute Galactic latitude |
|
None |
pc/cm^3 |
Maximum DMG to include |