SHARE
TWEET

Untitled

a guest May 28th, 2013 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. __author__ = 'nmearl'
  2.  
  3. from enthought.traits.api import *
  4. from enthought.traits.ui.api import View, Item, Group
  5.  
  6. class Settings(HasTraits):
  7.  
  8.     kepler_object_list = List
  9.     list_index = Int(0)
  10.  
  11.     kepler_id = String
  12.     quarter_range = BaseTuple(1, 1)
  13.  
  14.     narrow_len = Int(11)
  15.     wide_len = Int(51)
  16.  
  17.     use_pdc = Bool(False)
  18.     spline_detrend = Bool(True)
  19.     show_both = Bool(False)
  20.  
  21.     start_program = Button("Plot Data")
  22.  
  23.     next_object = Button("Next")
  24.     prev_object = Button("Prev")
  25.  
  26.     file_select = File
  27.     load_file = Button("Load")
  28.  
  29.     view_tagged = Button("View All Tagged Objects")
  30.  
  31.     view = View(
  32.         Group(
  33.             Group(
  34.                 Item('file_select', label="Select list", show_label=False, padding=10),
  35.                 Item('load_file', show_label=False),
  36.                 orientation='horizontal',
  37.                 padding=15
  38.             ),
  39.             Group(
  40.                 Item('kepler_id', label="Kepler ID"),
  41.                 Item('quarter_range', label="Quarter Range"),
  42.                 Group(
  43.                     Item('prev_object'),
  44.                     Item('next_object'),
  45.                     orientation='horizontal',
  46.                     show_labels=False
  47.                 ),
  48.                 show_border=True,
  49.                 label='Current Item',
  50.                 # orientation='horizontal',
  51.             ),
  52.             Group(
  53.                 Item('start_program', show_label=False, enabled_when="kepler_id"),
  54.             ),
  55.             Group(
  56.                 Group(
  57.                     Item("narrow_len", label="Narrow Length"),
  58.                     Item("wide_len", label="Wide Length"),
  59.                     label='Floating Averages', show_border=True,
  60.                 ),
  61.                 Group(
  62.                     Item('use_pdc', label="Use PDC Data"),
  63.                     label="Raw Data",
  64.                     show_border=True,
  65.                 ),
  66.                 Group(
  67.                     Item('spline_detrend', label="Spline Detrend"),
  68.                     label="Manipulate Data",
  69.                     show_border=True,
  70.                 ),
  71.                 Item('show_both', label="Show Both", enabled_when="spline_detrend"),
  72.                 Group(
  73.                     Item('view_tagged', show_label=False),
  74.                 ),
  75.                 label='Settings',
  76.                 show_border=True
  77.             ),
  78.             padding=15
  79.         ),
  80.         resizable=True,
  81.         title="Pynder"
  82.     )
  83.  
  84. if __name__ == '__main__':
  85.     settings = Settings()
  86.     settings.configure_traits()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top