Ignore:
Timestamp:
Sep 23, 2008 3:25:52 PM (16 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
6aa47df
Parents:
e71440c
Message:

models added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/models.py

    r3b19ac9 r442895f  
    11import wx 
    22import imp 
    3 import os,sys 
     3import os,sys,math 
    44import os.path 
    55 
     
    7676        self.model_list = {} 
    7777        self.model_list_box = {} 
     78         
    7879        model_info="shape-based models" 
     80         
     81        from sans.models.SphereModel import SphereModel 
     82        self.model_list[str(wx.NewId())] =  ModelInfo(SphereModel , model_info) 
     83         
    7984        from sans.models.CylinderModel import CylinderModel 
    8085        self.model_list[str(wx.NewId())] = ModelInfo(CylinderModel , model_info) 
    8186       
    82         from sans.models.SphereModel import SphereModel 
    83         self.model_list[str(wx.NewId())] =  ModelInfo(SphereModel , model_info) 
    84     
     87        from sans.models.CoreShellModel import CoreShellModel 
     88        self.model_list[str(wx.NewId())] = ModelInfo(CoreShellModel , model_info) 
     89         
     90        from sans.models.CoreShellCylinderModel import CoreShellCylinderModel 
     91        self.model_list[str(wx.NewId())] = ModelInfo(CoreShellCylinderModel , model_info) 
     92         
     93        from sans.models.EllipticalCylinderModel import EllipticalCylinderModel 
     94        self.model_list[str(wx.NewId())] = ModelInfo(EllipticalCylinderModel , model_info) 
     95         
     96        from sans.models.EllipsoidModel import EllipsoidModel 
     97        self.model_list[str(wx.NewId())] = ModelInfo(EllipsoidModel , model_info) 
     98         
    8599        from sans.guitools.LineModel import LineModel 
    86100        self.model_list[str(wx.NewId())]  = ModelInfo(LineModel , model_info) 
     101         
     102         
    87103        model_info="shape-independent models" 
    88         from sans.models.Lorentzian import Lorentzian 
    89         self.indep_model.append( ModelInfo(Lorentzian , model_info) ) 
     104         
     105        from sans.models.BEPolyelectrolyte import BEPolyelectrolyte 
     106        self.indep_model.append( ModelInfo( BEPolyelectrolyte , model_info) ) 
     107         
     108        from sans.models.DABModel import DABModel 
     109        self.indep_model.append( ModelInfo(DABModel , model_info+ 
     110        "\n Evaluates F(x) = scale/( 1 + (x*L)^2 )^(2) +bkd") ) 
     111         
     112        from sans.models.DebyeModel import DebyeModel 
     113        self.indep_model.append( ModelInfo(DebyeModel , model_info+ 
     114        "\n Evaluates F(x) = 2( exp(-x)+x -1 )/x**2") ) 
     115         
     116        from sans.models.FractalModel import FractalModel 
     117        class FractalAbsModel(FractalModel): 
     118            def _Fractal(self, x): 
     119                return FractalModel._Fractal(self, math.fabs(x)) 
     120        self.indep_model.append( ModelInfo(FractalAbsModel , model_info) ) 
     121         
     122        from sans.models.LorentzModel import LorentzModel 
     123        self.indep_model.append( ModelInfo(LorentzModel , model_info+ 
     124                "\n Evaluates F(x)= scale/( 1 + (x*L)^2 ) + bkd ") )  
     125             
     126        from sans.models.PowerLawModel import PowerLawModel 
     127        class PowerLawAbsModel(PowerLawModel): 
     128            def _PowerLaw(self, x): 
     129                try: 
     130                    return PowerLawModel._PowerLaw(self, math.fabs(x)) 
     131                except: 
     132                    print sys.exc_value   
     133        self.indep_model.append( ModelInfo(PowerLawAbsModel , model_info+ 
     134        "\n Evaluates abs(F(x)) \n with F(x) = scale* (x)^(m) + bkd ") ) 
     135                     
     136        
     137        from sans.models.TeubnerStreyModel import TeubnerStreyModel 
     138        self.indep_model.append( ModelInfo(TeubnerStreyModel , model_info) ) 
     139         
     140         
     141           
     142         
     143         
     144       
    90145         
    91146        #Looking for plugins 
Note: See TracChangeset for help on using the changeset viewer.