Posts by author schueller

Slides of the 10th Users day

Hello folks,

Here are the slides from the users day # 10 of june 2017.

j

  • Posted: 2017-06-22 15:05 (Updated: 2017-06-23 11:27)
  • Author: schueller
  • Categories: (none)
  • Comments (0)

User day #10

User day # 10 will be held the 6th June 2017 at EDF Chatou in Paris.

This year the theme will be scikit-learn/openturns.

To register send a mail to anne.dutfoy[at]edf.fr

  • Posted: 2017-03-21 09:18 (Updated: 2017-03-24 11:28)
  • Author: schueller
  • Categories: (none)
  • Comments (0)

Slides of the 8th User's day

Hi,

Here are the slides of the 8th OpenTURNS User's day held on 2015/06/12 at EDF R&D.

J.

OT function decorator

Hi,

Here is an easier way to pass python functions to openturns

First define once this decorator for python functions (could be proposed in a future version):

def FunctionDecorator(n, p):
  class otfunc(OpenTURNSPythonFunction):
      
    def __init__(self, func):
      OpenTURNSPythonFunction.__init__(self, n, p) 
      self.__class__.__name__ = func.__name__
      self._exec = func 
        
  return otfunc

Then apply it to your function by adding this one line:

@FunctionDecorator(2, 1)
def SIMPLEFUNC(X):
    Y = [ X[0] + X[1] ]    
    return Y

Then use it through OpenTURNS as usual:

myFunc = NumericalMathFunction( SIMPLEFUNC )

This is open for discussion ...

J.

OT Plotting capabilities using Matplotlib

Hi,

The work on a new module has begun to plot OpenTURNS graphs through matplotlib.

Those who want a preview of the capabilities can check it out here: viewer

This development is not finalized yet, but we welcome any comments.
To test it, just download this single python script and run it, it will show the following examples.
You can copy it somewhere in your openturns python module path (/usr/lib/python2.7/dist-packages/openturns on debian/ubuntu)

import openturns as ot
from openturns.viewer import View
# create a graph
graph = ot.Normal().drawPDF()

# create a View, accepted keywords are figure.add_subplot+axes.plot/axes.pie/axes.bar/axes.contour+axes.clabel/axes.step ones depending on the kind of graph
view = View(graph, plot_kwargs={'color':'blue'})

# save to a file, accepted keywords are figure.savefig ones
view.save('curve.png', dpi=100)

# show the graph on the screenn, accepted keywords are pyplot.show ones
view.show(block=False)


Here are a few samples:
/raw-attachment/blog/Matplotlib%20module/curve1.png /raw-attachment/blog/Matplotlib%20module/curve2.png
/raw-attachment/blog/Matplotlib%20module/curve3.png /raw-attachment/blog/Matplotlib%20module/curve4.png
/raw-attachment/blog/Matplotlib%20module/curve5.png /raw-attachment/blog/Matplotlib%20module/curve6.png
/raw-attachment/blog/Matplotlib%20module/curve7.png /raw-attachment/blog/Matplotlib%20module/curve8.png
/raw-attachment/blog/Matplotlib%20module/curve9.png /raw-attachment/blog/Matplotlib%20module/curve10.png

J.