Changeset cd89c6f in sasview
- Timestamp:
- Jan 14, 2013 11:19:38 AM (11 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:
- fad6056
- Parents:
- 5c2932a
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
calculatorview/src/sans/perspectives/calculator/gen_scatter_panel.py
r32aba6a rcd89c6f 28 28 from sans.guiframe.events import StatusEvent 29 29 from sans.calculator import sans_gen 30 from calculator_widgets import OutputTextCtrl31 from calculator_widgets import InputTextCtrl30 from sans.perspectives.calculator.calculator_widgets import OutputTextCtrl 31 from sans.perspectives.calculator.calculator_widgets import InputTextCtrl 32 32 from wx.lib.scrolledpanel import ScrolledPanel 33 33 from sans.perspectives.calculator.load_thread import GenReader … … 89 89 """ 90 90 """ 91 CalcThread.__init__(self, completefn,91 CalcThread.__init__(self, completefn, 92 92 updatefn, 93 93 yieldtime, … … 1064 1064 return self.sld_data 1065 1065 else: 1066 sld_sets[list[0]] = None1066 sld_sets[list[0]] = None 1067 1067 for key in sld_sets.keys(): 1068 1068 key_low = key.lower() … … 1611 1611 Init 1612 1612 """ 1613 kwds['size'] = size1614 kwds['title'] = title1613 kwds['size'] = size 1614 kwds['title'] = title 1615 1615 1616 1616 wx.Frame.__init__(self, parent, *args, **kwds) … … 1645 1645 save_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE_AS, wx.ART_TOOLBAR, 1646 1646 tsize) 1647 close_bmp = wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_TOOLBAR,1647 close_bmp = wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_TOOLBAR, 1648 1648 tsize) 1649 help_bmp = wx.ArtProvider.GetBitmap(wx.ART_HELP, wx.ART_TOOLBAR,1649 help_bmp = wx.ArtProvider.GetBitmap(wx.ART_HELP, wx.ART_TOOLBAR, 1650 1650 (17, 20)) 1651 1651 … … 1680 1680 save_bmp = wx.ArtProvider.GetBitmap(wx.ART_FILE_SAVE_AS, wx.ART_TOOLBAR, 1681 1681 tsize) 1682 quit_bmp = wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_TOOLBAR,1682 quit_bmp = wx.ArtProvider.GetBitmap(wx.ART_QUIT, wx.ART_TOOLBAR, 1683 1683 tsize) 1684 help_bmp = wx.ArtProvider.GetBitmap(wx.ART_HELP, wx.ART_TOOLBAR,1684 help_bmp = wx.ArtProvider.GetBitmap(wx.ART_HELP, wx.ART_TOOLBAR, 1685 1685 (13, 15)) 1686 1686 … … 1891 1891 Gen scatter angle help panel 1892 1892 """ 1893 from help_panel import HelpWindow1893 from sans.perspectives.calculator.help_panel import HelpWindow 1894 1894 # Get models help model_function path 1895 1895 import sans.perspectives.calculator as calmedia … … 1913 1913 if __name__ == "__main__": 1914 1914 app = wx.PySimpleApp() 1915 frame = SasGenWindow()1916 frame.Show(True)1915 SGframe = SasGenWindow() 1916 SGframe.Show(True) 1917 1917 app.MainLoop() -
sanscalculator/src/sans/calculator/sans_gen.py
r5c2932a rcd89c6f 64 64 self.params['Up_frac_out'] = 1.0 65 65 self.params['Up_theta'] = 0.0 66 self.description ='GenSAS'66 self.description = 'GenSAS' 67 67 ## Parameter details [units, min, max] 68 68 self.details = {} … … 74 74 self.details['Up_theta'] = ['[deg]', None, None] 75 75 # fixed parameters 76 self.fixed =[]76 self.fixed = [] 77 77 78 78 def set_pixel_volumes(self, volume): … … 146 146 if x.__class__.__name__ == 'list': 147 147 i_out = numpy.zeros_like(x[0]) 148 y_in = numpy.zero _like(x[0])148 y_in = numpy.zeros_like(x[0]) 149 149 # 1D I is found at y =0 in the 2D pattern 150 150 return self._gen(x[0], y_in, i_out ) … … 163 163 i_out = numpy.zeros_like(x[0]) 164 164 import time 165 s =time.time()165 s = time.time() 166 166 out = self._gen(x[0], x[1], i_out) 167 print "i_out_time", time.time()-s167 print "i_out_time", time.time() - s 168 168 return out 169 169 else: … … 346 346 :return: x, y, z, sld_n, sld_mx, sld_my, sld_mz 347 347 """ 348 data_conv_m = None348 #data_conv_m = None 349 349 desc = "" 350 350 mx = numpy.zeros(0) … … 454 454 output.zmax = float(zmax) * METER2ANG 455 455 output.valuemultiplier = valuemultiplier 456 output.valuerangeminmag = mag2sld(float(valuerangeminmag), \456 output.valuerangeminmag = mag2sld(float(valuerangeminmag), \ 457 457 valueunit) 458 output.valuerangemaxmag = mag2sld(float(valuerangemaxmag), \458 output.valuerangemaxmag = mag2sld(float(valuerangemaxmag), \ 459 459 valueunit) 460 460 output.set_m(mx, my, mz) … … 1086 1086 x = numpy.arange(1000)/10000. + 1e-5 1087 1087 y = numpy.arange(1000)/10000. + 1e-5 1088 z = numpy.arange(1000)/10000. + 1e-51088 #z = numpy.arange(1000)/10000. + 1e-5 1089 1089 i = numpy.zeros(1000) 1090 1090 out = model.runXY([x,y,i])
Note: See TracChangeset
for help on using the changeset viewer.