Ignore:
Timestamp:
Oct 20, 2010 6:08:34 PM (14 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:
d2539aa
Parents:
f118fe2f
Message:

added new models

File:
1 edited

Legend:

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

    ra1b2471 rfb59ed9  
    172172         
    173173        """ 
    174         ## form factor 
    175174        from sans.models.SphereModel import SphereModel 
    176175        self.shape_list.append(SphereModel) 
     
    185184        self.shape_list.append(FuzzySphereModel) 
    186185        self.multiplication_factor.append(FuzzySphereModel) 
    187          
     186            
    188187        from sans.models.CoreShellModel import CoreShellModel 
    189188        self.shape_list.append(CoreShellModel) 
     
    194193        self.multiplication_factor.append(CoreMultiShellModel) 
    195194        self.multi_func_list.append(CoreMultiShellModel) 
    196          
     195 
    197196        from sans.models.VesicleModel import VesicleModel 
    198197        self.shape_list.append(VesicleModel) 
     
    232231        self.multiplication_factor.append(ParallelepipedModel) 
    233232         
     233        from sans.models.CSParallelepipedModel import CSParallelepipedModel 
     234        self.shape_list.append(CSParallelepipedModel) 
     235        self.multiplication_factor.append(CSParallelepipedModel) 
     236         
    234237        from sans.models.EllipticalCylinderModel import EllipticalCylinderModel 
    235238        self.shape_list.append(EllipticalCylinderModel) 
    236239        self.multiplication_factor.append(EllipticalCylinderModel) 
    237                  
     240         
     241        from sans.models.BarBellModel import BarBellModel 
     242        self.shape_list.append(BarBellModel) 
     243        # not implemeted yet! 
     244        #self.multiplication_factor.append(BarBellModel) 
     245         
     246        from sans.models.CappedCylinderModel import CappedCylinderModel 
     247        self.shape_list.append(CappedCylinderModel) 
     248        # not implemeted yet! 
     249        #self.multiplication_factor.append(CappedCylinderModel) 
     250         
    238251        from sans.models.EllipsoidModel import EllipsoidModel 
    239252        self.shape_list.append(EllipsoidModel) 
     
    259272        from sans.models.LamellarPSHGModel import LamellarPSHGModel 
    260273        self.shape_list.append(LamellarPSHGModel) 
     274         
     275        from sans.models.LamellarPCrystalModel import LamellarPCrystalModel 
     276        self.shape_list.append(LamellarPCrystalModel) 
     277         
     278        from sans.models.SCCrystalModel import SCCrystalModel 
     279        self.shape_list.append(SCCrystalModel) 
     280         
     281        from sans.models.FCCrystalModel import FCCrystalModel 
     282        self.shape_list.append(FCCrystalModel) 
     283         
     284        from sans.models.BCCrystalModel import BCCrystalModel 
     285        self.shape_list.append(BCCrystalModel) 
    261286       
    262287        ## Structure factor  
     
    272297        from sans.models.HayterMSAStructure import HayterMSAStructure 
    273298        self.struct_list.append(HayterMSAStructure) 
    274      
    275         ##shape-independent models   
     299         
     300        ##shape-independent models 
    276301        from sans.models.PowerLawAbsModel import PowerLawAbsModel 
    277302        self.shape_indep_list.append( PowerLawAbsModel ) 
     
    280305        self.shape_indep_list.append(BEPolyelectrolyte ) 
    281306        self.form_factor_dict[str(wx.NewId())] =  [SphereModel] 
    282  
     307         
     308        from sans.models.BroadPeakModel import BroadPeakModel 
     309        self.shape_indep_list.append(BroadPeakModel) 
     310         
     311        from sans.models.CorrLengthModel import CorrLengthModel 
     312        self.shape_indep_list.append(CorrLengthModel) 
     313         
    283314        from sans.models.DABModel import DABModel 
    284315        self.shape_indep_list.append(DABModel ) 
     
    287318        self.shape_indep_list.append(DebyeModel ) 
    288319         
     320        #FractalModel (a c-model)is now being used instead of FractalAbsModel. 
     321        from sans.models.FractalModel import FractalModel 
     322        self.shape_indep_list.append(FractalModel ) 
     323         
     324        from sans.models.FractalCoreShellModel import FractalCoreShellModel 
     325        self.shape_indep_list.append(FractalCoreShellModel ) 
     326         
     327        from sans.models.GaussLorentzGelModel import GaussLorentzGelModel 
     328        self.shape_indep_list.append(GaussLorentzGelModel)  
     329                 
    289330        from sans.models.GuinierModel import GuinierModel 
    290331        self.shape_indep_list.append(GuinierModel ) 
    291332         
    292         from sans.models.FractalModel import FractalModel 
    293         self.shape_indep_list.append(FractalModel ) 
    294          
     333        from sans.models.GuinierPorodModel import GuinierPorodModel 
     334        self.shape_indep_list.append(GuinierPorodModel ) 
     335 
    295336        from sans.models.LorentzModel import LorentzModel 
    296337        self.shape_indep_list.append( LorentzModel)  
     
    304345        from sans.models.Poly_GaussCoil import Poly_GaussCoil 
    305346        self.shape_indep_list.append(Poly_GaussCoil) 
    306                   
     347         
     348        from sans.models.PolymerExclVolume import PolymerExclVolume 
     349        self.shape_indep_list.append(PolymerExclVolume) 
     350         
    307351        from sans.models.PorodModel import PorodModel 
    308         self.shape_indep_list.append(PorodModel ) 
    309          
    310         #FractalModel (a c-model)will be used. 
    311         #from sans.models.FractalAbsModel import FractalAbsModel 
    312         #self.shape_indep_list.append(FractalAbsModel) 
     352        self.shape_indep_list.append(PorodModel )       
     353         
     354        from sans.models.RPA10Model import RPA10Model 
     355        self.shape_indep_list.append(RPA10Model) 
     356        self.multi_func_list.append(RPA10Model) 
    313357         
    314358        from sans.models.TeubnerStreyModel import TeubnerStreyModel 
    315359        self.shape_indep_list.append(TeubnerStreyModel ) 
    316360         
     361        from sans.models.TwoLorentzianModel import TwoLorentzianModel 
     362        self.shape_indep_list.append(TwoLorentzianModel ) 
     363         
     364        from sans.models.TwoPowerLawModel import TwoPowerLawModel 
     365        self.shape_indep_list.append(TwoPowerLawModel ) 
     366         
     367        from sans.models.UnifiedPowerRgModel import UnifiedPowerRgModel 
     368        self.shape_indep_list.append(UnifiedPowerRgModel ) 
     369        self.multi_func_list.append(UnifiedPowerRgModel) 
     370         
    317371        from sans.models.LineModel import LineModel 
    318372        self.shape_indep_list.append(LineModel) 
    319373         
     374        from sans.models.ReflectivityModel import ReflectivityModel 
     375        self.multi_func_list.append(ReflectivityModel) 
     376     
    320377        #Looking for plugins 
    321378        self.plugins = findModels() 
     379        self._get_multifunc_models() 
     380        self.plugins.append(ReflectivityModel) 
    322381        return 0 
    323382 
     
    466525        wx.PostEvent(self.event_owner, evt) 
    467526         
     527    def _get_multifunc_models(self): 
     528        """ 
     529        Get the multifunctional models 
     530        """ 
     531        for item in self.plugins: 
     532            try: 
     533                # check the multiplicity if any 
     534                if item.multiplicity_info[0] > 1: 
     535                    self.multi_func_list.append(item) 
     536            except: 
     537                # pass to other items 
     538                pass 
     539                     
    468540    def get_model_list(self):     
    469541        """ 
Note: See TracChangeset for help on using the changeset viewer.