Changeset 00f7ff1 in sasview for src/sas/sascalc/fit
- Timestamp:
- Jun 21, 2017 11:17:18 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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 81b35396
- Parents:
- 2a0f33f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/fit/pagestate.py
r2a0f33f r00f7ff1 22 22 import xml.dom.minidom 23 23 from xml.dom.minidom import parseString 24 from xml.dom.minidom import getDOMImplementation 24 25 from lxml import etree 25 26 26 27 from sasmodels import convert 27 28 import sasmodels.weights 29 30 from sas.sasview import __version__ as SASVIEW_VERSION 28 31 29 32 import sas.sascalc.dataloader … … 141 144 Contains information to reconstruct a page of the fitpanel. 142 145 """ 143 def __init__(self, parent=None,model=None, data=None):146 def __init__(self, model=None, data=None): 144 147 """ 145 148 Initialize the current state … … 189 192 # fit page manager 190 193 self.manager = None 191 # Store the parent of this panel parent192 # For this application fitpanel is the parent193 self.parent = parent194 194 # Event_owner is the owner of model event 195 195 self.event_owner = None … … 286 286 model = self.model.clone() 287 287 model.name = self.model.name 288 obj = PageState( self.parent,model=model)288 obj = PageState(model=model) 289 289 obj.file = copy.deepcopy(self.file) 290 290 obj.data = copy.deepcopy(self.data) … … 773 773 :param batch_fit_state: simultaneous fit state 774 774 """ 775 from xml.dom.minidom import getDOMImplementation776 777 775 # Check whether we have to write a standalone XML file 778 776 if doc is None: … … 802 800 803 801 attr = newdoc.createAttribute("version") 804 from sas import sasview 805 attr.nodeValue = sasview.__version__ 802 attr.nodeValue = SASVIEW_VERSION 806 803 # attr.nodeValue = '1.0' 807 804 top_element.setAttributeNode(attr) … … 1086 1083 setattr(self, varname, dic) 1087 1084 1085 class SimFitPageState: 1086 """ 1087 State of the simultaneous fit page for saving purposes 1088 """ 1089 1090 def __init__(self): 1091 # Sim Fit Page Number 1092 self.fit_page_no = None 1093 # Select all data 1094 self.select_all = False 1095 # Data sets sent to fit page 1096 self.model_list = [] 1097 # Data sets to be fit 1098 self.model_to_fit = [] 1099 # Number of constraints 1100 self.no_constraint = 0 1101 # Dictionary of constraints 1102 self.constraint_dict = {} 1103 # List of constraints 1104 self.constraints_list = [] 1088 1105 1089 1106 class Reader(CansasReader): … … 1168 1185 namespaces={'ns': CANSAS_NS}) 1169 1186 if simfitstate: 1170 from simfitpage import SimFitPageState1171 1187 sim_fit_state = SimFitPageState() 1172 1188 simfitstate_0 = simfitstate[0]
Note: See TracChangeset
for help on using the changeset viewer.