Beispiel #1
0
    def __init__(self):
        Node.__init__(self)
        #[left, bottom, width,      height]
        self.add_input(name='input')
        self.add_input(name='clear', interface=IBool, value=True)
        self.add_input(name='left', interface=IFloat(0, 1, 0.01), value=0.12)
        self.add_input(name='bottom', interface=IFloat(0, 1, 0.01), value=0.12)
        self.add_input(name='width', interface=IFloat(0, 1, 0.01), value=0.78)
        self.add_input(name='height', interface=IFloat(0, 1, 0.01), value=0.78)
        self.add_input(name='axisbg',
                       interface=IEnumStr(tools.colors.keys()),
                       value='white')
        self.add_input(name='frameon', interface=IBool, value=True)
        self.add_input(name='polar', interface=IBool, value=False)
        self.add_input(name='xscale',
                       interface=IEnumStr(tools.scale.keys()),
                       value='linear')
        self.add_input(name='yscale',
                       interface=IEnumStr(tools.scale.keys()),
                       value='linear')
        self.add_input(name='xticks',
                       interface=IEnumStr(tools.ticks.keys()),
                       value='auto')
        self.add_input(name='yticks',
                       interface=IEnumStr(tools.ticks.keys()),
                       value='auto')
        self.add_input(name='kwargs', interface=IDict, value={})
        self.add_output(name='axes', interface=IDict, value={})

        self.axe = None
Beispiel #2
0
    def __init__(self):
        Node.__init__(self)

        self.add_input(name='boxstyle',
                       interface=IEnumStr(tools.boxstyles.keys()),
                       value='round')
        self.add_input(name='fc', interface=IFloat(0, 1, 0.1), value=0.8)
        self.add_input(name='pad', interface=IFloat(0, 1, 0.1), value=0.3)
        self.add_output(name='output', interface=IDict)
Beispiel #3
0
    def __init__(self):
        Node.__init__(self)
        self.add_input(name='alpha', interface=IFloat(0, 1, 0.1), value=1)
        self.add_input(name='color',
                       interface=IEnumStr(tools.colors.keys()),
                       value='k')
        self.add_input(name='fontproperties',
                       interface=IDict,
                       value={
                           'family': 'sans-serif',
                           'size': 12,
                           'stretch': 'normal',
                           'style': 'normal',
                           'weight': 'normal',
                           'variant': 'normal'
                       })
        self.add_input(name='horizontalalignment',
                       interface=IEnumStr(tools.horizontalalignment.keys()),
                       value='left')
        self.add_input(name='rotation',
                       interface=IFloat(-180, 180, 10),
                       value=0)
        self.add_input(name='verticalalignment',
                       interface=IEnumStr(tools.verticalalignment.keys()),
                       value='baseline')
        self.add_input(
            name='kwargs',
            interface=IDict,
            value={
                #'agg_filter': None,
                #            'animated': False,
                #            'axes': None,
                #            'clip_box': None,
                #            'clip_on': True,
                #            'clip_path': None,
                #            'contains': None,
                #            'figure': None,
                #            'gid': None,
                #            'path_effects': None,
                #            'picker': None,
                #            'rasterized': None,
                #            'rotation_mode': None,
                #            'snap': None,
                #            'text': '',
                #            'transform': None,
                'url': None,
                #            'visible': True,
                'zorder': 3
            })

        self.add_output(name='kwds', interface=IDict, value={})
Beispiel #4
0
 def __init__(self):
     Node.__init__(self)
     self.add_input(name='width', interface=IFloat(0, 100, 0.1), value=4)
     #figure, xytip and xybase are not needed
     self.add_input(name='headwidth',
                    interface=IFloat(0, 100, 0.1),
                    value=12)
     self.add_input(name='frac', interface=IFloat(0, 1, 0.05), value=0.1)
     self.add_input(name='alpha', interface=IFloat(0, 1, 0.05), value=1)
     self.add_input(name='color',
                    interface=IEnumStr(tools.colors.keys()),
                    value='blue')
     self.add_input(name='kwargs', interface=IDict, value={})
     self.add_output(name='output', interface=IDict, value={})
