Пример #1
0
 def __init__(self,
              ds_in='',
              T1=0,
              V1=0,
              T2=0,
              V2=0,
              T3=0,
              V3=0,
              ds_out=''):
     """Define input fields for plugin."""
     self.fields = [
         plugins.FieldDataset('ds_in', 'Temperature dataset',
                              default=ds_in),
         plugins.FieldFloat('T1', 'First temperature value', default=T1),
         plugins.FieldCombo('V1',
                            'First known viscosity value',
                            default=V1,
                            items=methods,
                            editable=True),
         plugins.FieldFloat('T2', 'Second temperature value', default=T2),
         plugins.FieldCombo('V2',
                            'Second known viscosity value',
                            default=V2,
                            items=methods,
                            editable=True),
         plugins.FieldFloat('T3', 'Third temperature value', default=T3),
         plugins.FieldCombo('V3',
                            'Third known viscosity value',
                            default=V3,
                            items=methods,
                            editable=True),
         plugins.FieldDataset('ds_out',
                              'Output dataset name',
                              default=ds_out)
     ]
    def __init__(self,
                 d='',
                 T='',
                 std='NIST-SRM738',
                 start=50,
                 end=50,
                 label=True,
                 add=True):
        """Make list of fields."""

        self.fields = [
            plugins.FieldDataset("d", descr=_("Expansion dataset"), default=d),
            plugins.FieldDataset("T",
                                 descr=_("Temperature dataset"),
                                 default=T),
            plugins.FieldCombo("std",
                               descr=_("Calibraiton Standard"),
                               items=standards.keys(),
                               default=std),
            plugins.FieldFloat('start',
                               descr=_('First temperature margin'),
                               default=start),
            plugins.FieldFloat('end',
                               descr=_('Last temperature margin'),
                               default=end),
            plugins.FieldBool('label',
                              _('Draw calibration label'),
                              default=label),
            plugins.FieldBool('add',
                              _('Add calibration datasets'),
                              default=add),
        ]
 def __init__(self, target=[], axis='X', val=0., search='Nearest (Fixed X)', searchRange=25, critical_x='',
              text='Intercept\\\\%(xlabel)s=%(x).0f\\\\%(ylabel)s=%(y)E'):
     """Make list of fields."""
     self.fields = [
         plugins.FieldDatasetMulti(
             "target", descr="Datasets whose curves to intercept", default=target),
         plugins.FieldCombo(
             "axis", descr="Intercept on X or Y axis", items=['X', 'Y'], default=axis),
         plugins.FieldFloat('val', 'Value', default=val),
         plugins.FieldCombo("search", descr="Place nearest", items=[
                            'Nearest (Fixed X)', 'Nearest', 'Maximum', 'Minimum', 'Inflection', 'Stationary', 'None'], default=search),
         plugins.FieldFloat(
             'searchRange', descr='Nearest search range', default=searchRange),
         plugins.FieldDataset('critical_x',descr="Critical search X dataset", default=critical_x),
         plugins.FieldText('text', 'Label text', default=text),
     ]
 def __init__(self,
              ds='',
              ini=100.,
              auto=False,
              num=20,
              start=-1,
              method='mean',
              ds_x='',
              suppress_messageboxes=False):
     """Define input fields for plugin."""
     self.fields = [
         plugins.FieldDataset('ds', 'Dataset to configure', default=ds),
         plugins.FieldFloat('ini', 'Initial dimension value', default=ini),
         plugins.FieldBool('auto',
                           'OR, automatic calculation based of fist points',
                           default=auto),
         plugins.FieldInt('start', 'Consider 100% at X=', default=start),
         plugins.FieldInt('num',
                          'Number of point to use in auto-calc',
                          default=num),
         plugins.FieldCombo('method',
                            'Method for auto-calc',
                            default=method,
                            items=('linear-regression', 'mean')),
         plugins.FieldDataset('ds_x',
                              'X Dataset for linear regression',
                              default=ds_x),
         plugins.FieldBool('suppress_messageboxes',
                           'Suppress confirmation message boxes',
                           default=suppress_messageboxes)
     ]
    def __init__(self,
                 reference_curve_full_path='/',
                 translating_curve_1_full_path='/',
                 translating_curve_2_full_path=None):

        self.fields = [
            plugins.FieldWidget("reference_curve",
                                descr="Reference curve:",
                                widgettypes=set(['xy']),
                                default=reference_curve_full_path),
            plugins.FieldWidget("translating_curve_1",
                                descr="Translating curve 1:",
                                widgettypes=set(['xy']),
                                default=translating_curve_1_full_path),
        ]

        if translating_curve_2_full_path:
            self.fields.append(
                plugins.FieldWidget("translating_curve_2",
                                    descr="Translating curve 2:",
                                    widgettypes=set(['xy']),
                                    default=translating_curve_2_full_path))

        self.fields = self.fields + [
            plugins.FieldFloat(
                "matching_x_value", descr="Matching X Value", default=0.),
            plugins.FieldCombo("mode",
                               descr="Translation Mode:",
                               items=['Translate Values', 'Translate Axes'],
                               default="Translate Values")
        ]
    def __init__(self, ds0='', T0='', E0=200, h0=2,
                 ds1='', T1='', E1=300, h1=1,
                 ds2='', T2='', E2=400, h2=5,
                 L0=80, num=100, ds_out='simflex'):
        """Define input fields for plugin."""
        self.fields = [
            plugins.FieldDataset(
                'ds0', 'Top layer (L0) dilatation curve', default=ds0),
            plugins.FieldDataset(
                'T0', 'Top layer (L0) temperature curve', default=T0),
            plugins.FieldFloat('E0', 'L0 Elasticity Modulus', default=E0),
            plugins.FieldFloat('h0', 'L0 Thickness', default=h0),

            plugins.FieldDataset(
                'ds1', 'Second layer (L1) dilatation curve', default=ds1),
            plugins.FieldDataset(
                'T1', 'Second layer (L1) temperature curve', default=T1),
            plugins.FieldFloat('E1', 'L1 Elasticity Modulus', default=E1),
            plugins.FieldFloat('h1', 'L1 Thickness', default=h1),

            plugins.FieldDataset(
                'ds2', 'Third layer (L2) dilatation curve', default=ds2),
            plugins.FieldDataset(
                'T2', 'Third layer (L2) temperature curve', default=T2),
            plugins.FieldFloat('E2', 'L2 Elasticity Modulus', default=E2),
            plugins.FieldFloat('h2', 'L2 Thickness', default=h2),

            plugins.FieldFloat(
                'L0', 'Sample Starting length (rods inter-axis)', default=L0),
            plugins.FieldInt(
                'num', 'Number of flexure points to generate ', default=num),
            plugins.FieldDataset(
                'ds_out', 'Output dataset name', default=ds_out),
        ]
