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

Functions

int hmpdf_get_map_op (hmpdf_obj *d, int Nbins, double binedges[Nbins+1], double op[Nbins], int new_map)
 
int hmpdf_get_map_ps (hmpdf_obj *d, int Nbins, double binedges[Nbins+1], double ps[Nbins], int new_map)
 
int hmpdf_get_map (hmpdf_obj *d, double **map, long *Nside, int new_map)
 

Function Documentation

◆ hmpdf_get_map_op()

int hmpdf_get_map_op ( hmpdf_obj d,
int  Nbins,
double  binedges[Nbins+1],
double  op[Nbins],
int  new_map 
)

Returns the histogram of a simplified simulation (map).

Parameters
[in,out]dhmpdf_init() must have been called on d
[in]Nbinsnumber of bins the histogram will be binned into
[in]binedgesmonotonically increasing array of length Nbins+1
[out]opthe binned histogram, normalized
[in]new_mapif set to non-zero, the simplified simulation will be rerun even if a map has already been generated
Returns
error code

◆ hmpdf_get_map_ps()

int hmpdf_get_map_ps ( hmpdf_obj d,
int  Nbins,
double  binedges[Nbins+1],
double  ps[Nbins],
int  new_map 
)

Returns the power spectrum of a simplified simulation (map).

Parameters
[in,out]dhmpdf_init() must have been called on d
[in]Nbinsnumber of bins the power spectrum will be binned into
[in]binedgesmonotonically increasing array of length Nbins+1
[out]psthe binned, direction averaged power spectrum
[in]new_mapif set to non-zero, the simplified simulation will be rerun even if a map has already been generated
Returns
error code

◆ hmpdf_get_map()

int hmpdf_get_map ( hmpdf_obj d,
double **  map,
long *  Nside,
int  new_map 
)

Returns a simplified simulation (map).

Parameters
[in,out]dhmpdf_init() must have been called on d
[out]mapthe map (flattened array of dimensions Nside x Nside)
[out]Nsidesidelength of the map
[in]new_mapif set to non-zero, the simplified simulation will be rerun even if a map has already been generated
Returns
error code
Remarks
while the code does perform the memory allocation for the map (so the user does not have to figure out Nside beforehand), the user is responsible for freeing the allocated array, i.e. to call
free(*map)
after use.