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

Module monte_carlo

source code

Module for performing Monte Carlo simulations for error analysis.

Functions [hide private]
 
create_data(method=None)
Function for creating simulation data.
source code
 
error_analysis()
Function for calculating errors from the Monte Carlo simulations.
source code
 
initial_values()
Set the initial simulation parameter values.
source code
 
off()
Turn simulations off.
source code
 
on()
Turn simulations on.
source code
 
select_all_sims(number=None, all_select_sim=None)
Set the select flag of all simulations of all models to one.
source code
 
setup(number=None, all_select_sim=None)
Function for setting up Monte Carlo simulations.
source code
Variables [hide private]
  __package__ = 'pipe_control'

Imports: ndarray, gauss, statistics, RelaxError, pipes, get_specific_fn


Function Details [hide private]

create_data(method=None)

source code 

Function for creating simulation data.

Parameters:
  • method (str) - The type of Monte Carlo simulation to perform.

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.

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.

setup(number=None, all_select_sim=None)

source code 

Function for setting up Monte Carlo simulations.

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.