示例#1
0
 def traits_view(self):
     v = View(VGroup(BorderVGroup(Item('use_cocktail_irradiation',
                                       tooltip='Use the special cocktail.json for defining the '
                                               'irradiation flux and chronology',
                                       label='Use Cocktail Irradiation')),
                     BorderVGroup(Item('update_currents_enabled', label='Enabled'),
                                  label='Current Values'),
                     BorderVGroup(HGroup(Item('use_cache', label='Enabled'),
                                         Item('max_cache_size', label='Max Size')),
                                  label='Cache')))
     return v
示例#2
0
    def traits_view(self):
        icgrp = BorderVGroup(UItem('ic_factors',
                                   editor=ListEditor(mutable=False,
                                                     style='custom',
                                                     editor=InstanceEditor())),
                             label='IC Factors')

        runid_grp = BorderVGroup(HGroup(Item('aliquot'), Item('step')),
                                 label='RunID')

        v = okcancel_view(VGroup(icgrp, runid_grp), title='Bulk Edit Options')
        return v
示例#3
0
    def _get_global_group(self):
        g = BorderHGroup(
            Item('controller.save_enabled', label='Enabled'),
            Item('controller.fit'), UItem('controller.error_type', width=-75),
            Item('controller.filter_outliers', label='Filter Outliers'),
            Item('show_sniff'))

        gg = BorderVGroup(
            Item('controller.goodness_threshold',
                 label='Intercept Goodness',
                 tooltip='If % error is greater than "Goodness Threshold" '
                 'mark regression as "Bad"'),
            HGroup(
                Item(
                    'controller.slope_goodness',
                    label='Slope Goodness',
                    tooltip='If slope of regression is positive and the isotope '
                    'intensity is greater than "Slope Goodness Intensity" '
                    'then mark regression as "Bad"'),
                Item('controller.slope_goodness_intensity',
                     label='Intensity')),
            Item(
                'controller.outlier_goodness',
                label='Outlier Goodness',
                tooltip=
                'If more than "Outlier Goodness" points are identified as outliers'
                'then mark regression as "Bad"'),
            HGroup(Item('controller.curvature_goodness'),
                   Item('controller.curvature_goodness_at')),
            HGroup(
                Item(
                    'controller.rsquared_goodness',
                    tooltip=
                    'If R-squared is less than threshold mark regression as "Bad"'
                )),
            HGroup(
                Item(
                    'controller.signal_to_blank_goodness',
                    tooltip=
                    'If Blank/Signal*100 greater than threshold mark regression as "Bad"'
                )))

        agrp = self._get_analysis_group()
        return VGroup(
            agrp,
            Item('controller.global_goodness_visible',
                 label='Global Edit Visible'),
            BorderVGroup(g,
                         gg,
                         label='Global',
                         visible_when='controller.global_goodness_visible'))
示例#4
0
    def traits_view(self):
        integrated_grp = BorderVGroup(Item('integrated_age_weighting',
                                           label='Weighting'),
                                      Item('integrated_include_omitted',
                                           label='Include Omitted'),
                                      Item('include_j_error_in_integrated',
                                           label='Include J Error'),
                                      label='Integrated Age')
        iso_grp = BorderVGroup(HGroup(Item('use_isochron_trapped',
                                           label='Use Isochron'),
                                      Item('include_isochron_trapped_error'),
                                      label='Include Uncertainty'),
                               label='Trapped Ar40/Ar36')

        return self._make_view(VGroup(integrated_grp, iso_grp))
    def traits_view(self):
        cols = [ObjectColumn(name='name', label='Component'),
                MagnitudeColumn(name='value',
                                label=''),
                ObjectColumn(name='value', label='Value',
                             width=100,
                             format_func=lambda x: floatfmt(x, n=5))]
        editor = TableEditor(columns=cols,
                             sortable=False,
                             editable=False)

        e1 = BorderVGroup(UItem('error_components', editor=editor), label='With J Err.')
        e2 = BorderVGroup(UItem('error_components2', editor=editor), label='With Position Err.')
        v = View(HGroup(e1, e2))
        return v
