Ignore:
Timestamp:
Oct 26, 2017 3:13:05 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
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
Children:
895e7359
Parents:
def64a0
Message:

Initial changes to make SasView? run with python3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingUtilities.py

    • Property mode changed from 100644 to 100755
    rd0dfcb2 rb0b09b9  
    4444    Returns a list of all multi-shell parameters in 'model' 
    4545    """ 
    46     return list(filter(lambda par: "[" in par.name, model.iq_parameters)) 
     46    return list([par for par in model.iq_parameters if "[" in par.name]) 
    4747 
    4848def getMultiplicity(model): 
     
    156156    """ 
    157157    for i, item in enumerate(model_header_captions): 
    158         model.setHeaderData(i, QtCore.Qt.Horizontal, QtCore.QVariant(item)) 
     158        #model.setHeaderData(i, QtCore.Qt.Horizontal, QtCore.QVariant(item)) 
     159        model.setHeaderData(i, QtCore.Qt.Horizontal, item) 
    159160 
    160161    model.header_tooltips = model_header_tooltips 
     
    167168    model_header_error_captions.insert(2, header_error_caption) 
    168169    for i, item in enumerate(model_header_error_captions): 
    169         model.setHeaderData(i, QtCore.Qt.Horizontal, QtCore.QVariant(item)) 
     170        model.setHeaderData(i, QtCore.Qt.Horizontal, item) 
    170171 
    171172    model_header_error_tooltips = model_header_tooltips 
     
    178179    """ 
    179180    for i, item in enumerate(poly_header_captions): 
    180         model.setHeaderData(i, QtCore.Qt.Horizontal, QtCore.QVariant(item)) 
     181        model.setHeaderData(i, QtCore.Qt.Horizontal, item) 
    181182 
    182183    model.header_tooltips = poly_header_tooltips 
     
    190191    poly_header_error_captions.insert(2, header_error_caption) 
    191192    for i, item in enumerate(poly_header_error_captions): 
    192         model.setHeaderData(i, QtCore.Qt.Horizontal, QtCore.QVariant(item)) 
     193        model.setHeaderData(i, QtCore.Qt.Horizontal, item) 
    193194 
    194195    poly_header_error_tooltips = poly_header_tooltips 
     
    202203    multishell_parameters = getIterParams(parameters) 
    203204 
    204     for i in xrange(index): 
     205    for i in range(index): 
    205206        for par in multishell_parameters: 
    206207            # Create the name: <param>[<i>], e.g. "sld1" for parameter "sld[n]" 
     
    396397 
    397398def binary_encode(i, digits): 
    398     return [i >> d & 1 for d in xrange(digits)] 
     399    return [i >> d & 1 for d in range(digits)] 
    399400 
    400401def getWeight(data, is2d, flag=None): 
Note: See TracChangeset for help on using the changeset viewer.