-
Notifications
You must be signed in to change notification settings - Fork 2
/
distance.h
34 lines (28 loc) · 1 KB
/
distance.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef DISTANCE_H
#define DISTANCE_H
#define _DISTANCE_MAX_Z 100.0
#define _DISTANCE_Z_BINS 1000.0
#define _DISTANCE_TOTAL_BINS ((int)(_DISTANCE_MAX_Z*_DISTANCE_Z_BINS))
extern double Dh;
void init_cosmology(void);
double redshift(double a);
double scale_factor(double z);
double comoving_distance(double z);
double transverse_distance(double z);
double angular_diameter_distance(double z);
double luminosity_distance(double z);
double comoving_volume_element(double z);
double comoving_volume(double z);
double comoving_volume_to_redshift(double Vc);
double comoving_distance_to_redshift(double r);
double comoving_distance_h_to_redshift(double r);
#define Dc(z) comoving_distance(z)
#define Dch(z) comoving_distance_h(z)
#define Dm(z) transverse_distance(z)
#define Da(z) angular_diameter_distance(z)
#define Dl(z) luminosity_distance(z)
#define dVc(z) comoving_volume_element(z)
#define Vc(z) comoving_volume(z)
#define zR(r) comoving_distance_to_redshift(r)
#define zRh(r) comoving_distance_h_to_redshift(r)
#endif