示例#6
0
    def _get_edit_group(self):
        cnt_grp = self._get_cnt_grp()
        cmp_grp = self._get_cmp_grp()
        opt_grp = self._get_opt_grp()
        atype_grp = self._get_atype_grp()

        act_grp = BorderVGroup(
            HGroup(
                Item('action'),
                Item('nskip', enabled_when='action=="Skip N Runs"',
                     label='N')),
            HGroup(Item('use_truncation', label='Truncate'),
                   Item('use_termination', label='Terminate')),
            BorderHGroup(UItem(
                'extraction_str',
                tooltip='''modify extract value for associated runs. e.g.
1. 1,2,3 (increase step i by 1W, step i+1 by 2W, step i+2 by 3W)
2. 10%,50% (increase step i by 10%, step i+1 by 50%)'''),
                         visible_when='action=="Set Extract"',
                         label='Extraction'),
            label='Modification')
        edit_grp = VGroup(
            Item('attr',
                 label='Attribute',
                 editor=myEnumEditor(name='available_attrs')),
            VGroup(opt_grp,
                   cmp_grp,
                   cnt_grp,
                   atype_grp,
                   act_grp,
                   enabled_when='attr'))
        return edit_grp
示例#7
0
 def traits_view(self):
     v = View(
         VGroup(
             BorderVGroup('use_time_axis', Item('error_bar_nsigma'),
                          Item('end_caps'), Item('show_info')),
             SHOW_STATISTICS_GROUP))
     return v
示例#8
0
    def traits_view(self):
        icgrp = BorderVGroup(UItem('ic_factors',
                                   editor=ListEditor(mutable=False,
                                                     style='custom',
                                                     editor=InstanceEditor())),
                             label='IC Factors')

        runid_grp = BorderVGroup(HGroup(Item('aliquot'), Item('step')),
                                 label='RunID')
        sample_grp = BorderVGroup(Item(
            'sync_sample_enabled',
            label='Sync Sample MetaData',
            tooltip='Sync analysis sample metadata to the database'),
                                  label='Sample')
        v = okcancel_view(VGroup(icgrp, runid_grp, sample_grp),
                          title='Bulk Edit Options')
        return v
 def traits_view(self):
     v = View(
         BorderVGroup(
             Item('show_statistics'),
             Item('ncols',
                  editor=RangeEditor(mode='text'),
                  label='N. Columns')))
     return v
 def traits_view(self):
     fgrp = BorderVGroup(icon_button_editor('add_filter_button', 'add'),
                         UItem('filters',
                               editor=ListEditor(mutable=False,
                                                 style='custom',
                                                 editor=InstanceEditor())),
                         label='Filters')
     ogrp = BorderVGroup(Item('apply_to_current_selection'),
                         Item('apply_to_current_samples'),
                         Item('omit_invalid'),
                         Item('limit'),
                         label='Options')
     v = okcancel_view(VGroup(fgrp, ogrp),
                       title='Advanced Search',
                       width=700,
                       height=350)
     return v
示例#11
0
    def _get_atype_grp(self):

        atypes = [(a.lower().replace(' ', '_'), a) for a in ANALYSIS_TYPES]

        grp = BorderVGroup(
            UItem('analysis_types',
                  style='custom',
                  editor=CheckListEditor(values=atypes, cols=4)))
        return grp
示例#12
0
 def traits_view(self):
     gen_grp = BorderVGroup(
         HGroup(UItem('pane.recalculate_button')),
         HGroup(Readonly('nruns', width=150, label='Total Runs'),
                UReadonly('total_time')),
         HGroup(Readonly('nruns_finished', width=150, label='Completed'),
                UReadonly('elapsed')),
         Readonly('remaining', label='Remaining'),
         Readonly('etf', label='Est. finish'),
         label='General')
     cur_grp = BorderVGroup(Readonly('current_run_duration', ),
                            Readonly('run_elapsed'),
                            label='Current')
     sel_grp = BorderVGroup(Readonly('start_at'),
                            Readonly('end_at'),
                            Readonly('run_duration'),
                            label='Selection')
     v = View(VGroup(gen_grp, cur_grp, sel_grp))
     return v
