Ignore:
Timestamp:
Oct 5, 2018 5:16:46 AM (22 months ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
00a40bd
Parents:
3ab2105
Message:

Modified batch grid viewer after changes to magnetic param names.
Adjusted unit tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Utilities/GridPanel.py

    rfa762f4 ra4b9b7a  
    307307        model = data[0][0] 
    308308 
    309         # TODO: add a conditional for magnetic models 
    310         param_list = [m for m in model.model.params.keys() if ":" not in m] 
     309        disperse_params = list(model.model.dispersion.keys()) 
     310        magnetic_params = model.model.magnetic_params 
     311        optimized_params = model.param_list 
     312        # Create the main parameter list 
     313        param_list = [m for m in model.model.params.keys() if (m not in model.model.magnetic_params and ".width" not in m)] 
     314 
     315        # add fitted polydisp parameters 
     316        param_list += [m+".width" for m in disperse_params if m+".width" in optimized_params] 
     317 
     318        # add fitted magnetic params 
     319        param_list += [m for m in magnetic_params if m in optimized_params] 
    311320 
    312321        # Check if 2D model. If not, remove theta/phi 
Note: See TracChangeset for help on using the changeset viewer.