Пример #7
0
 def __init__(self, ds_x='', ds_y='', start=50., percent=0., factor=1., 
              reconfigure='Stop', smooth=5, smode='X and Y', linearize=150, ds_out='coeff'):
     """Define input fields for plugin."""
     self.fields = [
         plugins.FieldDataset('ds_x', 'X Dataset', default=ds_x),
         plugins.FieldDataset('ds_y', 'Y Dataset', default=ds_y),
         plugins.FieldFloat('start', 'Starting X value', default=start),
         plugins.FieldFloat(
             'percent', descr='Initial dimension', default=percent),
         plugins.FieldFloat(
             'factor', descr='Divide by', default=factor),
         plugins.FieldCombo('reconfigure', descr='When cooling is found', items=[
                            'Restart', 'Stop'], default=reconfigure),
         plugins.FieldInt('smooth', 'Smoothing Window', default=smooth),
         plugins.FieldCombo('smode', descr='Apply Smoothing to', items=[
                            'X and Y', 'Y alone', 'Output'], default=smode),
         plugins.FieldInt('linearize', 'Linearization window', default=linearize),
         plugins.FieldDataset(
             'ds_out', 'New output dataset name', default=ds_out),
     ]
Пример #8
0
 def __init__(self, ax='', ay='', bx='', by='', relative=True, smooth=False, tolerance=10., operation='A-B', ds_out=''):
     """Define input fields for plugin."""
     self.fields = [
         plugins.FieldDataset('ay', 'Curve A: Y dataset', default=ay),
         plugins.FieldDataset('ax', 'Curve A: X dataset', default=ax),
         plugins.FieldDataset('by', 'Curve B: Y dataset', default=by),
         plugins.FieldDataset('bx', 'Curve B: X dataset', default=bx),
         # TODO: might support unlimited number of curves, thanks to numexpr
         plugins.FieldText(
             'operation', 'Operation to perform. ', default=operation),
         plugins.FieldBool(
             "relative", descr="Coincident start", default=relative),
         plugins.FieldBool(
             "smooth", descr="Smooth x data", default=smooth),
         plugins.FieldFloat(
             "tolerance", descr="X rectification tolerance", default=tolerance),
         plugins.FieldDataset(
             'ds_out', 'Output dataset name', default=ds_out)
     ]
     self.error = 0