Changeset 316e231 in sasview for fittingview/src/sans/perspectives/fitting/plugin_models/polynominal5.py
- Timestamp:
- May 3, 2012 11:23:15 AM (12 years ago)
- 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:
- 56acb5d
- Parents:
- 74d7b59
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/plugin_models/polynominal5.py
r19e614a r316e231 20 20 import math ##DO NOT CHANGE THIS LINE!!! 21 21 import numpy ##DO NOT CHANGE THIS LINE!!! 22 22 import os 23 import sys 23 24 ## <----- SIGN DEFINES WHERE YOU CAN MODIFY THE CODE 24 25 … … 30 31 ##EXAMPLE: Class that evaluates a polynomial model. 31 32 """ 32 ## YOU CAN MODIFY THE LINE BELLOW. CHANGE ONLY WORDS BETWEEN " " 33 ## TO RENAME YOUR MODEL: THIS NAME IS WHAT YOU SEE ON GUI. 34 name = "polynomial5" ## <----- FILE NAME (NAME OF THE MODEL) 33 name = "" 35 34 36 35 def __init__(self): ##DO NOT CHANGE THIS LINE!!! … … 48 47 self.params['E'] = 0.0 ## <----- 49 48 self.params['F'] = 0.0 ## <----- 49 # Set the name same as the file name 50 self.name = self.get_fname() ##DO NOT CHANGE THIS LINE!!! 50 51 ## YOU CAN MODIFY THE LINE BELLOW.MODIFY WORDS BETWEEN """ """ ONLY!!!! 51 52 self.description = """ … … 88 89 89 90 return result ## MODIFY ONLY RESULT. DON'T DELETE RETURN!!!! 90 91 92 ## DO NOT MODIFY THE FOLLOWING LINES!!!!!!!!!!!!!!!! 93 def get_fname(self): 94 """ 95 Get the model name same as the file name 96 """ 97 path = sys._getframe().f_code.co_filename 98 basename = os.path.basename(path) 99 name, _ = os.path.splitext(basename) 100 return name 101 91 102 ############################################################################### 92 103 ## THIS IS FOR TEST. DO NOT MODIFY THE FOLLOWING LINES!!!!!!!!!!!!!!!!
Note: See TracChangeset
for help on using the changeset viewer.