Changeset 26d5aa5 in sasview


Ignore:
Timestamp:
Mar 17, 2016 12:41:47 PM (9 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:
ec36e48
Parents:
1c628f0
Message:

Making easy sum model work with sasmodels

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasview/default_categories.json

    r1c628f0 r26d5aa5  
    1 {"Shapes": [["barbell", true], ["pearl_necklace", true], ["hollow_cylinder", true], ["CoreMultiShellModel", true], ["fcc", true], ["parallelepiped", true], ["fuzzy_sphere", true], ["core_shell_ellipsoid_xt", true], ["lamellarPC", true], ["bcc", true], ["ellptical_cylinder", true], ["hollow_rectangular_prism_infinitely_thin_walls", true], ["core_shell_parallelepiped", true], ["OnionExpShellModel", true], ["multi_shell", true], ["raspberry", true], ["core_shell_ellipsoid", true], ["capped_cylinder", true], ["cylinder", true], ["SphericalSLDModel", true], ["sc_crystal", true], ["stacked_disks", true], ["LamellarPSHGModel", true], ["core_shell_bicelle", true], ["hollow_rectangular_prism", true], ["LamellarPSModel", true], ["ellipsoid", true], ["sphere", true], ["vesicle", true], ["triaxial_ellipsoid", true], ["lamellar", true], ["pringles", true], ["rectangular_prism", true], ["core_shell_cylinder", true], ["BinaryHSModel", true], ["flexible_cylinder", true], ["lamellarFFHG", true], ["flexible_cylinder_ex", true], ["linear_pearls", true], ["core_shell_sphere", true]], "Structure Factor": [["squarewell", true], ["hayter_msa", true], ["hardsphere", true], ["stickyhardsphere", true]], "Shape-Independent": [["two_power_law", true], ["gel_fit", true], ["dab", true], ["power_law", true], ["porod", true], ["guinier", true], ["rpa", true], ["teubner_strey", true], ["star_polymer", true], ["UnifiedPowerRgModel", true], ["mass_surface_fractal", true], ["adsorbed_layer", true], ["two_lorentzian", true], ["mono_gauss_coil", true], ["mass_fractal", true], ["guinier_porod", true], ["correlation_length", true], ["polymer_excl_volume", true], ["FractalModel", true], ["peak_lorentz", true], ["broad_peak", true], ["fractal_core_shell", true], ["gaussian_peak", true], ["be_polyelectrolyte", true], ["poly_gauss_coil", true], ["surface_fractal", true], ["gauss_lorentz_gel", true], ["lorentz", true]], "Uncategorized": [["ReflectivityModel", true], ["ReflectivityIIModel", true], ["line", true], ["micell_spherical_coil", 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

    rbac3988 r26d5aa5  
    589589                    else: 
    590590                        out_f.write(line + "\n") 
     591                elif line.count("P1 = make_class"): 
     592                    out_f.write(line % (name1) + "\n") 
     593                elif line.count("P2 = make_class"): 
     594                    out_f.write(line % (name2) + "\n") 
     595 
    591596                elif line.count("self.description = '%s'"): 
    592597                    out_f.write(line % description + "\n") 
     
    12631268import copy 
    12641269from sas.models.pluginmodel import Model1DPlugin 
     1270from sasmodels.sasview_model import make_class 
     1271from sasmodels.core import load_model_info 
    12651272# User can change the name of the model (only with single functional model) 
    12661273#P1_model: 
    1267 #from sasmodels.models import %s as P1 
    12681274#from %s import Model as P1 
    12691275 
    12701276#P2_model: 
    1271 #from sasmodels.models import %s as P2 
    12721277#from %s import Model as P2 
    12731278import os 
     
    12781283    def __init__(self): 
    12791284        Model1DPlugin.__init__(self, name='') 
     1285        P1 = make_class(load_model_info('%s')) 
     1286        P2 = make_class(load_model_info('%s')) 
    12801287        p_model1 = P1() 
    12811288        p_model2 = P2() 
Note: See TracChangeset for help on using the changeset viewer.