Beispiel #5
0
    def __init__(self):
        Node.__init__(self)
        self.add_input(name='time')
        self.add_input(name='method',
                       interface=IEnumStr(
                           growth.GrowthFunction.growth_function_methods),
                       value='sigmoid')
        self.add_input(name='inf bound', interface=IFloat, value=0)
        self.add_input(name='sup bound', interface=IFloat, value=1)
        self.add_input(name='growth rate',
                       interface=IFloat(-5, 5, 0.05),
                       value=1)
        self.add_input(name='maturation', interface=IFloat, value=12)
        self.add_input(name='nu', interface=IFloat(0, 100, 0.1), value=1)

        self.add_output(name='data')
Beispiel #6
0
    def __init__(self):
        Node.__init__(self)
        CustomizeAxes.__init__(self)

        self.add_input(name='axes')
        self.add_input(name="shadow", interface=IBool, value=False)
        self.add_input(name="location",
                       interface=IEnumStr(tools.locations.keys()),
                       value=0)
        self.add_input(name="numpoints", interface=IInt, value=2)
        self.add_input(name="markerscale",
                       interface=IFloat(0.1, 10, 0.1),
                       value=1)
        self.add_input(name="fancybox", interface=IBool, value=True)
        self.add_input(name="ncol", interface=IInt(1, 10), value=1)
        self.add_input(name="mode",
                       interface=IEnumStr({
                           'None': 'None',
                           'Expanded': 'exapanded'
                       }),
                       value=None)
        self.add_input(name="title", interface=IStr, value=None)
        #rodo scatterpoints
        #borderpad          the fractional whitespace inside the legend border
        #    labelspacing       the vertical space between the legend entries
        #    handlelength       the length of the legend handles
        #    handletextpad      the pad between the legend handle and text
        #    borderaxespad      the pad between the axes and legend border
        #    columnspacing      the spacing between columns
        #borderaxespad
        self.add_input(name="prop", interface=IDict, value={})
        #p = pylab.matplotlib.font_manager.FontProperties(size=26)

        self.add_output(name="kwds", interface=IDict, value={})
Beispiel #7
0
    def __init__(self):
        Node.__init__(self)
        self.add_input(name='name', interface=IStr, value='tropism')
        self.add_input(name='tropism', interface=IBool, value=True)
        self.add_input(name='z-tropism', interface=IFloat, value=-1)
        self.add_input(name='elasticity',
                       interface=IFloat(0, 1, 0.01),
                       value=0.05)

        self.add_output(name='section_name', interface=IStr, value=None)
        self.add_output(name='options', interface=IDict, value={})
Beispiel #8
0
 def __init__(self):
     Node.__init__(self)
     self.add_input(name='name', interface=IStr, value='apex')
     self.add_input(name='demand',
                    interface=IFloat(0, 1, 0.01),
                    value=1. / 3.)
     self.add_input(name='plastochron', interface=IFloat, value=3.)
     self.add_input(name='store_data', interface=IBool, value=True)
     self.add_input(name='growth_threshold', interface=IFloat, value=0.2)
     self.add_output(name='section_name', interface=IStr, value=None)
     self.add_output(name='options', interface=IDict, value={})
Beispiel #9
0
 def __init__(self):
     Node.__init__(self)
     self.add_input(name='x', interface=IFloat, value=0)
     self.add_input(name='y', interface=IFloat, value=0)
     self.add_input(name='r', interface=IFloat, value=0)
     self.add_input(name='theta1', interface=IFloat, value=0)
     self.add_input(name='theta2', interface=IFloat, value=0)
     self.add_input(name='width',
                    interface=IFloat(0.01, 1, 0.01),
                    value=None)
     self.add_input(name='patch', interface=IDict, value={})
     self.add_output(name='return', value=None)
Beispiel #10
0
    def __init__(self):

        Node.__init__(self)

        funs = self.distr_func.keys()
        funs.sort()
        self.add_input(name="Type", interface=IEnumStr(funs), value=funs[0])
        self.add_input(name="Cluster number", interface=IInt(min=1), value=2)
        self.add_input(name="Cluster radius",
                       interface=IFloat(0.01, 1, 0.01),
                       value=0.2)
        self.add_output(name="Distribution", interface=None)
Beispiel #11
0
 def __init__(self):
     Node.__init__(self)
     self.add_input(name='name', interface=IStr, value='leaf')
     self.add_input(name='resource',
                    interface=IFloat(0, 1, 0.01),
                    value=0.2)
     self.add_input(name='maturation', interface=IFloat, value=21)
     self.add_input(name='growth_function',
                    interface=IEnumStr(['sigmoid']),
                    value='sigmoid')
     self.add_input(name='efficiency_method',
                    interface=IEnumStr(['unity', 'sigmoid']),
                    value='unity')
     self.add_input(name='store_data', interface=IBool, value=False)
     self.add_output(name='section_name', interface=IStr, value=None)
     self.add_output(name='options', interface=IDict, value={})
