CLASS MANUAL
|
#include "output.h"
Functions | |
int | output_init (struct background *pba, struct thermo *pth, struct perturbs *ppt, struct primordial *ppm, struct transfers *ptr, struct spectra *psp, struct nonlinear *pnl, struct lensing *ple, struct output *pop) |
int | output_cl (struct background *pba, struct perturbs *ppt, struct spectra *psp, struct lensing *ple, struct output *pop) |
int | output_pk (struct background *pba, struct perturbs *ppt, struct spectra *psp, struct output *pop) |
int | output_pk_nl (struct background *pba, struct perturbs *ppt, struct spectra *psp, struct output *pop) |
int | output_tk (struct background *pba, struct perturbs *ppt, struct spectra *psp, struct output *pop) |
int | output_print_data (FILE *out, char titles[_MAXTITLESTRINGLENGTH_], double *dataptr, int size_dataptr) |
int | output_open_cl_file (struct spectra *psp, struct output *pop, FILE **clfile, FileName filename, char *first_line, int lmax) |
int | output_one_line_of_cl (struct background *pba, struct spectra *psp, struct output *pop, FILE *clfile, double l, double *cl, int ct_size) |
int | output_open_pk_file (struct background *pba, struct spectra *psp, struct output *pop, FILE **pkfile, FileName filename, char *first_line, double z) |
int | output_one_line_of_pk (FILE *pkfile, double one_k, double one_pk) |
Documented output module
Julien Lesgourgues, 26.08.2010
This module writes the output in files.
The following functions can be called from other modules or from the main:
No memory needs to be deallocated after that, hence there is no output_free() routine like in other modules.
int output_init | ( | struct background * | pba, |
struct thermo * | pth, | ||
struct perturbs * | ppt, | ||
struct primordial * | ppm, | ||
struct transfers * | ptr, | ||
struct spectra * | psp, | ||
struct nonlinear * | pnl, | ||
struct lensing * | ple, | ||
struct output * | pop | ||
) |
This routine writes the output in files.
pba | Input: pointer to background structure (needed for calling spectra_pk_at_z()) |
pth | Input: pointer to thermodynamics structure |
ppt | Input: pointer perturbation structure |
ppm | Input: pointer to primordial structure |
ptr | Input: pointer to transfer structure |
psp | Input: pointer to spectra structure |
pnl | Input: pointer to nonlinear structure |
ple | Input: pointer to lensing structure |
pop | Input: pointer to output structure |
Summary:
int output_cl | ( | struct background * | pba, |
struct perturbs * | ppt, | ||
struct spectra * | psp, | ||
struct lensing * | ple, | ||
struct output * | pop | ||
) |
This routines writes the output in files for anisotropy power spectra 's.
pba | Input: pointer to background structure (needed for ![]() |
ppt | Input: pointer perturbation structure |
psp | Input: pointer to spectra structure |
ple | Input: pointer to lensing structure |
pop | Input: pointer to output structure |
Summary:
int output_pk | ( | struct background * | pba, |
struct perturbs * | ppt, | ||
struct spectra * | psp, | ||
struct output * | pop | ||
) |
This routines writes the output in files for Fourier matter power spectra P(k)'s.
pba | Input: pointer to background structure (needed for calling spectra_pk_at_z()) |
ppt | Input: pointer perturbation structure |
psp | Input: pointer to spectra structure |
pop | Input: pointer to output structure |
Summary:
int output_pk_nl | ( | struct background * | pba, |
struct perturbs * | ppt, | ||
struct spectra * | psp, | ||
struct output * | pop | ||
) |
This routines writes the output in files for Fourier non-linear matter power spectra P(k)'s.
pba | Input: pointer to background structure (needed for calling spectra_pk_at_z()) |
ppt | Input: pointer perturbation structure |
psp | Input: pointer to spectra structure |
pop | Input: pointer to output structure |
Summary:
int output_tk | ( | struct background * | pba, |
struct perturbs * | ppt, | ||
struct spectra * | psp, | ||
struct output * | pop | ||
) |
This routines writes the output in files for matter transfer functions 's.
pba | Input: pointer to background structure (needed for calling spectra_pk_at_z()) |
ppt | Input: pointer perturbation structure |
psp | Input: pointer to spectra structure |
pop | Input: pointer to output structure |
Summary:
int output_print_data | ( | FILE * | out, |
char | titles[_MAXTITLESTRINGLENGTH_], | ||
double * | dataptr, | ||
int | size_dataptr | ||
) |
Summary
int output_open_cl_file | ( | struct spectra * | psp, |
struct output * | pop, | ||
FILE ** | clfile, | ||
FileName | filename, | ||
char * | first_line, | ||
int | lmax | ||
) |
This routine opens one file where some 's will be written, and writes a heading with some general information concerning its content.
psp | Input: pointer to spectra structure |
pop | Input: pointer to output structure |
clfile | Output: returned pointer to file pointer |
filename | Input: name of the file |
first_line | Input: text describing the content (mode, initial condition..) |
lmax | Input: last multipole in the file (the first one is assumed to be 2) |
Summary
int output_one_line_of_cl | ( | struct background * | pba, |
struct spectra * | psp, | ||
struct output * | pop, | ||
FILE * | clfile, | ||
double | l, | ||
double * | cl, | ||
int | ct_size | ||
) |
This routine write one line with l and all 's for all types (TT, TE...)
pba | Input: pointer to background structure (needed for ![]() |
psp | Input: pointer to spectra structure |
pop | Input: pointer to output structure |
clfile | Input: file pointer |
l | Input: multipole |
cl | Input: ![]() |
ct_size | Input: number of types |
int output_open_pk_file | ( | struct background * | pba, |
struct spectra * | psp, | ||
struct output * | pop, | ||
FILE ** | pkfile, | ||
FileName | filename, | ||
char * | first_line, | ||
double | z | ||
) |
This routine opens one file where some P(k)'s will be written, and writes a heading with some general information concerning its content.
pba | Input: pointer to background structure (needed for h) |
psp | Input: pointer to spectra structure |
pop | Input: pointer to output structure |
pkfile | Output: returned pointer to file pointer |
filename | Input: name of the file |
first_line | Input: text describing the content (initial conditions, ...) |
z | Input: redshift of the output |
int output_one_line_of_pk | ( | FILE * | pkfile, |
double | one_k, | ||
double | one_pk | ||
) |
This routine writes one line with k and P(k)
pkfile | Input: file pointer |
one_k | Input: wavenumber |
one_pk | Input: matter power spectrum |