Exemple #1
0
    def __init__(self,
                 ds_in='',
                 method='hanning',
                 window=5,
                 ds_out='',
                 end_index=0):
        """Define input fields for plugin."""

        self.fields = [
            plugins.FieldDataset('ds_in',
                                 'Dataset to be smoothed',
                                 default=ds_in),
            plugins.FieldCombo('method',
                               'Smoothing method',
                               default=method,
                               items=('flat', 'hanning', 'hamming', 'bartlett',
                                      'blackman', 'kaiser'),
                               editable=False),
            plugins.FieldInt('window', 'Window length', default=window),
            plugins.FieldInt('start_index', 'Start index', minval=0,
                             default=0),
            plugins.FieldInt('end_index',
                             'End index (0 = last)',
                             minval=0,
                             default=end_index),
            plugins.FieldDataset('ds_out',
                                 'Output dataset name',
                                 default=ds_out)
        ]
Exemple #2
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):
        """Construct plugin."""
        super().__init__()
        self.mimedata = qt.QApplication.clipboard().mimeData()
        #self.charts = []

        self.fields = [
            plugins.FieldText("text", descr="test", default="DEFAULT"),
            plugins.FieldTextEdit("textedit", descr="test", default="DEFOFO"),
            plugins.FieldWidget("parent_widget",
                                descr="Parent widget",
                                default=""),
            plugins.FieldDataset('ds1',
                                 descr="Dataset 1 to change",
                                 default=''),
            plugins.FieldDatasetMulti('ds1repl',
                                      descr="Replacement(s) for dataset 1"),
            plugins.FieldDataset('ds2',
                                 descr="Dataset 2 to change (optional)",
                                 default=''),
            plugins.FieldDatasetMulti(
                'ds2repl',
                descr="Replacement(s) for dataset 2",
            ),
            plugins.FieldBool("names",
                              descr="Build new names from datasets",
                              default=True),
        ]
 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,
                 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),
        ]
Exemple #6
0
 def __init__(self):
     """Make list of fields."""
     self.fields = [
         plugins.FieldWidget("widget", descr="Select graph", default="/"),
         plugins.FieldDataset("xPos", descr="X coordinates for labels"),
         plugins.FieldDataset("yPos", descr="Y coordinates for labels"),
         plugins.FieldDataset("labels", descr="List of labels"),
     ]
    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),
        ]
    def __init__(self, curve='', x=''):
        """Make list of fields."""

        self.fields = [
            plugins.FieldWidget("curve",
                                descr="Curve:",
                                widgettypes=set(['xy']),
                                default=curve),
            plugins.FieldDataset("x", descr="Colorize by:", default=x),
        ]
Exemple #9
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),
     ]
Exemple #10
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
Exemple #11
0
 def __init__(self, ds='', propagate=False, action='Invert', auto=True):
     """Define input fields for plugin."""
     self.fields = [
         plugins.FieldDataset('ds', 'Dataset to convert', default=ds),
         plugins.FieldBool(
             "propagate",
             descr="Apply to all datasets sharing the same Y axis:",
             default=propagate),
         plugins.FieldCombo("action",
                            descr="Conversion mode:",
                            items=['Invert'],
                            default=action),
         plugins.FieldBool("auto",
                           descr="Auto initial dimension",
                           default=auto)
     ]
 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),
     ]
Exemple #13
0
    def __init__(self, ds='', propagate=False, convert='None'):
        """Define input fields for plugin."""

        kgroup, f, p = units.get_unit_info(convert, units.from_base)
        items = units.from_base.get(kgroup, {convert: lambda v: v}).keys()
        self.fields = [
            plugins.FieldDataset('ds', 'Dataset to convert', default=ds),
            plugins.FieldCombo("convert",
                               descr="Convert to:",
                               items=items,
                               default=convert),
            plugins.FieldBool(
                "propagate",
                descr="Apply to all datasets sharing the same Y axis:",
                default=propagate),
        ]