CLASS MANUAL
|
#include "output.h"
Functions | |
int | output_init (struct background *pba, struct thermodynamics *pth, struct perturbations *ppt, struct primordial *ppm, struct transfer *ptr, struct harmonic *phr, struct fourier *pfo, struct lensing *ple, struct distortions *psd, struct output *pop) |
int | output_cl (struct background *pba, struct perturbations *ppt, struct harmonic *phr, struct lensing *ple, struct output *pop) |
int | output_pk (struct background *pba, struct perturbations *ppt, struct fourier *pfo, struct output *pop, enum pk_outputs pk_output) |
int | output_tk (struct background *pba, struct perturbations *ppt, struct output *pop) |
int | output_heating (struct injection *pin, struct noninjection *pni, struct output *pop) |
int | output_distortions (struct distortions *psd, struct output *pop) |
int | output_print_data (FILE *out, char titles[_MAXTITLESTRINGLENGTH_], double *dataptr, int size_dataptr) |
int | output_open_cl_file (struct harmonic *phr, struct output *pop, FILE **clfile, FileName filename, char *first_line, int lmax) |
int | output_one_line_of_cl (struct background *pba, struct harmonic *phr, struct output *pop, FILE *clfile, double l, double *cl, int ct_size) |
int | output_open_pk_file (struct background *pba, struct fourier *pfo, 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 thermodynamics * | pth, | ||
struct perturbations * | ppt, | ||
struct primordial * | ppm, | ||
struct transfer * | ptr, | ||
struct harmonic * | phr, | ||
struct fourier * | pfo, | ||
struct lensing * | ple, | ||
struct distortions * | psd, | ||
struct output * | pop | ||
) |
This routine writes the output in files.
pba | Input: pointer to background structure (needed for calling harmonic_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 |
phr | Input: pointer to harmonic structure |
pfo | Input: pointer to fourier structure |
ple | Input: pointer to lensing structure |
psd | Input: pointer to distortions structure |
pop | Input: pointer to output structure |
Summary:
int output_cl | ( | struct background * | pba, |
struct perturbations * | ppt, | ||
struct harmonic * | phr, | ||
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 |
phr | Input: pointer to harmonic structure |
ple | Input: pointer to lensing structure |
pop | Input: pointer to output structure |
Summary:
int output_pk | ( | struct background * | pba, |
struct perturbations * | ppt, | ||
struct fourier * | pfo, | ||
struct output * | pop, | ||
enum pk_outputs | pk_output | ||
) |
This routines writes the output in files for Fourier matter power spectra P(k)'s (linear or non-linear)
pba | Input: pointer to background structure (needed for calling harmonic_pk_at_z()) |
ppt | Input: pointer perturbation structure |
pfo | Input: pointer to fourier structure |
pop | Input: pointer to output structure |
pk_output | Input: pk_linear or pk_nonlinear |
Summary:
int output_tk | ( | struct background * | pba, |
struct perturbations * | ppt, | ||
struct output * | pop | ||
) |
This routines writes the output in files for matter transfer functions 's.
pba | Input: pointer to background structure (needed for calling harmonic_pk_at_z()) |
ppt | Input: pointer perturbation structure |
pop | Input: pointer to output structure |
Summary:
int output_heating | ( | struct injection * | pin, |
struct noninjection * | pni, | ||
struct output * | pop | ||
) |
Local variables
int output_distortions | ( | struct distortions * | psd, |
struct output * | pop | ||
) |
Local variables
int output_print_data | ( | FILE * | out, |
char | titles[_MAXTITLESTRINGLENGTH_], | ||
double * | dataptr, | ||
int | size_dataptr | ||
) |
Summary
int output_open_cl_file | ( | struct harmonic * | phr, |
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.
phr | Input: pointer to harmonic 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 harmonic * | phr, | ||
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 ) |
phr | Input: pointer to harmonic structure |
pop | Input: pointer to output structure |
clfile | Input: file pointer |
l | Input: multipole |
cl | Input: 's for all types |
ct_size | Input: number of types |
int output_open_pk_file | ( | struct background * | pba, |
struct fourier * | pfo, | ||
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) |
pfo | Input: pointer to fourier 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 |