This page outlines the common usage of HMFcalc, along with information concerning the various parameters and options included. Much of this information is a modified rendition of this article, which accompanied the publishing of HMFcalc. Read on for information about common usage, the transfer function used, the cosmological parameters and the fitting functions.

Common Usage

HMFcalc is built to be easy to use. In the simplest example, the only action required on your part is to navigate to the calculator and click "Calculate!". All required options and parameters are filled with sensible defaults and ready to go. Nevertheless, most users will want to fiddle with the parameters to tune them to their particular needs -- be it a survey, simulation or investigation.

The options and parameters in HMFcalc were chosen to give as much flexibility as possible without making things overly complicated. They are split over two tabs in the calculator, one for general run parameters and options and the other for cosmological parameters.

Several of the input fields indicate that they require a comma-separated list. For these parameters, you may specify as many input values as you wish, and all possible combinations of all parameters will be calculated. This can multiply very quickly, and so we have placed an overall maximum on the number of calculations to ensure our server can handle it.

The exceptions to this rule are the cosmological parameters. These are treated as 'sets', in which the first entry for each parameter is taken as a set, and labeled with the first given label. If there is a second entry for any parameter, then all second entries are taken, along with the first entries of any parameters that only have one, and the second entry for the label. This carries on, with the number of labels equivalent to the largest number of entries for any parameter.

One more flexible field is the Custom Fitting Function. It takes a string representing an equation in python syntax, in terms of a variable x. The equation forms a desired fitting function, with x taking the role of the mass variance. No other explicit dependence may be included (such as redshift or overdensity), nor may the equation be multi-lined. It must be a single equation in terms of the single variable x. Future versions may include a generalisation of this feature if sufficient interest is shown.

There is a row of options titled "Optional Extra Plots" on the main tab. These are calculations that are not inherently performed along with the differential mass function calculation, but which many users may find useful. This is especially true of the cumulative mass function, N(>M), which is checked by default.

The primary focus of the cosmological parameters tab is the production of the transfer function, which we discuss in the next section.

Transfer Function

The transfer function is handled in one of three ways. It is either
  1. Previously computed at high resolution by CAMB and included as a default option.
  2. Previously computed by the user either with CAMB or saved in the same format as CAMB, and uploaded to HMFcalc
  3. Computed on-the-fly with arbitrary cosmological parameters.
We describe some of the details of each method in this section.
Pre-Computed High-Res Transfer

This is the default option. It is selected by choosing a popular cosmology from the "Transfer Function" drop-down list. Parameters of that cosmology that affect that transfer function in any way are internally set and made non-modifiable so that no confusion arises. Parameters that are relevant to the cosmology and prescribed in the relevant paper, but which do not affect the transfer function, are set by default to their proper values but are still modifiable.

This option does not allow the automatic generation of HMF's for several cosmologies, except for in the transfer-independent parameters, as only one default may be chosen at a time. However, you may use the "Add Extra Plots" feature after generating a HMF to add different default cosmologies.

As mentioned, each of the default cosmologies is a high-resolution transfer function from CAMB. In each case, all parameters of the run (and there are many) were the same, except for the cosmological parameters. The following table shows the values for each of the cosmologies, where each set of parameters was taken from a corresponding paper, linked from the heading. Note that the ns and σ8 are not used to calculate the transfer function within CAMB, but we list their values here for completeness.

Parameter Planck WMAP9 WMAP7 WMAP5 GiggleZ WMAP3 WMAP1 Millennium
ΩΛ 0.6817 0.7181 0.728 0.723 0.726 0.732 0.710 0.750
Ωc 0.2678 0.236 0.226 0.231 0.228 0.224 0.243 0.205
Ωb 0.049 0.0461 0.0455 0.0459 0.0456 0.044 0.047 0.045
ns 0.9619 0.9646 0.967 0.962 0.960 0.99 0.947 1
H0 67.04 69.7 0.704 0.702 0.705 0.704 0.72 0.73
σ8 0.8347 0.817 0.81 0.817 0.812 0.776 0.9 0.9

