Changeset 9c90cf3 in sasview for src/sas/sasgui/perspectives/corfunc
- Timestamp:
- Jul 11, 2016 4:36:55 AM (8 years ago)
- Branches:
- master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- b564ea2
- Parents:
- e02d8f6
- git-author:
- Lewis O'Driscoll <lewis.o'driscoll@…> (07/06/16 11:35:07)
- git-committer:
- Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:36:55)
- Location:
- src/sas/sasgui/perspectives/corfunc
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/corfunc/corfunc.py
re02d8f6 r9c90cf3 32 32 logging.info("Correlation function plug-in started") 33 33 self._always_active = True 34 35 34 self.state_reader = Reader(self.set_state) 36 35 self._extensions = '.cor' … … 138 137 new_plot.id = self.data_id 139 138 new_plot.title = "I(q)" 139 # Show data on a linear scale 140 140 new_plot.xtransform = 'x' 141 141 new_plot.ytransform = 'y' -
src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
re02d8f6 r9c90cf3 52 52 53 53 def set_state(self, state=None, data=None): 54 """ 55 Set the state of the panel. If no state is provided, the panel will 56 be set to the default state. 57 58 :param state: A CorfuncState object 59 :param data: A Data1D object 60 """ 54 61 if state is None: 55 62 self.state = CorfuncState() … … 109 116 """ 110 117 Return an XML node containing the state of the panel 118 119 :param doc: Am xml node to attach the project state to (optional) 111 120 """ 112 121 data = self._data … … 123 132 doc = new_doc 124 133 return doc 134 135 def set_qmin(self, qmin): 136 self.qmin = qmin 137 self._qmin_input.SetValue(str(qmin)) 138 139 def set_qmax(self, qmax): 140 self.qmax = qmax 141 self._qmax1_input.SetValue(str(qmax[0])) 142 self._qmax2_input.SetValue(str(qmax[1])) 125 143 126 144 … … 145 163 active=event.GetEventObject(), id=data_id, group_id=group_id, 146 164 leftdown=False)) 147 148 def set_qmin(self, qmin):149 self.qmin = qmin150 self._qmin_input.SetValue(str(qmin))151 152 def set_qmax(self, qmax):153 self.qmax = qmax154 self._qmax1_input.SetValue(str(qmax[0]))155 self._qmax2_input.SetValue(str(qmax[1]))156 165 157 166 def _validate_qrange(self): -
src/sas/sasgui/perspectives/corfunc/corfunc_state.py
re02d8f6 r9c90cf3 1 """2 State class for the corfunc UI3 """4 1 import time 5 2 import sys … … 35 32 36 33 class CorfuncState(object): 34 """ 35 Stores information about the state of CorfuncPanel 36 """ 37 37 38 38 def __init__(self): … … 206 206 class Reader(CansasReader): 207 207 """ 208 Class to read a CanSAS file containing the state of theCorfuncPanel208 Reads a CanSAS file containing the state of a CorfuncPanel 209 209 """ 210 210
Note: See TracChangeset
for help on using the changeset viewer.