Changeset 2ff9e37 in sasview
- 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:
- d4f5637
- Parents:
- d888abf
- git-author:
- Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:31:53)
- git-committer:
- Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:36:55)
- Location:
- src/sas/sasgui/perspectives/corfunc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/corfunc/corfunc_panel.py
r6ccf18e r2ff9e37 98 98 if self.state.background is not None: 99 99 self.set_background(self.state.background) 100 if self.state.is_extrapolated: 101 self.compute_extrapolation() 102 else: 103 return 104 if self.state.is_transformed: 105 self.compute_transform() 106 else: 107 return 100 108 if self.state.outputs is not None and self.state.outputs != {}: 101 109 self.set_extracted_params(self.state.outputs) 102 self.compute_extrapolation()103 self.compute_transform()104 110 105 111 def get_state(self): … … 116 122 state.file = self._data.title 117 123 state.data = self._data 124 if self._extrapolated_data is not None: 125 state.is_extrapolated = True 126 if self._transformed_data is not None: 127 state.is_transformed = True 118 128 self.state = state 119 129 … … 236 246 state = self.get_state() 237 247 if data is not None: 248 import pdb; pdb.set_trace() 238 249 new_doc, sasentry = self._manager.state_reader._to_xml_doc(data) 239 250 new_doc = state.toXML(doc=new_doc, entry_node=sasentry) -
src/sas/sasgui/perspectives/corfunc/corfunc_state.py
rd888abf r2ff9e37 46 46 self.background = None 47 47 self.outputs = {} 48 self.is_extrapolated = False 49 self.is_transformed = False 48 50 49 51 self.saved_state = DEFAULT_STATE … … 161 163 state.appendChild(element) 162 164 165 # Whether or not the extrapolate & transform buttons have been clicked 166 element = new_doc.createElement("is_extrapolated") 167 top_element.appendChild(element) 168 element.appendChild(new_doc.createTextNode(str(int(self.is_extrapolated)))) 169 170 element = new_doc.createElement("is_transformed") 171 top_element.appendChild(element) 172 element.appendChild(new_doc.createTextNode(str(int(self.is_transformed)))) 173 163 174 # Output parameters 164 175 if self.outputs != {} and self.outputs is not None: … … 187 198 :param node: node of an XML document to read from (optional) 188 199 """ 200 import pdb; pdb.set_trace() 189 201 if node.get('version') and node.get('version') == '1.0': 190 202 # Parse filename … … 214 226 value = None 215 227 self.set_saved_state(name=item, value=value) 228 229 # Parse is_extrapolated and is_transformed 230 entry = get_content('ns:is_extrapolated', node) 231 if entry is not None: 232 self.is_extrapolated = bool(int(entry.text.strip())) 233 entry = get_content('ns:is_transformed', node) 234 if entry is not None: 235 self.is_transformed = bool(int(entry.text.strip())) 216 236 217 237 # Parse outputs
Note: See TracChangeset
for help on using the changeset viewer.