示例#13
0
    def traits_view(self):

        load_grp = BorderHGroup(
            UItem('load_name', editor=EnumEditor(name='display_loads')),
            Item('limit_to_analysis_loads',
                 tooltip='Limit Loads based on the selected analyses',
                 label='Limit Loads by Analyses'),
            label='Load')
        inst_grp = BorderVGroup(
            HGroup(
                UItem('use_extract_device'),
                Item('extract_device',
                     enabled_when='enable_extract_device',
                     editor=EnumEditor(name='extract_devices'),
                     label='Extract Device')),
            HGroup(
                UItem('use_mass_spectrometer'),
                Item('mass_spectrometer',
                     label='Mass Spectrometer',
                     enabled_when='enable_mass_spectrometer',
                     editor=EnumEditor(name='mass_spectrometers'))),
            label='Instruments')

        filter_grp = BorderVGroup(
            Item('threshold',
                 tooltip=
                 'Maximum difference between references and unknowns in hours',
                 enabled_when='threshold_enabled',
                 label='Threshold (Hrs)'),
            Item('use_graphical_filter', label='Graphical Selection'),
            VGroup(UItem('analysis_types',
                         style='custom',
                         editor=CheckListEditor(
                             name='available_analysis_types', cols=2)),
                   show_border=True,
                   label='Analysis Types'),
            label='Filtering')

        v = self._view_factory(VGroup(load_grp, filter_grp, inst_grp))

        return v
示例#14
0
 def _get_cnt_grp(self):
     cnt_grp = BorderVGroup(
         Item('start_count',
              tooltip='Number of counts to wait until performing check',
              label='Start'),
         Item('frequency', tooltip='Number of counts between each check'),
         Item('ntrips',
              label='N Trips',
              tooltip='Number of trips (conditional evaluates True) '
              'before action is taken. Default=1'),
         label='Counts')
     return cnt_grp
示例#15
0
 def traits_view(self):
     cols = [
         ObjectColumn(name='numerator', editor=EnumEditor(name='isotopes')),
         ObjectColumn(name='denominator',
                      editor=EnumEditor(name='isotopes'))
     ]
     v = View(
         BorderVGroup(UItem('ratios',
                            editor=TableEditor(sortable=False,
                                               columns=cols)),
                      label='Cocktail Options'))
     return v
示例#16
0
 def _get_cmp_grp(self):
     cmp_grp = BorderVGroup(Item(
         'comparator',
         label='Operation',
         enabled_when='not function=="Between"',
         tooltip='Numeric and logical comparisons. Conditional trips when it '
         'evaluates to True'),
                            Item('value'),
                            Item('secondary_value',
                                 enabled_when='function=="Between"'),
                            Item('use_invert', label='Invert'),
                            label='Comparison')
     return cmp_grp
示例#17
0
    def traits_view(self):
        rgrp = BorderHGroup(UItem('selected_reactor_name',
                                  editor=EnumEditor(name='reactor_names')),
                            icon_button_editor('add_reactor_button', 'add',
                                               tooltip='Add Default Production for the selected '
                                                       'Reactor to this Irradiation level'),
                            icon_button_editor('update_reactor_default_button',
                                               'arrow_up',
                                               tooltip='Set current as the reactor default'),
                            label='Available Default Productions')
        mgrp = BorderVGroup(UItem('selected_monitor'),
                            HGroup(Item('monitor_name'),
                                   Item('monitor_material')),
                            HGroup(Item('monitor_age'),
                                   Item('lambda_k')),
                            label='Monitor')

        pgrp = BorderHGroup(UItem('selected_production_name',
                                  editor=EnumEditor(name='production_names')),
                            icon_button_editor('apply_selected_production', 'arrow_left',
                                               tooltip='Apply selection'),
                            icon_button_editor('add_production_button', 'database_add',
                                               tooltip='Add a Production Ratio'),
                            icon_button_editor('edit_production_button', 'database_edit',
                                               enabled_when='selected_production',
                                               tooltip='Edit Production Ratio'),
                            label='Production'),
        pr_group = VGroup(rgrp,
                          pgrp,
                          UItem('selected_production', style='custom'),
                          label='Production Ratios')

        editor = TabularEditor(adapter=TrayAdapter(),
                               editable=False,
                               selected='selected_tray')
        tray_grp = VGroup(HGroup(icon_button_editor('add_tray_button', 'add',
                                                    tooltip='Add a tray from file')),
                          HSplit(UItem('trays', editor=editor, width=0.25),
                                 UItem('canvas', editor=ComponentEditor(), width=0.75)),
                          label='Tray')

        v = okcancel_view(VGroup(HGroup(Item('name'), Item('z')),
                                 VGroup(UItem('level_note', style='custom'), label='Level Note', show_border=True),
                                 Group(pr_group,
                                       tray_grp,
                                       mgrp,
                                       layout='tabbed')),
                          width=550,
                          height=650,
                          title=self.title)
        return v
