Changeset 7277f81 in sasview for src/sas/sasgui/perspectives/calculator/model_editor.py
- Timestamp:
- Aug 24, 2018 3:51:39 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- 643efb5
- Parents:
- d53abd2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/calculator/model_editor.py
r9258c43c r7277f81 43 43 if sys.platform.count("win32") > 0: 44 44 FONT_VARIANT = 0 45 PNL_WIDTH = 45045 PNL_WIDTH = 500 46 46 PNL_HEIGHT = 320 47 47 else: 48 48 FONT_VARIANT = 1 49 PNL_WIDTH = 59049 PNL_WIDTH = 655 50 50 PNL_HEIGHT = 350 51 51 M_NAME = 'Model' … … 495 495 Choose the equation to use depending on whether we now have 496 496 a sum or multiply model then create the appropriate string 497 498 for the sum model the result will be: 499 scale_factor * (scale1 * model_1 + scale2 * model_2) + background 500 while for ghe multiply model it will just be: 501 scale_factor * (model_1* model_2) + background 497 502 """ 498 503 name = '' 499 504 if operator == '*': 500 505 name = 'Multi' 501 factor = 'background' 506 factor_1 = '' 507 factor_2 = '' 502 508 else: 503 509 name = 'Sum' 504 factor = 'scale_factor' 510 factor_1 = 'scale_1 * ' 511 factor_2 = 'scale_2 * ' 505 512 506 513 self._operator = operator 507 self.explanation = (" Plugin_model = scale_factor * ( model_1 {} "508 " model_2) + background").format(operator)514 self.explanation = (" Plugin_model = scale_factor * ({}model_1 {} " 515 "{}model_2) + background").format(factor_1,operator,factor_2) 509 516 self.explanationctr.SetLabel(self.explanation) 510 517 self.name = name + M_NAME
Note: See TracChangeset
for help on using the changeset viewer.