Package pipe_control :: Module error_analysis
[hide private]
[frames] | no frames]

Module error_analysis

source code

Module for performing Monte Carlo simulations for error analysis.

Functions [hide private]
 
covariance_matrix(epsrel=0.0, verbosity=2)
Estimate model parameter errors via the covariance matrix technique.
source code
 
monte_carlo_create_data(method=None, distribution=None, fixed_error=None)
Function for creating simulation data.
source code
 
monte_carlo_error_analysis()
Function for calculating errors from the Monte Carlo simulations.
source code
 
monte_carlo_initial_values()
Set the initial simulation parameter values.
source code
 
monte_carlo_off()
Turn simulations off.
source code
 
monte_carlo_on()
Turn simulations on.
source code
 
monte_carlo_select_all_sims(number=None, all_select_sim=None)
Set the select flag of all simulations of all models to one.
source code
 
monte_carlo_setup(number=None, all_select_sim=None)
Store the Monte Carlo simulation number.
source code
Variables [hide private]
  __package__ = 'pipe_control'

Imports: diag, ndarray, sqrt, gauss, statistics, RelaxError, check_pipe, return_api


Function Details [hide private]

covariance_matrix(epsrel=0.0, verbosity=2)

source code 

Estimate model parameter errors via the covariance matrix technique.

Note that the covariance matrix error estimate is always of lower quality than Monte Carlo simulations.

Parameters:
  • epsrel (float) - Any columns of R which satisfy |R_{kk}| <= epsrel |R_{11}| are considered linearly-dependent and are excluded from the covariance matrix, where the corresponding rows and columns of the covariance matrix are set to zero.
  • verbosity (int) - The amount of information to print. The higher the value, the greater the verbosity.

monte_carlo_create_data(method=None, distribution=None, fixed_error=None)

source code 

Function for creating simulation data.

Parameters:
  • method (str) - The type of Monte Carlo simulation to perform.
  • distribution (str) - Which gauss distribution to draw errors from. Can be: 'measured', 'red_chi2', 'fixed'.
  • fixed_error (float) - If distribution is set to 'fixed', use this value as the standard deviation for the gauss distribution.

monte_carlo_error_analysis()

source code 

Function for calculating errors from the Monte Carlo simulations.

The standard deviation formula used to calculate the errors is the square root of the bias-corrected variance, given by the formula:

              __________________________
             /   1
   sd  =    /  ----- * sum({Xi - Xav}^2)
          \/   n - 1

where

  • n is the total number of simulations.
  • Xi is the parameter value for simulation i.
  • Xav is the mean parameter value for all simulations.

monte_carlo_select_all_sims(number=None, all_select_sim=None)

source code 

Set the select flag of all simulations of all models to one.

Parameters:
  • number (int) - The number of Monte Carlo simulations to set up.
  • all_select_sim (list of lists of bool) - The selection status of the Monte Carlo simulations. The first dimension of this matrix corresponds to the simulation and the second corresponds to the models.

monte_carlo_setup(number=None, all_select_sim=None)

source code 

Store the Monte Carlo simulation number.

Parameters:
  • number (int) - The number of Monte Carlo simulations to set up.
  • all_select_sim (list of lists of bool) - The selection status of the Monte Carlo simulations. The first dimension of this matrix corresponds to the simulation and the second corresponds to the instance.