Aggregate processesΒΆ

In this example we are going to concatenate several processes that share the same mesh.

In [55]:
from __future__ import print_function
import openturns as ot
In [56]:
# Create processes to aggregate
myMesher = ot.IntervalMesher(ot.Indices([100,10]))
lowerbound = [0.0, 0.0]
upperBound = [2.0, 4.0]
myInterval = ot.Interval(lowerbound, upperBound)
myMesh = myMesher.build(myInterval)
myProcess1 = ot.WhiteNoise(ot.Normal(), myMesh)
myProcess2 = ot.WhiteNoise(ot.Triangular(), myMesh)

In [57]:
# Draw values of a realization of the 2nd process
marginal = ot.HistogramFactory().build(myProcess1.getRealization().getValues())
marginal.drawPDF()
Out[57]:
../../_images/examples_probabilistic_modeling_aggregated_process_4_0.svg
In [58]:
# Create an aggregated process
myAggregatedProcess = ot.AggregatedProcess([myProcess1, myProcess2])
In [59]:
# Draw values of the realization on the 2nd marginal
marginal = ot.HistogramFactory().build(myAggregatedProcess.getRealization().getValues().getMarginal(0))
marginal.drawPDF()
Out[59]:
../../_images/examples_probabilistic_modeling_aggregated_process_6_0.svg