AnalyseMCMC
Analyse gravitational-wave parameter-estimation results from SPINspiral and lalinference_mcmc
All Classes Files Functions Variables Pages
Functions/Subroutines
analyseMCMC_io.f90 File Reference

(AnalyseMCMC version 0.7.1, revision 448, hash 2f54722 (2013-11-19))

Input/output routines for AnalyseMCMC. More...

Functions/Subroutines

subroutine setconstants ()
 Define the constants. More...
 
subroutine read_settingsfile_old (status)
 Read the settings file (called analysemcmc.dat by default) - old version (< 2012-06) More...
 
subroutine read_settingsfile ()
 Read the settings file (called analysemcmc.dat by default) More...
 
subroutine try_old_settings_file (old_ip)
 Reading the settings file in the new (2012-06) namelist format didn't work, try the old format and save the data in the new format. More...
 
subroutine write_settingsfile ()
 Write a copy of the settings file (called analysemcmc.new by default) More...
 
subroutine set_plotsettings ()
 Set plot settings to 'default' values. More...
 
subroutine read_mcmcfiles (exitcode)
 Read the MCMC output files (SPINspiral.output.*, PTMCMC.output.*) More...
 
subroutine parnames2ids (parNameStr, nMCMCpar, parID)
 Convert parameter names to integer IDs. More...
 
subroutine mcmcruninfo (exitcode)
 Extract info from the chains and print some of it to screen. More...
 
subroutine save_data (exitcode)
 Save post-burnin data to file (__data.txt) More...
 
subroutine get_lim_injection_values (ic, nMCMCpar, startval, post, prior)
 Get injection values for LALInferenceMCMC (LIM) output. More...
 
subroutine error_maxmcmcpar_quit (op, maxMCMCpar, nMCMCpar)
 

Detailed Description

Input/output routines for AnalyseMCMC.

Function/Subroutine Documentation

subroutine setconstants ( )

Define the constants.

Referenced by analysemcmc().

subroutine read_settingsfile_old ( integer, intent(out)  status)

Read the settings file (called analysemcmc.dat by default) - old version (< 2012-06)

Return values
statusStatus: 0-ok

Referenced by try_old_settings_file().

subroutine read_settingsfile ( )

Read the settings file (called analysemcmc.dat by default)

References try_old_settings_file().

Referenced by analysemcmc().

subroutine try_old_settings_file ( integer, intent(in)  old_ip)

Reading the settings file in the new (2012-06) namelist format didn't work, try the old format and save the data in the new format.

old_ip Input unit currently open with the input file

References read_settingsfile_old(), and write_settingsfile().

Referenced by read_settingsfile().

subroutine write_settingsfile ( )

Write a copy of the settings file (called analysemcmc.new by default)

Referenced by analysemcmc(), and try_old_settings_file().

subroutine set_plotsettings ( )

Set plot settings to 'default' values.

Referenced by analysemcmc().

subroutine read_mcmcfiles ( integer, intent(out)  exitcode)

Read the MCMC output files (SPINspiral.output.*, PTMCMC.output.*)

Return values
exitcodeExit status code (0=ok)

References get_lim_injection_values(), and parnames2ids().

Referenced by analysemcmc().

subroutine parnames2ids ( character, dimension(*), intent(in)  parNameStr,
integer, intent(in)  nMCMCpar,
integer, dimension(maxmcmcpar), intent(out)  parID 
)

Convert parameter names to integer IDs.

Parameters
parNameStrString containing parameter names
nMCMCparNumber of (primary and secondary) MCMC parameters
Return values
parIDArray of parameter IDs

Referenced by read_mcmcfiles().

subroutine mcmcruninfo ( integer, intent(out)  exitcode)

Extract info from the chains and print some of it to screen.

Return values
exitcodeExit status code (0=ok)
Print MCMC run info:
  • determine Lmax, burn-in,
  • print chain info,
  • determine thinning for chains plots,
  • change/add parameters,
  • determine injection, start, Lmax values of chains,
  • compute jumps,
  • construct output file name,
  • store data in selDat (from allDat)

References compute_incli_polangr(), error_maxmcmcpar_quit(), eta2qr(), gmst(), m1m2_2_mcr(), and mc_q_2_m1_m2r().

Referenced by analysemcmc().

subroutine save_data ( integer, intent(out)  exitcode)

Save post-burnin data to file (__data.txt)

Return values
exitcodeExit status code (0=ok)

Referenced by analysemcmc().

subroutine get_lim_injection_values ( integer, intent(in)  ic,
integer, intent(in)  nMCMCpar,
real, dimension(maxchs,maxmcmcpar,3), intent(inout)  startval,
real, intent(out)  post,
real, intent(out)  prior 
)

Get injection values for LALInferenceMCMC (LIM) output.

Parameters
icCurrent chain/input file
nMCMCparNumber of MCMC parameters
startvalInjection/Staring/Lmax values (I/O)
Return values
postPosterior value for injection
priorPrior value for injection

Referenced by read_mcmcfiles().

subroutine error_maxmcmcpar_quit ( integer, intent(in)  op,
integer, intent(in)  maxMCMCpar,
integer, intent(in)  nMCMCpar 
)

Referenced by mcmcruninfo().