Changeset 316e231 in sasview for fittingview/src/sans/perspectives/fitting/plugin_models/sph_bessel_jn.py
- Timestamp:
- May 3, 2012 11:23:15 AM (13 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/sph_bessel_jn.py
r19e614a r316e231 19 19 import numpy ##DO NOT CHANGE THIS LINE!!! 20 20 import scipy.special ##CHANGE THIS LINE WITH CAUTION!!! 21 21 import os 22 import sys 22 23 ##PLEASE READ COMMENTS CAREFULLY !!! COMMENT ARE IN CAPITAL LETTERS AND AFTER ## 23 24 ## THESE COMMENTS ARE THERE TO GUIDE YOU. YOU CAN REMOVE THEM ONLY WHEN YOU ARE … … 34 35 ##EXAMPLE: Class that evaluates a polynomial model. 35 36 """ 36 ## YOU CAN MODIFY THE LINE BELLOW. CHANGE ONLY WORDS BETWEEN " " 37 ## TO RENAME YOUR MODEL 38 name = "sph_bessel_jn" ## <----- FILE NAME (NAME OF THE MODEL) 37 name = "" 39 38 40 39 def __init__(self): ##DO NOT CHANGE THIS LINE!!! … … 47 46 ## DELETE MODIFIABLE LINE HERE WILL REDUCE THE NUMBER OF PARAMETERS 48 47 self.params = {} ##DO NOT CHANGE THIS LINE!!! 49 48 # Set the name same as the file name 49 self.name = self.get_fname() ##DO NOT CHANGE THIS LINE!!! 50 50 ## YOU CAN MODIFY THE LINE BELLOW.CHANGE WORD BETWEEN ' ' AND NUMBER 51 51 ## YOU CAN ALSO DELETE THIS LINE … … 112 112 113 113 return result ## MODIFY ONLY RESULT. DON'T DELETE RETURN!!!! 114 114 115 ## DO NOT MODIFY THE FOLLOWING LINES!!!!!!!!!!!!!!!! 116 def get_fname(self): 117 """ 118 Get the model name same as the file name 119 """ 120 path = sys._getframe().f_code.co_filename 121 basename = os.path.basename(path) 122 name, _ = os.path.splitext(basename) 123 return name 124 115 125 ############################################################################### 116 126 ## DO NOT MODIFY THE FOLLOWING LINES!!!!!!!!!!!!!!!!
Note: See TracChangeset
for help on using the changeset viewer.