Changeset 2b4c8ca in sasview for fittingview/src/sans/perspectives


Ignore:
Timestamp:
Jan 19, 2012 11:48:43 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:
4310dbb
Parents:
33477fd
Message:

a little correction for naming the sum model especially when one of the models has all lower case name

Location:
fittingview/src/sans/perspectives/fitting/plugin_models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/plugin_models/sum_Ap1_1_Ap2.py

    re9bd127 r2b4c8ca  
    132132        """ 
    133133        name = "A*" 
    134         name += self._get_upper_name(name1) 
     134        p1_name = self._get_upper_name(name1) 
     135        if not p1_name: 
     136            p1_name = name1 
     137        name += p1_name 
    135138        name += "+(1-A)*" 
    136         name += self._get_upper_name(name2) 
     139        p2_name = self._get_upper_name(name2) 
     140        if not p2_name: 
     141            p2_name = name2 
     142        name += p2_name 
    137143        return name 
    138144     
  • fittingview/src/sans/perspectives/fitting/plugin_models/sum_p1_p2.py

    rc067d12 r2b4c8ca  
    130130        Get combined name from two model names 
    131131        """ 
    132         name = self._get_upper_name(name1) 
     132        p1_name = self._get_upper_name(name1) 
     133        if not p1_name: 
     134            p1_name = name1 
     135        name = p1_name 
    133136        name += "+" 
    134         name += self._get_upper_name(name2) 
     137        p2_name = self._get_upper_name(name2) 
     138        if not p2_name: 
     139            p2_name = name2 
     140        name += p2_name 
    135141        return name 
    136142     
Note: See TracChangeset for help on using the changeset viewer.