Ignore:
Timestamp:
May 2, 2012 11:03:55 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:
3aab96b
Parents:
6246e00
Message:

let users be able to delete default custom models (WIN app only)

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

Legend:

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

    re9bd127 r19e614a  
    3232    ## YOU CAN MODIFY THE LINE BELLOW. CHANGE ONLY WORDS BETWEEN " "  
    3333    ## TO RENAME YOUR MODEL: THIS NAME IS WHAT YOU SEE ON GUI. 
    34     name = "polynomial5"        ## <----- NAME OF THE MODEL    
     34    name = "polynomial5"        ## <----- FILE NAME (NAME OF THE MODEL)    
    3535                                 
    3636    def __init__(self):      ##DO NOT CHANGE THIS LINE!!! 
     
    4848        self.params['E'] = 0.0       ## <-----                   
    4949        self.params['F'] = 0.0       ## <-----    
    50          
     50        ## YOU CAN MODIFY THE LINE BELLOW.MODIFY WORDS BETWEEN """   """  ONLY!!!! 
     51        self.description = """ 
     52            a + b * x + c * math.pow(x,2) + d * math.pow(x,3) \n 
     53             + e * math.pow(x,4) + f * math.pow(x,5)   
     54        """                        ## <-----    
    5155        ## DEFINE DEFAULT DETAILS 
    5256        self.set_details()      ##DO NOT DELETE OR CHANGE THIS LINE!!! 
  • fittingview/src/sans/perspectives/fitting/plugin_models/sph_bessel_jn.py

    re9bd127 r19e614a  
    3636    ## YOU CAN MODIFY THE LINE BELLOW. CHANGE ONLY WORDS BETWEEN " "  
    3737    ## TO RENAME YOUR MODEL 
    38     name = "C*sph_jn(Ax+B)+D" ## <----- NAME OF THE MODEL    
     38    name = "sph_bessel_jn" ## <----- FILE NAME (NAME OF THE MODEL)    
    3939                                 
    4040    def __init__(self):      ##DO NOT CHANGE THIS LINE!!! 
  • fittingview/src/sans/perspectives/fitting/plugin_models/sum_Ap1_1_Ap2.py

    r2b4c8ca r19e614a  
    4343    Note: P(Q) refers to 'form factor' model. 
    4444    """ 
    45     name = "" 
     45    name = "sum_Ap1_1_Ap2" ## <----- FILE NAME (NAME OF THE MODEL)  
    4646    def __init__(self): 
    47         Model1DPlugin.__init__(self, name='') 
     47        Model1DPlugin.__init__(self, name=self.name) 
    4848        """ 
    4949        :param p_model1: a form factor, P(Q) 
     
    5353        p_model2 = P2() 
    5454        ## Setting  model name model description 
    55         self.description="" 
    56         self.name = self._get_name(p_model1.name, p_model2.name) 
    57         self.description = p_model1.name+"\n" 
    58         self.description += p_model2.name+"\n" 
     55        self.description = "" 
    5956        self.fill_description(p_model1, p_model2) 
    6057 
     
    391388        """ 
    392389        description = "" 
    393         description +="This model gives the summation of  %s and %s.\n"% \ 
     390        description +="This model gives the summation of (A*%s) and ((1-A)*%s).\n"% \ 
    394391                                        ( p_model1.name, p_model2.name ) 
    395392        self.description += description 
  • fittingview/src/sans/perspectives/fitting/plugin_models/sum_p1_p2.py

    r0e62f0f r19e614a  
    4848    Note: P(Q) refers to 'form factor' model. 
    4949    """ 
    50     name = "" 
     50    name = "sum_p1_p2" ## <----- FILE NAME (NAME OF THE MODEL)  
    5151    def __init__(self): 
    52         Model1DPlugin.__init__(self, name='') 
     52        Model1DPlugin.__init__(self, name=self.name) 
    5353        """ 
    5454        :param p_model1: a form factor, P(Q) 
     
    5959        ## Setting  model name model description 
    6060        self.description="" 
    61         self.name = self._get_name(p_model1.name, p_model2.name) 
     61         
    6262        self.description = p_model1.name+"\n" 
    6363        self.description += p_model2.name+"\n" 
  • fittingview/src/sans/perspectives/fitting/plugin_models/testmodel.py

    re9bd127 r19e614a  
    3636    ## YOU CAN MODIFY THE LINE BELLOW. CHANGE ONLY WORDS BETWEEN " "  
    3737    ## TO RENAME YOUR MODEL 
    38     name = "A+Bcos(2x)+Csin(2x)"      ## <----- NAME OF THE MODEL    
     38    name = "testmodel"      ## <----- FILE NAME (NAME OF THE MODEL)    
    3939     
    4040    def __init__(self): 
  • fittingview/src/sans/perspectives/fitting/plugin_models/testmodel_2.py

    r6f140f2 r19e614a  
    3535    ## YOU CAN MODIFY THE LINE BELLOW. CHANGE ONLY WORDS BETWEEN " "  
    3636    ## TO RENAME YOUR MODEL 
    37     name = "sin(poly)/(poly)" ## <----- NAME OF THE MODEL    
     37    name = "testmodel_2" ## <----- FILE NAME (NAME OF THE MODEL)   
    3838                                 
    3939    def __init__(self):      ##DO NOT CHANGE THIS LINE!!! 
Note: See TracChangeset for help on using the changeset viewer.