Changeset 7dca26e in sasview for calculatorview/perspectives
- Timestamp:
- Mar 31, 2010 4:56:54 PM (14 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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- f338d3b
- Parents:
- 8d97277
- Location:
- calculatorview/perspectives/calculator
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/perspectives/calculator/load_thread.py
r378d2eb r7dca26e 12 12 Load a data given a filename 13 13 """ 14 def __init__(self, path, filename='',completefn=None,14 def __init__(self, path, completefn=None, 15 15 updatefn = None, 16 16 yieldtime = 0.01, … … 21 21 yieldtime, 22 22 worktime) 23 self.filename = filename24 23 self.path = path 25 24 #Instantiate a loader … … 45 44 data = self.loader.load(self.path) 46 45 elapsed = time.time() - self.starttime 47 self.complete(data=data , filename=self.filename)46 self.complete(data=data) 48 47 except KeyboardInterrupt: 49 48 # Thread was interrupted, just proceed and re-raise. -
calculatorview/perspectives/calculator/slit_length_calculator_panel.py
rb7e0fff r7dca26e 151 151 dlg.Destroy() 152 152 153 return path , filename153 return path 154 154 155 155 def on_close(self, event): … … 162 162 """ 163 163 Open a file dialog to allow the user to select a given file. 164 The user can allowload file with extension .DAT or .dat.164 The user is only allow to load file with extension .DAT or .dat. 165 165 Display the slit size corresponding to the loaded data. 166 166 """ 167 path , filename= self.choose_data_file(location=self._default_save_location)168 169 if path is None or filename == '':167 path = self.choose_data_file(location=self._default_save_location) 168 169 if path is None: 170 170 return 171 171 self._default_save_location = path … … 180 180 type="progress")) 181 181 self.reader = DataReader(path=path, 182 filename=filename,183 182 completefn=self.complete_loading, 184 183 updatefn=None) … … 195 194 Complete the loading and compute the slit size 196 195 """ 197 if data is not None anddata.__class__.__name__ == 'Data2D':196 if data is None or data.__class__.__name__ == 'Data2D': 198 197 if self.parent.parent is None: 199 198 return … … 201 200 wx.PostEvent(self.parent.parent, StatusEvent(status=msg, type='stop')) 202 201 return 203 self.data_name_tcl.SetValue(str( filename))202 self.data_name_tcl.SetValue(str(data.filename)) 204 203 #compute the slit size 205 204 try:
Note: See TracChangeset
for help on using the changeset viewer.