示例#18
0
 def traits_view(self):
     v = self._view_factory(Item('irradiation',
                                 editor=EnumEditor(name='irradiations')),
                            UItem('select_all_button',
                                  enabled_when='irradiation'),
                            BorderVGroup(UItem('selected_levels',
                                               style='custom',
                                               editor=CheckListEditor(
                                                   name='levels', cols=3)),
                                         visible_when='irradiation',
                                         label='Levels'),
                            width=300,
                            height=300,
                            title='Select Irradiation and Level',
                            resizable=True)
     return v
示例#19
0
    def traits_view(self):
        calc_grp = VGroup(
            Item('selected_decay', label='Flux Const.'),
            Readonly('lambda_k', label=u'Total \u03BB K'),
            Readonly('monitor_age'),
            BorderVGroup(
                Item('model_kind', label='Kind'),
                Item('error_kind', label='Mean J Error'),
                Item('predicted_j_error_type', label='Predicted J Error'),
                Item('use_weighted_fit'),
                Item('least_squares_fit',
                     visible_when='model_kind=="{}"'.format(LEAST_SQUARES_1D)),
                Item('one_d_axis',
                     label='Axis',
                     visible_when='model_kind in ("{}","{}")'.format(
                         LEAST_SQUARES_1D, WEIGHTED_MEAN_1D)),
                Item('n_neighbors',
                     label='N. Neighbors',
                     visible_when='model_kind == "{}"'.format(NN)),
                label='Model'),
            VGroup(
                HGroup(
                    Item('use_monte_carlo', label='Use'),
                    Item(
                        'monte_carlo_ntrials',
                        label='N. Trials',
                        tooltip=
                        'Number of trials to perform monte carlo simulation')),
                Item(
                    'position_error',
                    label='Position Error (Beta)',
                    tooltip=
                    'Set this value to the radius (same units as hole XY positions) of the '
                    'irradiation hole. '
                    'This is to test "monte carloing" the irradiation geometry'
                ),
                show_border=True,
                visible_when='model_kind not in ("{}", "{}", "{}")'.format(
                    MATCHING, BRACKETING, NN),
                label='Monte Carlo'),
            show_border=True,
            label='Calculations')

        grp = VGroup(Item('plot_kind'), calc_grp)

        return self._make_view(grp)
示例#20
0
    def _get_edit_group(self):
        cnt_grp = self._get_cnt_grp()
        cmp_grp = self._get_cmp_grp()
        opt_grp = self._get_opt_grp()
        atype_grp = self._get_atype_grp()

        act_grp = BorderVGroup(Item('action'), label='Action')
        edit_grp = VGroup(
            Item('attr',
                 label='Attribute',
                 editor=myEnumEditor(name='available_attrs')),
            VGroup(opt_grp,
                   cmp_grp,
                   cnt_grp,
                   atype_grp,
                   act_grp,
                   enabled_when='attr'))
        return edit_grp
示例#21
0
 def _get_opt_grp(self):
     opt_grp = BorderVGroup(
         Item('function',
              editor=myEnumEditor(values=FUNCTIONS),
              tooltip=
              'Optional. Apply a predefined function to this attribute. '
              'Functions include {}'.format(','.join(FUNCTIONS[1:]))),
         Item('window', enabled_when='not modifier_enabled'),
         Item('modifier',
              enabled_when='modifier_enabled',
              tooltip='Optional. Apply a modifier to this attribute.'
              'For example to check if CDD is active use '
              'Atttribute=CDD, Modifier=Inactive',
              editor=myEnumEditor(values=[
                  '', 'StdDev', 'Current', 'Inactive', 'Baseline',
                  'BaselineCorrected'
              ])),
         label='Optional')
     return opt_grp