For completeness, we also list here the values of the other parameters used for the CAMB runs. Note that these are values used for the high-resolution default transfer functions. Where the on-the-fly runs differ from these, we note their value in parentheses. Parameters that do not affect the transfer function whatsoever are intentionally omitted here for brevity.
Parameter Value Parameter Value Parameter Value
Cl's Scalar get_transfer TRUE accurate_reionizationTRUE
Do lensing FALSE do_nonlinearLinear re_ionization_frac-1
do_tensor_neutrinosTRUE Scalar l_max 2000 RECFAST_fudge1.14
initial_ratio1 Scalar k*eta_max 4000 RECFAST_fudge_He0.86
Do_late_rad_truncationTRUE Use Physical Parameters FALSE RECFAST_Heswitch6
reionizationTrue cs2_lam 0 RECFAST_HswitchTRUE
high_accuracy_default1 temp_cmb2.725 Initial scalar Perturbation ModeAdiabatic
helium_fraction0.24 vector_mode0 l_accuracy_boost1
massless_neutrinos3.04 COBE_normalizeFALSE l_sample_boost2.725
massive_neutrinos0 CMB_outputscale1 massive_nu_approx1
nu_mass_eigenstates1 transfer_high_precisionTRUE Lensing MethodCurved Correlation Funtion
nu_mass_degeneracies0 Transfer_kmax2000 accurate_polarizationTRUE
nu_mass_fractions1 transfer_k_per_logint100 accurate_BBFALSE
scalar_amp1accuracy_boost1
User-Uploaded Transfer

To select this option, choose "Custom Transfer" from the "Transfer Function" drop-down list and then upload a file using the "Upload Transfer Function" tool. The user must be careful using this option. There is no way for HMFcalc to know what cosmology the uploaded transfer function was calculated with. The user must therefore be careful to set the correct corresponding parameters. Note that only parameters that affect both transfer and the mass function explicitly (see cosmological parameter table) need to be set accurately. Parameters affecting only the transfer function will not be used within HMFcalc, and parameters used only in HMFcalc will not be at odds with the transfer function. However, for later reference it is still better to set every parameter properly, as the parameters are written to file which may later be read. The file uploaded in this manner should be in the same format as a transfer function produced by CAMB. That is, it should consist of one column of k/h values, followed by 6 columns of transfer function values. The last column should be the total transfer function.

On-The-Fly Transfer

This option is selected if a custom transfer function is chosen, but no file is uploaded. In this case the user may choose a calculator to use. Currently only two options are available - CAMB and the Eisenstein-Hu transfer function (which is calculated using the cosmolopy package).

If CAMB is chosen as the calculator, HMFcalc only offers the cosmological parameters as input parameters to CAMB. All other parameters are taken as the defaults from the backend hmf package (listed in the camb parameters table). This is both to save computation time (the defaults are the most efficient to achieve requisite accuracy at high mass, see the linked article), and to avoid unnecessary clutter in the options.

Parameters

We have discussed already that the options and parameters of HMFcalc are split across two categories: run parameters and cosmological parameters. We here show two tables which outline the function of each parameter.

We first have the run parameters. In this table, the "Mult?" column specifies whether the given parameter accepts multiple entries (separated by commas).

Secondly we have the cosmological parameters. The "Affects" column specifies whether the parameter affects the transfer function (T), the HMF (H) or both (B).

Fitting Functions

One of the features of HMFcalc is its wide array of fitting functions from the literature. We aim to include any fit from the published literature that we find, and encourage you to contact us if you know of a fit which we have not included.

With such a list of available fits, it is perhaps useful to provide some short commentary on how to best choose among them for a specific purpose. We note that each fitting function is a fit to the distribution of halo masses found in a simulation (or set of simulations) with a particular cosmology, and using a particular halo-finder. Thus differences between fits can naturally arise from these choices, along with the evolution of resolution and size with time. Given these considerations, we give a few suggestions for choosing a fitting function:

  • Prefer functions measured at a similar cosmology to the one you employ
  • Generally choose a later function over an earlier one
  • If you are using a wide range of cosmologies, or want to remain as general as possible, prefer a function fitted over several cosmologies
  • Generally, for observational purposes, choose an SO fit, but for halo-model calculations choose an FOF fit.

To help weigh these considerations, we here provide the list of references for all fitting functions found in HMFcalc:

For a concise summary of the functional forms and respective properties of each fit, download this table, which will remain a standalone, updated version of Table 3 in the article describing HMFcalc.

Don't have or like Twitter? Send us an email, or raise a github issue.