Changeset 09d6719 in sasview for src


Ignore:
Timestamp:
Aug 10, 2016 9:46:03 AM (8 years ago)
Author:
lewis
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:
8abd96d
Parents:
f2f6af9
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (08/10/16 09:39:28)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (08/10/16 09:46:03)
Message:

Add Kratky option to plot scale. Closes #205

Location:
src/sas/sasgui/plottools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/plottools/PlotPanel.py

    rf2f6af9 r09d6719  
    731731                        self.xLabel = "x^(4)" 
    732732                        self.yLabel = "y*x^(4)" 
     733                        self.viewModel = "--" 
     734                        dial.setValues(self.xLabel, self.yLabel, self.viewModel) 
     735                    if self.viewModel == "Kratky y*x^(2) vs x": 
     736                        self.xLabel = "x" 
     737                        self.yLabel = "y*x^(2)" 
    733738                        self.viewModel = "--" 
    734739                        dial.setValues(self.xLabel, self.yLabel, self.viewModel) 
     
    18211826                yunits = convert_unit(-1, yunits) 
    18221827                self.graph._yaxis_transformed("1/%s" % yname, "%s" % yunits) 
     1828            if self.yLabel == "y*x^(2)": 
     1829                set_ylim = True 
     1830                item.transformY(transform.toYX2, transform.errToYX2) 
     1831                xunits = convert_unit(4, self.xaxis_unit) 
     1832                self.graph._yaxis_transformed("%s \ \ %s^{2}" % (yname, xname), 
     1833                                              "%s%s" % (yunits, xunits)) 
    18231834            if self.yLabel == "y*x^(4)": 
    18241835                set_ylim = True 
  • src/sas/sasgui/plottools/PropertyDialog.py

    r3409a90 r09d6719  
    6464        self.yvalue.Insert("ln(y)", 2) 
    6565        self.yvalue.Insert("y^(2)", 3) 
    66         self.yvalue.Insert("y*x^(4)", 4) 
    67         self.yvalue.Insert("1/sqrt(y)", 5) 
    68         self.yvalue.Insert("log10(y)", 6) 
    69         self.yvalue.Insert("ln(y*x)", 7) 
    70         self.yvalue.Insert("ln(y*x^(2))", 8) 
    71         self.yvalue.Insert("ln(y*x^(4))", 9) 
    72         self.yvalue.Insert("log10(y*x^(4))", 10) 
     66        self.yvalue.Insert("y*x^(2)", 4) 
     67        self.yvalue.Insert("y*x^(4)", 5) 
     68        self.yvalue.Insert("1/sqrt(y)", 6) 
     69        self.yvalue.Insert("log10(y)", 7) 
     70        self.yvalue.Insert("ln(y*x)", 8) 
     71        self.yvalue.Insert("ln(y*x^(2))", 9) 
     72        self.yvalue.Insert("ln(y*x^(4))", 10) 
     73        self.yvalue.Insert("log10(y*x^(4))", 11) 
    7374        # type of view or model used 
    7475        self.view.SetValue("--") 
     
    7879        self.view.Insert("XS Guinier ln(y*x) vs x^(2)", 3) 
    7980        self.view.Insert("Porod y*x^(4) vs x^(4)", 4) 
    80         # This did not work in 3.1.2 and does not work now. 
    81         # prefer to fix (should not be too hard) but for the moment 
    82         # am removing as an option the user sees so they don't get 
    83         # disappointed.    PDB 7/10/2016  
    84         # self.view.Insert("Kratky y*x^(2) vs x", 5) 
     81        self.view.Insert("Kratky y*x^(2) vs x", 5) 
    8582        self.SetSizer(vbox) 
    8683        self.Fit() 
Note: See TracChangeset for help on using the changeset viewer.