示例#22
0
 def _get_script_group(self):
     script_grp = BorderVGroup(
         run_factory_uitem('extraction_script', style='custom'),
         run_factory_uitem('measurement_script', style='custom'),
         run_factory_uitem('post_equilibration_script', style='custom'),
         run_factory_uitem('post_measurement_script', style='custom'),
         run_factory_uitem('script_options', style='custom'),
         HGroup(
             spring,
             run_factory_uitem(
                 'default_fits_button',
                 enabled_when=run_factory_name('default_fits_enabled'),
                 label='Default Fits'),
             run_factory_uitem(
                 'load_defaults_button',
                 tooltip='load the default scripts for this analysis type',
                 enabled_when=run_factory_name('labnumber'))),
         enabled_when=queue_factory_name('ok_make'),
         label='Scripts')
     return script_grp
示例#23
0
    def _get_edit_view(self):
        tooltip = """'Omit analyses based on the provided criteria. For example x>10 will omit any analysis
greater than 10. The value of x depends on the Auxiliary plot e.g. x is age for Analysis Number or K/Ca for KCa.
x is simply a placeholder and can be replaced by any letter or word except for a few exceptions
(i.e and, or, is, on, if, not...). To filter based on error or %error use "error" and "percent_error". Multiple predicates may be combined
with "and", "or". Valid comparators are "<,<=,>,>=,==,!=". "==" means "equals" and "!=" means "not equal".
Additional examples
1. x<10
2. age<10 or age>100
3. age<10 or error>1
4. x<=10 or percent_error>50
5. xyz<=10 and error>=0.1"""
        sigma_tooltip = """Omit analyses greater the N sigma from the arithmetic mean"""

        fgrp = BorderVGroup(HGroup(
            Item('filter_str', tooltip=tooltip, label='Filter'),
            UItem('filter_str_tag')),
                            HGroup(
                                Item('sigma_filter_n',
                                     label='Sigma Filter N',
                                     tooltip=sigma_tooltip),
                                UItem('sigma_filter_tag')),
                            label='Filtering')

        v = View(
            VGroup(HGroup(
                Item('name', editor=EnumEditor(name='names')),
                Item('scale', editor=EnumEditor(values=['linear', 'log']))),
                   Item('height'),
                   self._get_yticks_grp(),
                   BorderHGroup(UItem('marker',
                                      editor=EnumEditor(values=marker_names)),
                                Item('marker_size', label='Size'),
                                label='Marker'),
                   BorderHGroup(Item('ymin', label='Min'),
                                Item('ymax', label='Max'),
                                label='Y Limits'),
                   fgrp,
                   show_border=True))
        return v
示例#24
0
    def traits_view(self):
        mi = BorderHGroup(UItem('mean_indicator_fontname'),
                          UItem('mean_indicator_fontsize'),
                          label='Mean Indicator')

        ee = BorderHGroup(UItem('error_info_fontname'),
                          UItem('error_info_fontsize'),
                          label='Error Info')

        ll = BorderHGroup(UItem('label_fontname'),
                          UItem('label_fontsize'),
                          label='Labels')

        fgrp = BorderVGroup(BorderHGroup(UItem('fontname'),
                                         label='Change All'),
                            HGroup(mi, ee),
                            ll,
                            HGroup(self._get_xfont_group(),
                                   self._get_yfont_group()),
                            label='Fonts')

        g = VGroup(self._get_nominal_group(), self._get_layout_group(),
                   self._get_padding_group(), fgrp)
        return self._make_view(g)
