analysis_modules.uq package

Submodules

analysis_modules.uq.uq module

class analysis_modules.uq.uq.PCE(df, rand_vars, obj_vars, poly_type)[source]

Bases: object

Methods

He

Le

cross_validation

get_pce

projection

regression

self_validation

update_symbols_dict

static He(n, x, symbol=None)[source]
static Le(n, x, symbol=None)[source]
cross_validation()[source]
get_pce(p_order=1, truncation=1)[source]
projection()[source]
regression(poly_list_sym, symbols_dict)[source]
self_validation()[source]
static update_symbols_dict(sym_dict, values)[source]
class analysis_modules.uq.uq.UQModel[source]

Bases: object

Methods

run_analysis()

Model is a function or routine that takes in some input variables as a pandas dataframe

set_input_variables(dd)

Structure of dd dd = { "random variables": 'x1', 'x2', ..., 'xn', "objective variables": 'v1', 'v2', ..., 'vm', 'bounds': [[]1, []2,..., []n], 'distribution': [d1, d2, ..., dn] } } If the distribution is uniform, bounds holds a list of the lower and upper bounds of the corresponding variable, respectively. if the distribution is set to Lognormal, bounds holds a list of the mean and standard deviation of the corresponding variable, respectively.

sobol_janon()

A starts from 0 to N-1 B starts from N to 2N - 1 AB0 starts from 2N to 3N - 1

sobol_satelli()

A starts from 0 to N-1 B starts from N to 2N - 1 AB0 starts from 2N to 3N - 1

example_simplySupportedBeam

generate_input_mc

generate_input_qmc

generate_input_space

generate_sobol_sequence

method

plot_sobol

plot_table

set_model

set_sample_size

sobol_df

sub_lists

example_simplySupportedBeam()[source]
static generate_input_mc(N, rand_vars, bounds)[source]
static generate_input_qmc(N, rand_vars, bounds)[source]
generate_input_space()[source]
static generate_sobol_sequence(dim, index, columns, bounds)[source]
method()[source]
plot_sobol(S, ylabel='Sobol', table=False, plot_type='Stacked')[source]
static plot_table(S, x, ax)[source]
run_analysis()[source]

Model is a function or routine that takes in some input variables as a pandas dataframe

set_input_variables(dd)[source]

Structure of dd dd = {

“random variables”: ‘x1’, ‘x2’, …, ‘xn’, “objective variables”: ‘v1’, ‘v2’, …, ‘vm’, ‘bounds’: [[]1, []2,…, []n], ‘distribution’: [d1, d2, …, dn] }

} If the distribution is uniform, bounds holds a list of the lower and upper bounds of the corresponding variable, respectively. if the distribution is set to Lognormal, bounds holds a list of the mean and standard deviation of the corresponding variable, respectively

set_model(model)[source]
set_sample_size(n)[source]
sobol_df()[source]
sobol_janon()[source]

A starts from 0 to N-1 B starts from N to 2N - 1 AB0 starts from 2N to 3N - 1

sobol_satelli()[source]

A starts from 0 to N-1 B starts from N to 2N - 1 AB0 starts from 2N to 3N - 1

static sub_lists(ll)[source]
analysis_modules.uq.uq.dqw_pce_from_df(model_input, df)[source]
analysis_modules.uq.uq.example_simplySupportedBeam(model_input, df)[source]
analysis_modules.uq.uq.func(model_input, df)[source]
analysis_modules.uq.uq.ishigami(model_input, df)[source]
analysis_modules.uq.uq.toy_problem(model_input, df)[source]

analysis_modules.uq.uq_cavity module

class analysis_modules.uq.uq_cavity.UQ[source]

Bases: object

Methods

get_qoi_value(d, obj, n_cells, norm_length)

Get SLANS quantities of itnerest

perform_geometry_checks(par_half_cell)

param par_half_cell

Geometric parameters of half call of cavity: [A, B, a, b, Ri, L, Req, alpha]

uq(key, shape, qois[, f_shift, bc, ...])

param key

static get_qoi_value(d, obj, n_cells, norm_length)[source]

Get SLANS quantities of itnerest

Parameters
d: dict

obj:

n_cells: int

norm_length: float

Normalisation length :math: `E_mathrm{acc} =

rac{V_{acc}}{L_{norm}`.
Returns
static perform_geometry_checks(par_half_cell)[source]
Parameters

par_half_cell (list, array like) – Geometric parameters of half call of cavity: [A, B, a, b, Ri, L, Req, alpha]

uq(key, shape, qois, f_shift=801580000.0, bc='mm', parentDir='', projectDir='', rand_vars=None, constraint=None)[source]
Parameters
  • key (str) –

  • shape (list, array like) –

  • qois (list, array like) – Quantities of interest

  • f_shift (float) – Frequency shift

  • bc (str) – Bounday condition, 1:inner contour, 2:Electric wall Et = 0, 3:Magnetic Wall En = 0, 4:Axis, 5:metal

  • parentDir (str) – Parent directory

  • projectDir (str) – Project directory

  • rand_vars (list, array like) – Random variables

  • constraint (list, array like) – Constraints

analysis_modules.uq.uq_cavity.print_(*arg)[source]

Module contents