hmpdf
One- and two-point PDFs within the halo model.
hmpdf_init.h File Reference
#include "hmpdf_object.h"
#include "hmpdf_configs.h"

Macros

#define hmpdf_init(...)   hmpdf_init_fct(__VA_ARGS__, hmpdf_end_configs)
 

Functions

int hmpdf_init_fct (hmpdf_obj *d, char *class_ini, hmpdf_signaltype_e stype,...)
 

Macro Definition Documentation

◆ hmpdf_init

#define hmpdf_init (   ...)    hmpdf_init_fct(__VA_ARGS__, hmpdf_end_configs)

Initializes the hmpdf_obj and computes data that is needed for all outputs. This is a convenience macro wrapping hmpdf_init_fct().

Parameters
[in,out]dcreated with hmpdf_new()
[in]class_inipath to a CLASS .ini file
[in]stypesignal type (either hmpdf_kappa or hmpdf_tsz)
[in]...variadic argument list for optional arguments
Returns
error code
Attention
if stype=hmpdf_kappa, the first entry in ... must be the source redshift (double)
Remarks
this function performs some basic sanity checks on the user inputs. If inputs fall out of recommended bounds, an error message will be printed. However, execution will continue (for the unlikely case the input was what you intended it to be).

The syntax to pass additional non-default settings through ... is as follows: A setting is passed as a pair <name>, <value>, where <name> is one of hmpdf_configs_e, and <value> must have the type given in the documentation for that specific <name>.

Attention
In this context, be careful with literals passed as <value>, as the compiler will be unable to figure out any necessary casts. For example, if passing a literal as hmpdf_N_signal, it needs to be an explicit long.

For example, to perform a weak lensing calculation with source redshift 1 and all configurations at default except for the number of threads and the pixel sidelength, you would call

hmpdf_init(d, "example.ini", hmpdf_kappa, 1.0,
Attention
perhaps counter-intuitively, successive hmpdf_init() calls are not cumulative (i.e. d retains no internal state between them). Thus, you need to pass all configuration options in a single call to hmpdf_init().

Function Documentation

◆ hmpdf_init_fct()

int hmpdf_init_fct ( hmpdf_obj d,
char *  class_ini,
hmpdf_signaltype_e  stype,
  ... 
)

Underlying function. For convenience, it should be called through the hmpdf_init macro.

hmpdf_init
#define hmpdf_init(...)
Definition: hmpdf_init.h:48
hmpdf_N_threads
@ hmpdf_N_threads
Definition: hmpdf_configs.h:111
hmpdf_pixel_side
@ hmpdf_pixel_side
Definition: hmpdf_configs.h:225
hmpdf_kappa
@ hmpdf_kappa
Definition: hmpdf_configs.h:25