示例#25
0
    def traits_view(self):
        plat_grp = BorderHGroup(
            VGroup(
                Item('omit_non_plateau', label='Omit Non Plateau Steps'),
                Item('exclude_non_plateau',
                     label='Exclude Non Plateau Steps')),
            HGroup(Item('plateau_method',
                        tooltip='Fleck 1977={}\n'
                        'Mahon 1996={}'.format(FLECK_PLATEAU_DEFINITION,
                                               MAHON_PLATEAU_DEFINITION),
                        label='Method'),
                   icon_button_editor('edit_plateau_criteria',
                                      'cog',
                                      tooltip='Edit Plateau Criteria'),
                   visible_when='omit_non_plateau'),
            label='Plateau')

        g = Group(Item('error_calc_method',
                       width=-150,
                       label='Error Calculation Method'),
                  Item('regressor_kind', label='Method'),
                  plat_grp,
                  show_border=True,
                  label='Calculations')

        info_grp = HGroup(
            Item('show_info', label='Info'),
            BorderHGroup(UItem('info_fontname'), UItem('info_fontsize')))

        results_grp = HGroup(
            Item('show_results_info', label='Results'),
            VGroup(
                BorderVGroup(
                    HGroup(
                        Item('nsigma', label='NSigma'),
                        Item('results_info_spacing',
                             editor=RangeEditor(mode='spinner',
                                                low=2,
                                                high=20,
                                                is_float=False),
                             label='Spacing')),
                    HGroup(UItem('results_fontname'),
                           UItem('results_fontsize'))),
                BorderHGroup(Item('age_sig_figs', label='Age'),
                             Item('yintercept_sig_figs', label='Y-Int.'),
                             label='SigFigs'),
                BorderVGroup(Item('include_4036_mse', label='Ar40/Ar36'),
                             Item('include_age_mse', label='Age'),
                             Item('include_percent_error', label='%Error'),
                             label='Include')))

        ellipse_grp = BorderHGroup(Item('fill_ellipses', label='fill'),
                                   Item('ellipse_kind', label='Kind'),
                                   label='Error Ellipse')
        label_grp = BorderVGroup(Item('show_labels'),
                                 HGroup(Item('label_box'),
                                        UItem('label_fontname'),
                                        UItem('label_fontsize'),
                                        enabled_when='show_labels'),
                                 label='Labels')

        marker_grp = BorderHGroup(Item('marker_size', label='Size'),
                                  Item('marker', label='Marker'),
                                  label='Marker')
        g2 = Group(
            self._get_title_group(),
            BorderVGroup(info_grp, results_grp, label='Info'),
            Item('include_error_envelope'),
            marker_grp,
            ellipse_grp,
            label_grp,
            BorderVGroup(Item('show_nominal_intercept'),
                         HGroup(
                             Item('nominal_intercept_label',
                                  label='Label',
                                  enabled_when='show_nominal_intercept'),
                             Item('nominal_intercept_value',
                                  label='Value',
                                  enabled_when='show_nominal_intercept')),
                         label='Nominal Intercept'),
            BorderVGroup(Item('display_inset'),
                         Item('inset_location'),
                         HGroup(Item('inset_marker_size',
                                     label='Marker Size')),
                         HGroup(Item('inset_width', label='Width'),
                                Item('inset_height', label='Height')),
                         label='Inset'),
            show_border=True,
            label='Display')
        return self._make_view(VGroup(g, g2))
示例#26
0
    def traits_view(self):
        xgrp = VGroup(
            Item('index_attr',
                 editor=EnumEditor(name='index_attrs'),
                 label='X Value'),
            HGroup(UItem('use_static_limits'),
                   Item('xlow',
                        label='Min.',
                        enabled_when='object.use_static_limits'),
                   Item('xhigh',
                        label='Max.',
                        enabled_when='object.use_static_limits'),
                   show_border=True,
                   label='Static Limits'),
            HGroup(
                UItem('use_asymptotic_limits'),
                # Item('asymptotic_width', label='% Width',
                #      tooltip='Width of asymptotic section that is less than the Asymptotic %'),
                Item('asymptotic_height_percent',
                     tooltip='Percent of Max probability',
                     label='% Height'),
                # icon_button_editor('refresh_asymptotic_button', 'refresh',
                #                    enabled_when='object.use_asymptotic_limits',
                #                    tooltip='Refresh plot with defined asymptotic limits'),
                enabled_when=
                'not object.use_centered_range and not object.use_static_limits',
                show_border=True,
                label='Asymptotic Limits'),
            HGroup(UItem('use_centered_range'),
                   UItem('centered_range',
                         enabled_when='object.use_centered_range'),
                   label='Center on fixed range',
                   show_border=True,
                   enabled_when='not object.use_static_limits'),
            HGroup(
                UItem('use_xpad'),
                Item('xpad', label='Pad', enabled_when='use_xpad'),
                Item(
                    'xpad_as_percent',
                    tooltip=
                    'Treat Pad as a percent of the nominal width, otherwise Pad is in Ma. '
                    'e.g if width=10 Ma, Pad=0.5 '
                    'the final width will be 10 + (10*0.5)*2 = 20 Ma.',
                    enabled_when='use_xpad',
                    label='%'),
                label='X Pad',
                show_border=True),
            show_border=True,
            label='X')

        tgrp = BorderVGroup(Item(
            'omit_by_tag',
            label='Omit Tags',
            tooltip=
            'If selected only analyses tagged as "OK" are included in the calculations'
        ),
                            label='Tags')

        rtgrp = BorderVGroup(Item(
            'show_results_table',
            label='Show',
            tooltip='Display a summary table below the ideogram'),
                             Item('show_ttest_table', label='Show T-test'),
                             label='Summary Table')

        return self._make_view(VGroup(xgrp, tgrp, rtgrp))