Beispiel #12
0
    def __init__(self):

        Node.__init__(self)
        #self.add_input(name="text", interface=IStr)
        #self.add_input(name="fontdict", interface=IDict, value=None)
        self.add_input(name="fontsize", interface=IFloat, value=12.)
        self.add_input(name="alpha",
                       interface=IFloat(0., 1., step=0.1),
                       value=0.5)
        self.add_input(name="color",
                       interface=IEnumStr(tools.colors.keys()),
                       value='blue')
        self.add_input(name='backgroundcolor',
                       interface=IEnumStr(tools.colors.keys()),
                       value='white')
        self.add_input(name='rotation', interface=IFloat, value='horizontal')
        #self.add_input(name="withdash", interface=IBool, value=False)
        self.add_input(name="kwargs", interface=IDict, value={})
        self.add_input(name="fontproperties", interface=IDict, value={})

        self.add_output(name="kwargs", interface=IDict, value=None)
Beispiel #13
0
    def __init__(self):
        Node.__init__(self)
        self.add_input(name='alpha', interface=IFloat(0, 1, 0.1), value=1.)
        self.add_input(name='axes', interface=IDict, value={})
        self.add_input(name='color',
                       interface=IEnumStr(tools.colors.keys()),
                       value='None')
        self.add_input(name='edgecolor',
                       interface=IEnumStr(tools.colors.keys()),
                       value='black')
        self.add_input(name='facecolor',
                       interface=IEnumStr(tools.colors.keys()),
                       value='blue')
        self.add_input(name='figure', interface=IDict, value=None)
        self.add_input(name='fill', interface=IBool, value=True)
        self.add_input(name='label', interface=IStr, value=None)
        self.add_input(name='linestyle',
                       interface=IEnumStr(tools.linestyles.keys()),
                       value='solid')
        self.add_input(name='linewidth', interface=IFloat, value=None)

        self.add_output(name='output')
Beispiel #14
0
__all__ = ["domain", 'basic_dist', 'aggr_dist', 'rand2d', 'spatial_dist']

domain = Fa(
    uid="7c062fc84e7711e6bff6d4bed973e64a",
    name="Domain",
    description="Generates domain tuple",
    category="Spatial,scene",
    nodemodule="openalea.spatial.distribGen",
    nodeclass="domain",
    inputs=(
        dict(name="X min", interface=IInt, value=0, showwidget=True),
        dict(name="X max", interface=IInt, value=1, showwidget=True),
        dict(name="Y min", interface=IInt, value=0, showwidget=True),
        dict(name="Y max", interface=IInt, value=1, showwidget=True),
        dict(name="Scale factor",
             interface=IFloat(min=1, step=10),
             value=1,
             showwidget=True),
    ),
    outputs=(dict(name="domain2D", ), ),
)

basic_dist = Fa(
    uid="7c062fc94e7711e6bff6d4bed973e64a",
    name="Basic Distribution",
    description="Basic spatial distributions",
    category="Spatial,scene",
    nodemodule="openalea.spatial.distribGen",
    nodeclass="basic_distrib",
)
Beispiel #15
0
     'name': 'Property to use as Geometry',
     'value': 'geometry',
     'desc': ''
 }, {
     'interface': IInt,
     'name': 'Deault for optid',
     'value': 1,
     'desc': ''
 }, {
     'interface': IInt,
     'name': 'Defalt for opacity',
     'value': 0,
     'desc': ''
 }, {
     'interface':
     IFloat(min=0, max=16777216, step=0.000001),
     'name':
     'minimal area',
     'value':
     1e-05,
     'desc':
     ''
 }],
 outputs=[{
     'interface':
     None,
     'name':
     'mtgId',
     'desc':
     'list of mtd id associated with triangles'
 }, {
 def __init__(self):
     Node.__init__(self)
     self.add_input(name='window', interface=IEnumStr(self.windows), value='hanning')
     self.add_input(name='n', interface=IInt, value=256)
     self.add_input(name='beta (kaiser only)', interface=IFloat(0.,100.,1), value=14.)
     self.add_output(name='array')