Changeset bac3988 in sasview


Ignore:
Timestamp:
Mar 17, 2016 11:08:10 AM (8 years ago)
Author:
ajj
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:
1c628f0
Parents:
a301204
Message:

Fixing category lists and list of models in GUI

Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • sasview/default_categories.json

    rdb46d13 rbac3988  
    1 {"Shapes": [["BarBellModel", true], ["PearlNecklaceModel", true], ["HollowCylinderModel", true], ["CoreMultiShellModel", true], ["FCCrystalModel", true], ["ParallelepipedModel", true], ["FuzzySphereModel", true], ["CoreShellEllipsoidXTModel", true], ["LamellarPCrystalModel", true], ["BCCrystalModel", true], ["EllipticalCylinderModel", true], ["RectangularHollowPrismInfThinWallsModel", true], ["CSParallelepipedModel", true], ["OnionExpShellModel", true], ["MultiShellModel", true], ["RaspBerryModel", true], ["CoreShellEllipsoidModel", true], ["CappedCylinderModel", true], ["CylinderModel", true], ["SphericalSLDModel", true], ["SCCrystalModel", true], ["StackedDisksModel", true], ["LamellarPSHGModel", true], ["CoreShellBicelleModel", true], ["RectangularHollowPrismModel", true], ["LamellarPSModel", true], ["EllipsoidModel", true], ["SphereModel", true], ["VesicleModel", true], ["TriaxialEllipsoidModel", true], ["LamellarModel", true], ["PringlesModel", true], ["RectangularPrismModel", true], ["CoreShellCylinderModel", true], ["BinaryHSModel", true], ["FlexibleCylinderModel", true], ["LamellarFFHGModel", true], ["FlexCylEllipXModel", true], ["LinearPearlsModel", true], ["CoreShellModel", true]], "Structure Factor": [["SquareWellStructure", true], ["HayterMSAStructure", true], ["HardsphereStructure", true], ["StickyHSStructure", true]], "Shape-Independent": [["TwoPowerLawModel", true], ["GelFitModel", true], ["DABModel", true], ["PowerLawAbsModel", true], ["PorodModel", true], ["GuinierModel", true], ["RPA10Model", true], ["TeubnerStreyModel", true], ["StarPolymer", true], ["UnifiedPowerRgModel", true], ["MassSurfaceFractal", true], ["Core2ndMomentModel", true], ["TwoLorentzianModel", true], ["DebyeModel", true], ["MassFractalModel", true], ["GuinierPorodModel", true], ["CorrLengthModel", true], ["PolymerExclVolume", true], ["FractalModel", true], ["PeakLorentzModel", true], ["BroadPeakModel", true], ["FractalCoreShellModel", true], ["PeakGaussModel", true], ["BEPolyelectrolyte", true], ["Poly_GaussCoil", true], ["SurfaceFractalModel", true], ["GaussLorentzGelModel", true], ["LorentzModel", true]], "Uncategorized": [["ReflectivityModel", true], ["ReflectivityIIModel", true], ["LineModel", true], ["MicelleSphCoreModel", true]]} 
     1{"Shapes": [["cylinder", true], ["lamellarPC", true], ["core_shell_cylinder", true], ["barbell", true], ["fuzzy_sphere", true], ["sphere", true], ["triaxial_ellipsoid", true], ["rectangular_prism", true], ["core_shell_bicelle", true], ["flexible_cylinder", true], ["hollow_rectangular_prism", true], ["ellipsoid", true], ["flexible_cylinder_ex", true], ["capped_cylinder", true], ["core_shell_ellipsoid", true], ["core_shell_parallelepiped", true], ["core_shell_ellipsoid_xt", true], ["vesicle", true], ["core_shell_sphere", true], ["parallelepiped", true], ["hollow_cylinder", true], ["linear_pearls", true], ["pearl_necklace", true], ["lamellar", true], ["multi_shell", true], ["hollow_rectangular_prism_infinitely_thin_walls", true], ["sc_crystal", true], ["stacked_disks", true]], "Structure Factor": [["stickyhardsphere", true], ["hayter_msa", true], ["squarewell", true], ["hardsphere", true]], "Shape-Independent": [["guinier", true], ["gel_fit", true], ["teubner_strey", true], ["gaussian_peak", true], ["mono_gauss_coil", true], ["mass_surface_fractal", true], ["adsorbed_layer", true], ["two_lorentzian", true], ["correlation_length", true], ["dab", true], ["poly_gauss_coil", true], ["guinier_porod", true], ["star_polymer", true], ["two_power_law", true], ["power_law", true], ["peak_lorentz", true], ["rpa", true], ["broad_peak", true], ["surface_fractal", true], ["be_polyelectrolyte", true], ["mass_fractal", true], ["polymer_excl_volume", true], ["porod", true], ["gauss_lorentz_gel", true], ["lorentz", true], ["fractal_core_shell", true]], "Uncategorized": [["line", true], ["fcc_paracrystal", true], ["elliptical_cylinder", true], ["lamellarPS", true], ["micelle_spherical_core", true], ["lamellar_FFHG", true], ["bcc_paracrystal", true], ["sphere (python)", true], ["lamellarCailleHG", true]]} 
  • src/sas/sasgui/perspectives/calculator/model_editor.py

    rd85c194 rbac3988  
    574574                    if not self.is_p1_custom: 
    575575                        line = line.replace('#', '') 
    576                         out_f.write(line % (name1, name1) + "\n") 
     576                        out_f.write(line % (name1) + "\n") 
    577577                    else: 
    578578                        out_f.write(line + "\n") 
     
    586586                    if not self.is_p2_custom: 
    587587                        line = line.replace('#', '') 
    588                         out_f.write(line % (name2, name2) + "\n") 
     588                        out_f.write(line % (name2) + "\n") 
    589589                    else: 
    590590                        out_f.write(line + "\n") 
     
    12651265# User can change the name of the model (only with single functional model) 
    12661266#P1_model: 
    1267 #from sas.models.%s import %s as P1 
     1267#from sasmodels.models import %s as P1 
    12681268#from %s import Model as P1 
    12691269 
    12701270#P2_model: 
    1271 #from sas.models.%s import %s as P2 
     1271#from sasmodels.models import %s as P2 
    12721272#from %s import Model as P2 
    12731273import os 
  • src/sas/sasgui/perspectives/fitting/basepage.py

    r50a77df rbac3988  
    12821282            else: 
    12831283                self.model_view.SetLabel("1D Mode") 
    1284          
     1284 
    12851285        ## set the select all check box to the a given state 
    12861286        self.cb1.SetValue(state.cb1) 
     
    19041904                        m_list.append(self.model_dict[model]) 
    19051905                    #else: 
    1906                     #    msg = "This model is disabled by Category Manager."  
     1906                    #    msg = "This model is disabled by Category Manager." 
    19071907                    #    wx.PostEvent(self.parent.parent, 
    19081908                    #                 StatusEvent(status=msg, info="error")) 
     
    19451945            name = model.__class__.__name__ 
    19461946            if models.__name__ != "NoStructure": 
    1947                 if hasattr(model, "oldname"): 
    1948                     name = model.oldname 
    1949                 elif hasattr(model, "name"): 
    1950                     name = model.name 
     1947                name = model.name 
    19511948                mlist.append((name, models)) 
    19521949 
     
    24172414        self._draw_model() 
    24182415        ## Need to use FitInside again here to replace the next four lines. 
    2419         ## Otherwised polydispersity off does not resize the scrollwindow.  
     2416        ## Otherwised polydispersity off does not resize the scrollwindow. 
    24202417        ## PDB Nov 28, 2015 
    24212418        self.FitInside() 
     
    24612458        self.values = {} 
    24622459        self.weights = {} 
    2463        
     2460 
    24642461        #from sas.models.dispersion_models import GaussianDispersion 
    24652462        from sasmodels.weights import GaussianDispersion 
     
    29702967        self.Show(False) 
    29712968        self.set_model_param_sizer(self.model) 
    2972         #self._set_sizer_dispersion()  
     2969        #self._set_sizer_dispersion() 
    29732970        self.state.magnetic_on = self.magnetic_on 
    29742971        self.SetupScrolling() 
     
    35973594        sizer_cat_box.Add(show_cat_button) 
    35983595        #self.shape_rbutton.SetValue(True) 
    3599        
     3596 
    36003597        sizer_radiobutton = wx.GridSizer(2, 2, 5, 5) 
    36013598        #sizer_radiobutton.Add(self.shape_rbutton) 
     
    38173814        event.Skip() 
    38183815        #pass 
    3819  
  • src/sas/sasgui/perspectives/fitting/models.py

    rf66d9d1 rbac3988  
    303303        for mod_name in sasmodels.core.list_models(): 
    304304            mod_def = sasmodels.core.load_model_info(mod_name) 
    305             self.model_dictionary[mod_def['oldname']] = make_class(mod_def,dtype=None,namestyle='oldname') 
    306             self.model_name_list.append(mod_def['oldname']) 
     305            self.model_dictionary[mod_def['name']] = make_class(mod_def,dtype=None,namestyle='name') 
    307306            if mod_def['structure_factor'] == True: 
    308                 self.struct_list.append(self.model_dictionary[mod_def['oldname']]) 
     307                self.struct_list.append(self.model_dictionary[mod_def['name']]) 
    309308            if mod_def['variant_info'] is not None: 
    310                 self.multi_func_list.append(self.model_dictionary[mod_def['oldname']]) 
     309                self.multi_func_list.append(self.model_dictionary[mod_def['name']]) 
     310            else: 
     311                self.model_name_list.append(mod_def['name']) 
    311312            if mod_def['ER'] is not None: 
    312                 self.multiplication_factor.append(self.model_dictionary[mod_def['oldname']]) 
     313                self.multiplication_factor.append(self.model_dictionary[mod_def['name']]) 
    313314 
    314315        #Looking for plugins 
Note: See TracChangeset for help on using the changeset viewer.