Changeset bd3a3ae in sasview


Ignore:
Timestamp:
Jan 5, 2019 7:15:46 PM (6 years ago)
Author:
butler
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249
Children:
f632247
Parents:
73bc8563
Message:

Fix reporting of pinhole resolution on FitPage? when taken from data

GUI now reports dQ/Q as the label suggested. Also labels were fixed to
be more clear. Finally a small bit of code cleanup was attempted. Note
that there is a serious problem with the 2D resolution part of that GUI.
This is a previously unreported problem which may be dealt with in
another ticket or may be done here depending on the effort required.

addresses #1206

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/fitpage.py

    r73bc8563 rbd3a3ae  
    215215        smear_message_2d_x_title = "<dQp>[1/A]:" 
    216216        smear_message_2d_y_title = "<dQs>[1/A]:" 
    217         smear_message_pinhole_percent_title = "dQ[%]:" 
     217        smear_message_pinhole_percent_min_title = "[dQ/Q]min(%):" 
     218        smear_message_pinhole_percent_max_title = "[dQ/Q]max(%):" 
     219        smear_message_pinhole_percent_title = "dQ/Q(%):" 
    218220        smear_message_slit_height_title = "Slit height[1/A]:" 
    219221        smear_message_slit_width_title = "Slit width[1/A]:" 
     
    423425        self.smear_description_2d_y.SetToolTipString( 
    424426                                    " dQs(perpendicular) in q_phi direction.") 
     427        self.smear_description_pin_percent_min = wx.StaticText(self, wx.ID_ANY, 
     428                                            smear_message_pinhole_percent_min_title, 
     429                                            style=wx.ALIGN_LEFT) 
     430        self.smear_description_pin_percent_max = wx.StaticText(self, wx.ID_ANY, 
     431                                            smear_message_pinhole_percent_max_title, 
     432                                            style=wx.ALIGN_LEFT) 
    425433        self.smear_description_pin_percent = wx.StaticText(self, wx.ID_ANY, 
    426434                                            smear_message_pinhole_percent_title, 
     
    449457        self.sizer_new_smear.Add((15, -1)) 
    450458        self.sizer_new_smear.Add(self.smear_description_2d_x, 0, wx.CENTER, 10) 
     459        self.sizer_new_smear.Add(self.smear_description_pin_percent_min, 
     460                                 0, wx.CENTER, 10) 
     461        self.sizer_new_smear.Add(self.smear_description_pin_percent, 
     462                                 0, wx.CENTER, 10) 
    451463        self.sizer_new_smear.Add(self.smear_description_slit_height, 
    452464                                 0, wx.CENTER, 10) 
    453465 
     466        self.sizer_new_smear.Add(self.smear_pinhole_percent, 0, wx.CENTER, 10) 
    454467        self.sizer_new_smear.Add(self.smear_slit_height, 0, wx.CENTER, 10) 
    455468        self.sizer_new_smear.Add(self.smear_data_left, 0, wx.CENTER, 10) 
     
    457470        self.sizer_new_smear.Add(self.smear_description_2d_y, 
    458471                                 0, wx.CENTER, 10) 
    459         self.sizer_new_smear.Add(self.smear_description_pin_percent, 
     472        self.sizer_new_smear.Add(self.smear_description_pin_percent_max, 
    460473                                 0, wx.CENTER, 10) 
    461474        self.sizer_new_smear.Add(self.smear_description_slit_width, 
    462475                                 0, wx.CENTER, 10) 
    463476 
    464         self.sizer_new_smear.Add(self.smear_pinhole_percent, 0, wx.CENTER, 10) 
    465477        self.sizer_new_smear.Add(self.smear_slit_width, 0, wx.CENTER, 10) 
    466478        self.sizer_new_smear.Add(self.smear_data_right, 0, wx.CENTER, 10) 
     
    16291641            self.smear_type = "Pinhole" 
    16301642            #report in % for display makes more sense than absolute value 
    1631             #for pinhole smearing 
     1643            #for pinhole smearing.  Keep old names of dq_l rather than  
     1644            #dq_percent_l as it is close entough, minimizez changes, 
     1645            #particularly since both slit AND pinhole are using these variables. 
    16321646            self.dq_l = data.dx[0] / data.x[0] * 100 
    16331647            self.dq_r = data.dx[-1] / data.x[-1] * 100 
     
    16691683                    self.smear_description_slit_width.Show(True) 
    16701684                elif self.smear_type == 'Pinhole': 
    1671                     self.smear_description_pin_percent.Show(True) 
     1685                    self.smear_description_pin_percent_min.Show(True) 
     1686                    self.smear_description_pin_percent_max.Show(True) 
    16721687                self.smear_description_smear_type.Show(True) 
    16731688                self.smear_description_type.Show(True) 
     
    16761691        # custom pinhole smear 
    16771692        elif self.pinhole_smearer.GetValue(): 
    1678             if self.smear_type == 'Pinhole': 
    1679                 self.smear_message_new_p.Show(True) 
    1680                 self.smear_description_pin_percent.Show(True) 
    1681  
     1693#            if self.smear_type == 'Pinhole': 
     1694            self.smear_message_new_p.Show(True) 
     1695            self.smear_description_pin_percent.Show(True) 
     1696            #note - was outside of above commented out if statement 
    16821697            self.smear_pinhole_percent.Show(True) 
    16831698        # custom slit smear 
     
    17051720        self.smear_data_left.Hide() 
    17061721        self.smear_data_right.Hide() 
     1722        self.smear_description_pin_percent_min.Hide() 
     1723        self.smear_description_pin_percent_max.Hide() 
    17071724        self.smear_description_pin_percent.Hide() 
    17081725        self.smear_pinhole_percent.Hide() 
Note: See TracChangeset for help on using the changeset viewer.