AnalyseMCMC
Analyse gravitational-wave parameter-estimation results from SPINspiral and lalinference_mcmc
|
Routines and functions to bin data in 2D and help produce 2D marginalised PDFs. More...
Functions/Subroutines | |
logical function | create_this_2d_pdf (p1, p2, countplots, totplots) |
Determine whether to create a 2D PDF for this combination of j1/j2 or p1/p2. More... | |
subroutine | identify_special_combinations_of_parameters (p1, p2, sky_position, binary_orientation, project_map) |
Identify special combinations of parameters. More... | |
subroutine | determine_2d_pdf_binning_plot_ranges (ic, p1, p2, project_map, xmin, xmax, ymin, ymax, dx, dy) |
Determine binning/plot ranges for 2D PDFs. More... | |
subroutine | bin_and_normalise_2d_data (ic, p1, p2, xmin, xmax, ymin, ymax, z, tr, sky_position, binary_orientation) |
Bin data and 'normalise' 2D PDF. More... | |
subroutine | bin_data_2d_a (ndat, xdat, ydat, zdat, nxbin, nybin, xmin1, xmax1, ymin1, ymax1, zz, tr) |
'Bin data' in 2 dimensions - Measure the amount of likelihood in each bin More... | |
subroutine | identify_2d_ranges (p1, p2, ni, nx, ny, z, tr) |
Get the 2d probability intervals; z lies between 1 (in 100% range) and ni (in lowest-% range, e.g. 90%) More... | |
subroutine | calc_2d_areas (p1, p2, ni, nx, ny, z, tr, area, xmin, xmax, ymin, ymax) |
Compute 2D probability areas. More... | |
integer function | injectionrange2d (z, nx, ny, injectionx, injectiony, tr) |
Get the smallest probability area in which the injection values lie. More... | |
subroutine | check_binned_data (nxbin, nybin, z) |
Find the fraction of non-zero bins for which more than frac*8 of their neighbours are smaller. More... | |
subroutine | prepare_skymap_binning (xmin, xmax, ymin, ymax) |
Prepare binning for a cute sky map in 2D PDF. More... | |
subroutine | save_binned_2d_pdf_data (ic, p1, p2, xmin, xmax, ymin, ymax, z, tr, op) |
Save binned 2D PDF data for the given combination of parameters. More... | |
Routines and functions to bin data in 2D and help produce 2D marginalised PDFs.
logical function create_this_2d_pdf | ( | integer, intent(in) | p1, |
integer, intent(in) | p2, | ||
integer, intent(in) | countplots, | ||
integer, intent(in) | totplots | ||
) |
Determine whether to create a 2D PDF for this combination of j1/j2 or p1/p2.
p1 | ID of parameter 1 |
p2 | ID of parameter 2 |
countplots | Count of the current plot |
totplots | Total number of plots to make |
Referenced by pdfs2d().
subroutine identify_special_combinations_of_parameters | ( | integer, intent(in) | p1, |
integer, intent(in) | p2, | ||
logical, intent(out) | sky_position, | ||
logical, intent(out) | binary_orientation, | ||
logical, intent(out) | project_map | ||
) |
Identify special combinations of parameters.
p1 | ID of parameter 1 |
p2 | ID of parameter 2 |
sky_position | Binning/plotting sky position? |
binary_orientation | Binning/plotting binary orientation? |
project_map | Using a map projection? |
Referenced by pdfs2d().
subroutine determine_2d_pdf_binning_plot_ranges | ( | integer, intent(in) | ic, |
integer, intent(in) | p1, | ||
integer, intent(in) | p2, | ||
logical, intent(in) | project_map, | ||
real, intent(out) | xmin, | ||
real, intent(out) | xmax, | ||
real, intent(out) | ymin, | ||
real, intent(out) | ymax, | ||
real, intent(out) | dx, | ||
real, intent(out) | dy | ||
) |
Determine binning/plot ranges for 2D PDFs.
ic | Chain ID |
p1 | ID of parameter 1 |
p2 | ID of parameter 2 |
project_map | Use map projection? |
xmin | Lower limit of horizontal plot range |
xmax | Upper limit of horizontal plot range |
ymin | Lower limit of vertical plot range |
ymax | Upper limit of vertical plot range |
dx | Width of horizontal plot range |
dy | Width of vertical plot range |
Referenced by pdfs2d().
subroutine bin_and_normalise_2d_data | ( | integer, intent(in) | ic, |
integer, intent(in) | p1, | ||
integer, intent(in) | p2, | ||
real, intent(inout) | xmin, | ||
real, intent(inout) | xmax, | ||
real, intent(inout) | ymin, | ||
real, intent(inout) | ymax, | ||
real, dimension(nbin2dx+1,nbin2dy+1), intent(inout) | z, | ||
real, dimension(6), intent(inout) | tr, | ||
logical, intent(in) | sky_position, | ||
logical, intent(in) | binary_orientation | ||
) |
Bin data and 'normalise' 2D PDF.
ic | Chain ID |
p1 | ID of parameter 1 |
p2 | ID of parameter 2 |
xmin | Lower limit of horizontal plot range (I/O) |
xmax | Upper limit of horizontal plot range (I/O) |
ymin | Lower limit of vertical plot range (I/O) |
ymax | Upper limit of vertical plot range (I/O) |
z | 2D binned data (I/O) |
tr | Transformation elements used by PGPlot (I/O) |
sky_position | Binning/plotting sky position? |
binary_orientation | Binning/plotting binary orientation? |
References bin_data_2d_a(), calc_2d_areas(), identify_2d_ranges(), and injectionrange2d().
Referenced by pdfs2d().
subroutine bin_data_2d_a | ( | integer, intent(in) | ndat, |
real, dimension(ndat), intent(in) | xdat, | ||
real, dimension(ndat), intent(in) | ydat, | ||
real, dimension(ndat), intent(in) | zdat, | ||
integer, intent(in) | nxbin, | ||
integer, intent(in) | nybin, | ||
real, intent(inout) | xmin1, | ||
real, intent(inout) | xmax1, | ||
real, intent(inout) | ymin1, | ||
real, intent(inout) | ymax1, | ||
real, dimension(nxbin+1,nybin+1), intent(out) | zz, | ||
real, dimension(6), intent(out) | tr | ||
) |
'Bin data' in 2 dimensions - Measure the amount of likelihood in each bin
ndat | Input data: array size |
xdat | Input data: x values |
ydat | Input data: y values |
zdat | Input data: likelihood values |
nxbin | Desired number of bins in the x direction |
nybin | Desired number of bins in the y direction |
xmin1 | Lower limit for the binning range in the x direction - autodetermine if xmin1=xmax1 |
xmax1 | Upper limit for the binning range in the x direction - autodetermine if xmin1=xmax1 |
ymin1 | Lower limit for the binning range in the y direction - autodetermine if ymin1=ymax1 |
ymax1 | Upper limit for the binning range in the y direction - autodetermine if ymin1=ymax1 |
zz | 'Binned' data set z(nxbin,nybin) (real) |
tr | Transformation elements for pgplot tr(6) (real) |
Referenced by bin_and_normalise_2d_data().
subroutine identify_2d_ranges | ( | integer, intent(in) | p1, |
integer, intent(in) | p2, | ||
integer, intent(in) | ni, | ||
integer, intent(in) | nx, | ||
integer, intent(in) | ny, | ||
real, dimension(nx,ny), intent(inout) | z, | ||
real, dimension(6), intent(in) | tr | ||
) |
Get the 2d probability intervals; z lies between 1 (in 100% range) and ni (in lowest-% range, e.g. 90%)
p1 | Parameter ID 1 |
p2 | Parameter ID 2 |
ni | Number of probability intervals |
nx | Number of bins in the x direction |
ny | Number of bins in the y direction |
z | Binned data (nx,ny) -> probability-interval data |
tr | Transformation elements used by PGPlot |
Referenced by bin_and_normalise_2d_data().
subroutine calc_2d_areas | ( | integer, intent(in) | p1, |
integer, intent(in) | p2, | ||
integer, intent(in) | ni, | ||
integer, intent(in) | nx, | ||
integer, intent(in) | ny, | ||
real, dimension(nx,ny), intent(in) | z, | ||
real, dimension(6), intent(in) | tr, | ||
real, dimension(ni), intent(out) | area, | ||
real, intent(out) | xmin, | ||
real, intent(out) | xmax, | ||
real, intent(out) | ymin, | ||
real, intent(out) | ymax | ||
) |
Compute 2D probability areas.
p1 | Parameter ID 1 |
p2 | Parameter ID 2 |
ni | Number of probability intervals |
nx | Number of bins in the x direction |
ny | Number of bins in the y direction |
z | Binned data (nx,ny) -> probability-interval data |
tr | Transformation elements used by PGPlot |
area | Probability areas |
xmin | Lower limit for the plotting range in the horizontal direction |
xmax | Upper limit for the plotting range in the horizontal direction |
ymin | Lower limit for the plotting range in the vertical direction |
ymax | Upper limit for the plotting range in the vertical direction |
Referenced by bin_and_normalise_2d_data().
integer function injectionrange2d | ( | real, dimension(nx,ny), intent(in) | z, |
integer, intent(in) | nx, | ||
integer, intent(in) | ny, | ||
real, intent(in) | injectionx, | ||
real, intent(in) | injectiony, | ||
real, dimension(6), intent(in) | tr | ||
) |
Get the smallest probability area in which the injection values lie.
z | Binned data (nx,ny) -> probability-interval data |
nx | Number of bins in the x direction |
ny | Number of bins in the y direction |
injectionx | Injection value of parameter 1 |
injectiony | Injection value of parameter 2 |
tr | Transformation elements used by PGPlot |
Referenced by bin_and_normalise_2d_data().
subroutine check_binned_data | ( | integer, intent(in) | nxbin, |
integer, intent(in) | nybin, | ||
real, dimension(nxbin+1,nybin+1), intent(in) | z | ||
) |
Find the fraction of non-zero bins for which more than frac*8 of their neighbours are smaller.
nxbin | Desired number of bins in the x direction |
nybin | Desired number of bins in the y direction |
z | Binned data set z(nxbin,nybin) (real) |
subroutine prepare_skymap_binning | ( | real, intent(inout) | xmin, |
real, intent(inout) | xmax, | ||
real, intent(inout) | ymin, | ||
real, intent(inout) | ymax | ||
) |
Prepare binning for a cute sky map in 2D PDF.
xmin | Minimum value of x (RA) range |
xmax | Maximum value of x (RA) range |
ymin | Minimum value of y (Dec) range |
ymax | Maximum value of y (Dec) range |
Referenced by pdfs2d().
subroutine save_binned_2d_pdf_data | ( | integer, intent(in) | ic, |
integer, intent(in) | p1, | ||
integer, intent(in) | p2, | ||
real, intent(in) | xmin, | ||
real, intent(in) | xmax, | ||
real, intent(in) | ymin, | ||
real, intent(in) | ymax, | ||
real, dimension(nbin2dx+1,nbin2dy+1), intent(in) | z, | ||
real, dimension(6), intent(in) | tr, | ||
integer, intent(in) | op | ||
) |
Save binned 2D PDF data for the given combination of parameters.
ic | Chain ID |
p1 | ID of parameter 1 |
p2 | ID of parameter 2 |
xmin | Lower limit of horizontal plot range (I/O) |
xmax | Upper limit of horizontal plot range (I/O) |
ymin | Lower limit of vertical plot range (I/O) |
ymax | Upper limit of vertical plot range (I/O) |
z | 2D binned data (I/O) |
tr | Transformation elements used by PGPlot (I/O) |
op | Output unit |
Referenced by pdfs2d().