示例#27
0
    def traits_view(self):
        cols = [
            CheckboxColumn(name='status'),
            ObjectColumn(name='status'),
            ObjectColumn(name='runid', width=50),
            ObjectColumn(name='age', width=100),
            ObjectColumn(name='age_err', width=100, label=PLUSMINUS_ONE_SIGMA),
            ObjectColumn(name='group'),
            ObjectColumn(name='aliquot'),
            ObjectColumn(name='sample')
        ]

        gcols = [
            ObjectColumn(name='name'),
            ObjectColumn(
                name='weighted_mean',
                label='Wtd. Mean',
                format='%0.6f',
            ),
            ObjectColumn(name='weighted_mean_err',
                         format='%0.6f',
                         label=PLUSMINUS_ONE_SIGMA),
            ObjectColumn(name='mswd', format='%0.3f', label='MSWD'),
            ObjectColumn(name='displayn', label='N'),
            ObjectColumn(name='mean', format='%0.6f', label='Mean'),
            ObjectColumn(name='std', format='%0.6f', label='Std'),
            ObjectColumn(name='min', format='%0.6f', label='Min'),
            ObjectColumn(name='max', format='%0.6f', label='Max'),
            ObjectColumn(name='dev', format='%0.6f', label='Dev.'),
            ObjectColumn(name='percent_dev', format='%0.2f', label='% Dev.')
        ]

        button_grp = HGroup(UItem('save_button'), UItem('save_as_button'),
                            UItem('clear_button'),
                            UItem('open_via_finder_button'),
                            UItem('add_record_button'),
                            UItem('calculate_button')),

        repo_grp = VGroup(
            BorderVGroup(UItem('repo_filter'),
                         UItem('repositories',
                               width=200,
                               editor=ListStrEditor(selected='repository')),
                         label='Repositories'),
            BorderVGroup(UItem('name_filter'),
                         UItem('names', editor=ListStrEditor(selected='name')),
                         label='DataSets'))

        record_grp = VSplit(
            UItem(
                'records',
                editor=TableEditor(
                    columns=cols,
                    selected='selected',
                    sortable=False,
                    edit_on_first_click=False,
                    # clear_selection_on_dclicked=True,
                    menu=MenuManager(
                        Action(name='Group Selected',
                               perform=self._group_selected)),
                    selection_mode='rows')),
            UItem('groups', editor=TableEditor(columns=gcols)))

        main_grp = HSplit(repo_grp, record_grp)

        v = okcancel_view(
            VGroup(button_grp, main_grp),
            width=1100,
            height=500,
            title='CSV Dataset',
            # handler=CSVDataSetFactoryHandler()
        )
        return v
示例#28
0
 def traits_view(self):
     v = View(
         BorderVGroup(UItem('analysis_groups',
                            editor=TabularEditor(adapter=self.adapter)),
                      label='Summary'))
     return v
示例#29
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ===============================================================================

# ============= enthought library imports =======================
from traitsui.api import View, UItem, VGroup, EnumEditor, Item, HGroup

from pychron.core.pychron_traits import BorderVGroup
from pychron.options.options import SubOptions, AppearanceSubOptions, MainOptions, object_column, checkbox_column

SHOW_STATISTICS_GROUP = BorderVGroup(Item('show_statistics'),
                                     Item('show_statistics_as_table'),
                                     Item('use_group_statistics'),
                                     Item('display_min_max'),
                                     label='Statistics Display')


class SeriesSubOptions(SubOptions):
    def traits_view(self):
        v = View(
            VGroup(
                BorderVGroup('use_time_axis', Item('error_bar_nsigma'),
                             Item('end_caps'), Item('show_info')),
                SHOW_STATISTICS_GROUP))
        return v


class SeriesAppearance(AppearanceSubOptions):
示例#30
0
 def traits_view(self):
     v = View(
         BorderVGroup(UItem('results',
                            editor=TabularEditor(adapter=self.adapter)),
                      label='T-test Probabilities'))
     return v