Changeset 1534c1d in sasview for calculatorview/src/sans


Ignore:
Timestamp:
Aug 11, 2011 10:25:15 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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:
643a82a
Parents:
c0a30a24
Message:

better resultant info

File:
1 edited

Legend:

Unmodified
Added
Removed
  • calculatorview/src/sans/perspectives/calculator/resolution_calculator_panel.py

    r1f2f198 r1534c1d  
    8282        # dQ 2d image 
    8383        self.image = None 
     84        # results of sigmas 
     85        self.sigma_strings =' ' 
    8486        #Font size  
    8587        self.SetWindowVariant(variant=FONT_VARIANT) 
     
    821823        try: 
    822824            from sans.perspectives.calculator.resolcal_thread import CalcRes as thread 
     825            self.sigma_strings = '\nResolution COmputation is Finished:\n' 
    823826            cal_res = thread(func = self._map_func, 
    824827                         qx = self.qx, 
     
    829832                         qy_max = qy_max, 
    830833                         image = self.image, 
    831                          completefn = self.complete_cal) 
     834                         completefn = self.complete) 
    832835            #self.image = map(self._map_func, self.qx, self.qy,  
    833836            #                 qx_min, qx_max, qy_min, qy_max)[0] 
     
    849852        Callafter complete: wx call after needed for stable output 
    850853        """ 
    851         wx.CallAfter(self.complte, image, elapsed)    
     854        wx.CallAfter(self.complete_cal, image, elapsed)    
    852855         
    853856    def complete_cal(self, image, elapsed=None): 
     
    878881        self.sigma_lamd_tcl.SetValue(str(sigma_lamd)) 
    879882        self.sigma_1d_tcl.SetValue(str(sigma_1d)) 
    880         msg = "Resolution computation is finished." 
     883        msg = self.sigma_strings 
     884        msg += "\n" 
    881885        status_type = 'stop' 
    882886        self._status_info(msg, status_type) 
     
    978982                                 qx_min, qx_max, qy_min, qy_max,  
    979983                                 self.det_coordinate) 
    980          
    981  
     984        # record sigmas 
     985        self.sigma_strings += " At Qx = %s, Qy = %s; \n"% (qx_value,qy_value) 
     986        self._sigma_strings() 
    982987        return image 
     988    def _sigma_strings(self): 
     989        """ 
     990        Recode sigmas as strins 
     991        """ 
     992        sigma_r = self.format_number(self.resolution.sigma_1) 
     993        sigma_phi = self.format_number(self.resolution.sigma_2) 
     994        sigma_lamd = self.format_number(self.resolution.sigma_lamd) 
     995        sigma_1d =  self.format_number(self.resolution.sigma_1d) 
     996        # Set output values  
     997        self.sigma_strings += "   sigma_x = %s\n"% sigma_r 
     998        self.sigma_strings += "   sigma_y = %s\n"% sigma_phi 
     999        self.sigma_strings += "   sigma_lamd = %s\n"% sigma_lamd 
     1000        self.sigma_strings += "   sigma_1D = %s\n"% sigma_1d 
    9831001     
    9841002    def _validate_q_input(self, qx, qy):     
Note: See TracChangeset for help on using the changeset viewer.