AnalyseMCMC
Analyse gravitational-wave parameter-estimation results from SPINspiral and lalinference_mcmc
|
General routines and functions for analyseMCMC. More...
Functions/Subroutines | |
real(double) function | lon2ra (lon, GPSsec) |
Compute right ascension (in radians) from longitude (radians) and GPS time (seconds) More... | |
real(double) function | ra2lon (ra, GPSsec) |
Compute longitude (in radians) from right ascension (radians) and GPS time (seconds) More... | |
real(double) function | gmst (GPSsec) |
Compute the 'Greenwich Mean Sidereal Time' (in radians) from GPS time (in seconds) More... | |
subroutine | savgol (c, np, nl, nr, ld, m) |
Uses lubksb,ludcmp. More... | |
subroutine | lubksb (a, n, np, indx, b) |
subroutine | ludcmp (a, n, np, indx, d) |
real(double) function | drev2pi (x) |
Returns angle in radians between 0 and 2pi (double precision) More... | |
real function | revper (x, per) |
Returns periodic value x between 0 and per. More... | |
real function | revpipi (x) |
Returns angle in radians between -pi and pi. More... | |
real function | rev360 (x) |
Returns angle in degrees between 0 and 360. More... | |
real function | rev180 (x) |
Returns angle in degrees between 0 and 180. More... | |
real function | rev24 (x) |
Returns angle in hours between 0 and 24. More... | |
real function | rev2pi (x) |
Returns angle in radians between 0 and 2pi. More... | |
real(double) function | drevpi (x) |
Returns angle in radians between 0 and pi - double. More... | |
real function | rrevpi (x) |
Returns angle in radians between 0 and pi - real. More... | |
character function, dimension(8) | tms (a1) |
Print angle as mm:ss.s string, input in hours. More... | |
integer function | getos () |
Determine the operating system type: 1-Linux, 2-MacOSX. More... | |
real(double) function | timestamp () |
Get time stamp in seconds since 1970-01-01 00:00:00 UTC, mod countmax. More... | |
subroutine | lbr2vec (l, b, r, vec) |
Transforms longitude l, latitude b and radius r into a vector with length r. Use r=1 for a unit vector. More... | |
real(double) function | veclen (vec) |
Compute the length of a 3D cartesian vector. More... | |
subroutine | normvec (vec) |
Create a unit vector from a 3D cartesian vector. More... | |
subroutine | mc_q_2_m1_m2 (mc, q, m1, m2) |
Convert chirp mass and q to m1 and m2 - double precision. More... | |
subroutine | mc_q_2_m1_m2r (mcr, qr, m1r, m2r) |
Convert chirp mass and eta to m1 and m2 - single precision. More... | |
real(double) function | eta2q (eta) |
Convert symmetric mass ratio eta to asymmetric mass ratio q (0 - 1) More... | |
real function | eta2qr (eta) |
Convert symmetric mass ratio eta to asymmetric mass ratio q (0 - 1) More... | |
real(double) function | q2eta (q) |
Convert asymmetric mass ratio q (0 - 1) to symmetric mass ratio eta (0 - 0.25) More... | |
real function | q2etar (q) |
Convert asymmetric mass ratio q (0 - 1) to symmetric mass ratio eta (0 - 0.25) More... | |
subroutine | mc_eta_2_m1_m2 (mc, eta, m1, m2) |
Convert chirp mass and eta to m1 and m2 - double precision. More... | |
subroutine | mc_eta_2_m1_m2r (mcr, etar, m1r, m2r) |
Convert chirp mass and eta to m1 and m2 - single precision. More... | |
real(double) function | m1m2_2_mc (m1, m2) |
Convert M1,M2 to Mchirp. More... | |
real function | m1m2_2_mcr (m1, m2) |
Convert M1,M2 to Mchirp - single precision. More... | |
subroutine | m1_m2_2_mc_eta (m1, m2, mc, eta) |
Convert M1,M2 to Mchirp, eta (double precision) More... | |
subroutine | m1_m2_2_mc_etar (m1r, m2r, mcr, etar) |
Convert M1,M2 to Mchirp, eta (single precision) More... | |
subroutine | ang2vec (l, b, vec) |
Convert longitude, latitude (rad) to a 3D unit vector. More... | |
subroutine | vec2ang (vec, l, b) |
Convert a 3D vector to longitude, latitude (rad) More... | |
real(double) function | dotproduct (vec1, vec2) |
Compute the dot product of two 3D cartesian vectors. More... | |
subroutine | crossproduct (vec1, vec2, crpr) |
Compute the cross (outer) product of two cartesian vectors. More... | |
real(double) function | polangle (p, o) |
Compute the polarisation angle of a source with position unit vector p and orientation normal vector o. More... | |
real(double) function | posangle (p, o) |
Compute the position angle of a source with position unit vector p and orientation unit vector o. More... | |
subroutine | compute_incli_polang (pl, pb, ol, ob, i, psi) |
Compute the inclination and polarisation angle for a source with position (pl,pb) and orientation (ol,ob) More... | |
subroutine | compute_incli_polangr (plr, pbr, olr, obr, ir, psir) |
Compute the inclination and polarisation angle for a source with position (pl,pb) and orientation (ol,ob) - single prec. More... | |
subroutine | compute_incli_posang (pl, pb, ol, ob, i, pa) |
Compute the inclination and position angle for a source with position (pl,pb) and orientation (ol,ob) More... | |
subroutine | detectorvector (d1, d2, jd) |
Determine the sky position pointed at by the vector that connects two detectors. More... | |
subroutine | findfiles (match, nff, all, fnames, nf) |
Find files in the current working directory. More... | |
subroutine | compbitmapsize (bmpXSz, bmpYSz, scFac, bmpsz, bmprat) |
Compute the size needed for PGPlot to get the desired bitmap size in pixels. More... | |
subroutine | print_rundata (op) |
Print a single output line to specify when and were AnalyseMCMC was run. More... | |
subroutine | create_html_index_file () |
Setup a index.html file for output. More... | |
subroutine | create_html_2dpdf_file (op) |
Setup the 2dpdf.html file for output. More... | |
subroutine | report_undefined_parameter (parName, parID, routine) |
Report an undefined parameter that the code tries to use. More... | |
General routines and functions for analyseMCMC.
real(double) function lon2ra | ( | real(double), intent(in) | lon, |
real(double), intent(in) | GPSsec | ||
) |
Compute right ascension (in radians) from longitude (radians) and GPS time (seconds)
lon | Longitude |
GPSsec | GPS time in seconds |
References gmst().
real(double) function ra2lon | ( | real(double), intent(in) | ra, |
real(double), intent(in) | GPSsec | ||
) |
Compute longitude (in radians) from right ascension (radians) and GPS time (seconds)
ra | Right Ascension |
GPSsec | GPS time in seconds |
References gmst().
real(double) function gmst | ( | real(double), intent(in) | GPSsec | ) |
Compute the 'Greenwich Mean Sidereal Time' (in radians) from GPS time (in seconds)
GPSsec | GPS time in seconds |
Referenced by lon2ra(), mcmcruninfo(), and ra2lon().
subroutine savgol | ( | real, dimension(np), intent(out) | c, |
integer, intent(in) | np, | ||
integer, intent(in) | nl, | ||
integer, intent(in) | nr, | ||
integer, intent(in) | ld, | ||
integer, intent(in) | m | ||
) |
subroutine lubksb | ( | real, dimension(np,np), intent(in) | a, |
integer, intent(in) | n, | ||
integer, intent(in) | np, | ||
integer, dimension(n), intent(in) | indx, | ||
real, dimension(n), intent(out) | b | ||
) |
Referenced by savgol().
subroutine ludcmp | ( | real, dimension(np,np), intent(inout) | a, |
integer, intent(in) | n, | ||
integer, intent(in) | np, | ||
integer, dimension(n), intent(out) | indx, | ||
real, intent(out) | d | ||
) |
Referenced by savgol().
real(double) function drev2pi | ( | real(double), intent(in) | x | ) |
Returns angle in radians between 0 and 2pi (double precision)
x | Angle (rad) |
Referenced by plotthesky().
real function revper | ( | real, intent(in) | x, |
real, intent(in) | per | ||
) |
Returns periodic value x between 0 and per.
x | Input value |
per | Period of cycle |
Referenced by statistics().
real function revpipi | ( | real, intent(in) | x | ) |
Returns angle in radians between -pi and pi.
x | Angle (rad) |
real function rev360 | ( | real, intent(in) | x | ) |
Returns angle in degrees between 0 and 360.
x | Angle (deg) |
Referenced by pdfs1d(), plot_par_l(), and plot_parameter_chains().
real function rev180 | ( | real, intent(in) | x | ) |
Returns angle in degrees between 0 and 180.
x | Angle (deg) |
Referenced by pdfs1d(), plot_par_l(), and plot_parameter_chains().
real function rev24 | ( | real, intent(in) | x | ) |
Returns angle in hours between 0 and 24.
x | Angle (hours) |
Referenced by pdfs1d(), plot_par_l(), and plot_parameter_chains().
real function rev2pi | ( | real, intent(in) | x | ) |
Returns angle in radians between 0 and 2pi.
x | Angle (rad) |
Referenced by save_cbc_wiki_data().
real(double) function drevpi | ( | real(double), intent(in) | x | ) |
Returns angle in radians between 0 and pi - double.
x | Angle (rad) |
Referenced by compute_incli_polang().
real function rrevpi | ( | real, intent(in) | x | ) |
Returns angle in radians between 0 and pi - real.
x | Angle (rad) |
Referenced by save_cbc_wiki_data().
character function, dimension(8) tms | ( | real(double), intent(in) | a1 | ) |
integer function getos | ( | ) |
Determine the operating system type: 1-Linux, 2-MacOSX.
real(double) function timestamp | ( | ) |
Get time stamp in seconds since 1970-01-01 00:00:00 UTC, mod countmax.
Referenced by analysemcmc(), and animation().
subroutine lbr2vec | ( | real(double), intent(in) | l, |
real(double), intent(in) | b, | ||
real(double), intent(in) | r, | ||
real(double), dimension(3), intent(out) | vec | ||
) |
Transforms longitude l, latitude b and radius r into a vector with length r. Use r=1 for a unit vector.
l | Longitude (rad) |
b | Latitude (rad) |
r | Radius |
vec | 3D vector with the same units as r |
real(double) function veclen | ( | real(double), dimension(3), intent(in) | vec | ) |
subroutine normvec | ( | real(double), dimension(3), intent(inout) | vec | ) |
Create a unit vector from a 3D cartesian vector.
vec | 3D vector (I/O) |
References veclen().
Referenced by posangle(), and vec2ang().
subroutine mc_q_2_m1_m2 | ( | real(double), intent(in) | mc, |
real(double), intent(in) | q, | ||
real(double), intent(out) | m1, | ||
real(double), intent(out) | m2 | ||
) |
Convert chirp mass and q to m1 and m2 - double precision.
mc | Chirp mass (Mo) |
q | Mass ratio q |
m1 | M1 (Mo) |
m2 | M2 (Mo) |
Referenced by mc_q_2_m1_m2r().
subroutine mc_q_2_m1_m2r | ( | real, intent(in) | mcr, |
real, intent(in) | qr, | ||
real, intent(out) | m1r, | ||
real, intent(out) | m2r | ||
) |
Convert chirp mass and eta to m1 and m2 - single precision.
mcr | Chirp mass (Mo) |
qr | Mass ratio q |
m1r | M1 (Mo) |
m2r | M2 (Mo) |
References mc_q_2_m1_m2().
Referenced by mcmcruninfo().
real(double) function eta2q | ( | real(double), intent(in) | eta | ) |
Convert symmetric mass ratio eta to asymmetric mass ratio q (0 - 1)
eta | Symmetric mass ratio (0 - 0.25) |
real function eta2qr | ( | real, intent(in) | eta | ) |
Convert symmetric mass ratio eta to asymmetric mass ratio q (0 - 1)
eta | Symmetric mass ratio (0 - 0.25) |
Referenced by mcmcruninfo().
real(double) function q2eta | ( | real(double), intent(in) | q | ) |
Convert asymmetric mass ratio q (0 - 1) to symmetric mass ratio eta (0 - 0.25)
q | Asymmetric mass ratio (0 - 1) |
real function q2etar | ( | real, intent(in) | q | ) |
Convert asymmetric mass ratio q (0 - 1) to symmetric mass ratio eta (0 - 0.25)
q | Asymmetric mass ratio (0 - 1) |
subroutine mc_eta_2_m1_m2 | ( | real(double), intent(in) | mc, |
real(double), intent(in) | eta, | ||
real(double), intent(out) | m1, | ||
real(double), intent(out) | m2 | ||
) |
Convert chirp mass and eta to m1 and m2 - double precision.
mc | Chirp mass (Mo) |
eta | Eta |
m1 | M1 (Mo) |
m2 | M2 (Mo) |
Referenced by mc_eta_2_m1_m2r().
subroutine mc_eta_2_m1_m2r | ( | real, intent(in) | mcr, |
real, intent(in) | etar, | ||
real, intent(out) | m1r, | ||
real, intent(out) | m2r | ||
) |
Convert chirp mass and eta to m1 and m2 - single precision.
mcr | Chirp mass (Mo) |
etar | Eta |
m1r | M1 (Mo) |
m2r | M2 (Mo) |
References mc_eta_2_m1_m2().
real(double) function m1m2_2_mc | ( | real(double), intent(in) | m1, |
real(double), intent(in) | m2 | ||
) |
Convert M1,M2 to Mchirp.
m1 | M1 (Mo) |
m2 | M2 (Mo) |
mc | Chirp mass (Mo) |
real function m1m2_2_mcr | ( | real, intent(in) | m1, |
real, intent(in) | m2 | ||
) |
Convert M1,M2 to Mchirp - single precision.
m1 | M1 (Mo) |
m2 | M2 (Mo) |
mc | Chirp mass (Mo) |
Referenced by mcmcruninfo().
subroutine m1_m2_2_mc_eta | ( | real(double), intent(in) | m1, |
real(double), intent(in) | m2, | ||
real(double), intent(out) | mc, | ||
real(double), intent(out) | eta | ||
) |
Convert M1,M2 to Mchirp, eta (double precision)
m1 | M1 (Mo) |
m2 | M2 (Mo) |
mc | Chirp mass (Mo) |
eta | Eta |
Referenced by m1_m2_2_mc_etar().
subroutine m1_m2_2_mc_etar | ( | real, intent(in) | m1r, |
real, intent(in) | m2r, | ||
real, intent(out) | mcr, | ||
real, intent(out) | etar | ||
) |
Convert M1,M2 to Mchirp, eta (single precision)
m1r | M1 (Mo) |
m2r | M2 (Mo) |
mcr | Chirp mass (Mo) |
etar | Eta |
References m1_m2_2_mc_eta().
subroutine ang2vec | ( | real(double), intent(in) | l, |
real(double), intent(in) | b, | ||
real(double), dimension(3), intent(out) | vec | ||
) |
Convert longitude, latitude (rad) to a 3D unit vector.
l | Longitude, in [0,2pi[ |
b | Latitude, in [-pi,pi] |
vec | 3D unit vector |
Referenced by compute_incli_polang(), compute_incli_posang(), and detectorvector().
subroutine vec2ang | ( | real(double), dimension(3), intent(in) | vec, |
real(double), intent(out) | l, | ||
real(double), intent(out) | b | ||
) |
Convert a 3D vector to longitude, latitude (rad)
vec | 3D vector |
l | Longitude, in [0,2pi[ |
b | Latitude, in [-pi,pi] |
References normvec().
Referenced by detectorvector().
real(double) function dotproduct | ( | real(double), dimension(3), intent(in) | vec1, |
real(double), dimension(3), intent(in) | vec2 | ||
) |
Compute the dot product of two 3D cartesian vectors.
vec1 | 3D vector 1 |
vec2 | 3D vector 2 |
Referenced by compute_incli_polang(), compute_incli_posang(), polangle(), and posangle().
subroutine crossproduct | ( | real(double), dimension(3), intent(in) | vec1, |
real(double), dimension(3), intent(in) | vec2, | ||
real(double), dimension(3), intent(out) | crpr | ||
) |
Compute the cross (outer) product of two cartesian vectors.
vec1 | 3D vector 1 |
vec2 | 3D vector 2 |
crpr | Cross/outer product (vec1 x vec2) |
Referenced by polangle(), and posangle().
real(double) function polangle | ( | real(double), dimension(3), intent(in) | p, |
real(double), dimension(3), intent(in) | o | ||
) |
Compute the polarisation angle of a source with position unit vector p and orientation normal vector o.
p | 3D position unit vector |
o | 3D orientation unit vector |
References crossproduct(), and dotproduct().
Referenced by compute_incli_polang().
real(double) function posangle | ( | real(double), dimension(3), intent(in) | p, |
real(double), dimension(3), intent(in) | o | ||
) |
Compute the position angle of a source with position unit vector p and orientation unit vector o.
p | 3D position unit vector |
o | 3D orientation unit vector |
References crossproduct(), dotproduct(), and normvec().
Referenced by compute_incli_posang().
subroutine compute_incli_polang | ( | real(double), intent(in) | pl, |
real(double), intent(in) | pb, | ||
real(double), intent(in) | ol, | ||
real(double), intent(in) | ob, | ||
real(double), intent(out) | i, | ||
real(double), intent(out) | psi | ||
) |
Compute the inclination and polarisation angle for a source with position (pl,pb) and orientation (ol,ob)
pl | Position: longtitude, in [0,2pi[ (rad) |
pb | Position: latitude, in [0,pi] (rad) |
ol | Orientation: longtitude, in [0,2pi[ (rad) |
ob | Orientation: latitude, in [0,pi] (rad) |
i | Inclination angle (rad) |
psi | Polarisation angle (rad) |
References ang2vec(), dotproduct(), drevpi(), and polangle().
Referenced by compute_incli_polangr().
subroutine compute_incli_polangr | ( | real, intent(in) | plr, |
real, intent(in) | pbr, | ||
real, intent(in) | olr, | ||
real, intent(in) | obr, | ||
real, intent(out) | ir, | ||
real, intent(out) | psir | ||
) |
Compute the inclination and polarisation angle for a source with position (pl,pb) and orientation (ol,ob) - single prec.
plr | Position: longtitude, in [0,2pi[ (rad) |
pbr | Position: latitude, in [0,pi] (rad) |
olr | Orientation: longtitude, in [0,2pi[ (rad) |
obr | Orientation: latitude, in [0,pi] (rad) |
ir | Inclination angle (rad) |
psir | Polarisation angle (rad) |
References compute_incli_polang().
Referenced by mcmcruninfo().
subroutine compute_incli_posang | ( | real(double), intent(in) | pl, |
real(double), intent(in) | pb, | ||
real(double), intent(in) | ol, | ||
real(double), intent(in) | ob, | ||
real(double), intent(out) | i, | ||
real(double), intent(out) | pa | ||
) |
Compute the inclination and position angle for a source with position (pl,pb) and orientation (ol,ob)
pl | Position: longtitude, in [0,2pi[ (rad) |
pb | Position: latitude, in (rad) |
ol | Orientation: longtitude, in [0,2pi[ (rad) |
ob | Orientation: latitude, in (rad) |
i | Inclination angle (rad) |
pa | Polarisation angle (rad) |
References ang2vec(), dotproduct(), and posangle().
subroutine detectorvector | ( | integer, intent(in) | d1, |
integer, intent(in) | d2, | ||
real(double), intent(inout) | jd | ||
) |
subroutine findfiles | ( | character, dimension(*), intent(in) | match, |
integer, intent(in) | nff, | ||
integer, intent(in) | all, | ||
character, dimension(99), intent(out) | fnames, | ||
integer, intent(out) | nf | ||
) |
Find files in the current working directory.
match | Search string to match |
nff | Maximum number of files to return |
all | All files? 0-select manually from list, 1-always return all files in list |
fnames | Array that contains the files found; make sure it has the same length as the array in the calling programme |
nf | The actual number of files returned in fnames ( = min(number found, nff)) |
Referenced by analysemcmc().
subroutine compbitmapsize | ( | integer, intent(in) | bmpXSz, |
integer, intent(in) | bmpYSz, | ||
real, intent(in) | scFac, | ||
real, intent(out) | bmpsz, | ||
real, intent(out) | bmprat | ||
) |
Compute the size needed for PGPlot to get the desired bitmap size in pixels.
bmpXSz | Desired x-size in pixels |
bmpYSz | Desired y-size in pixels |
scFac | Scale factor; produce a larger bitmap, the shrink to get smoother graphics |
bmpsz | Size of the bitmap (x) |
bmprat | Aspect ration of the bitmap |
Referenced by analysemcmc(), pdfs2d(), and removeppm_createthumbnails_createhtml_2d_pdf().
subroutine print_rundata | ( | integer, intent(in) | op | ) |
Print a single output line to specify when and were AnalyseMCMC was run.
op | Output unit |
Referenced by analysemcmc(), and removeppm_createthumbnails_createhtml_2d_pdf().
subroutine create_html_index_file | ( | ) |
Setup a index.html file for output.
Referenced by analysemcmc().
subroutine create_html_2dpdf_file | ( | integer, intent(in) | op | ) |
Setup the 2dpdf.html file for output.
Referenced by pdfs2d().
subroutine report_undefined_parameter | ( | character, dimension(*), intent(in) | parName, |
integer, intent(in) | parID, | ||
character, dimension(*), intent(in) | routine | ||
) |
Report an undefined parameter that the code tries to use.
parName | Name of the undefined parameter |
parID | ID of the undefined parameter |
routine | Name of the caller routine |
Referenced by pdfs1d(), pdfs2d(), plot_acorr_chains(), plot_jump_sizes(), plot_par_l(), and plot_parameter_chains().