Changeset 9404dd3 in sasmodels for sasmodels/resolution2d.py


Ignore:
Timestamp:
Dec 4, 2015 10:41:47 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
eaca9eb
Parents:
7bb290c
Message:

python 3.x support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/resolution2d.py

    rcd8dde1 r9404dd3  
    179179 
    180180    from sas.dataloader import Data2D 
    181     #for i in range(10): print i, 0.001 + i*0.008/9.0 
    182     #for i in range(100): print i, int(math.floor( (i/ (100/9.0)) )) 
     181    #for i in range(10): print(i, 0.001 + i*0.008/9.0) 
     182    #for i in range(100): print(i, int(math.floor( (i/ (100/9.0)) ))) 
    183183    out = Data2D() 
    184184    out.data = z 
     
    198198    value = smear.get_value() 
    199199    ## All data are ones, so the smeared should also be ones. 
    200     print "Data length =", len(value) 
    201     print " 2D linear function, I = 0 + 1*qy" 
     200    print("Data length =", len(value)) 
     201    print(" 2D linear function, I = 0 + 1*qy") 
    202202    text = " Gaussian weighted averaging on a 2D linear function will " 
    203203    text += "provides the results same as without the averaging." 
    204     print text 
    205     print "qx_data", "qy_data", "I_nonsmear", "I_smeared" 
     204    print(text) 
     205    print("qx_data", "qy_data", "I_nonsmear", "I_smeared") 
    206206    for ind in range(len(value)): 
    207         print x[ind], y[ind], model.evalDistribution([x, y])[ind], value[ind] 
     207        print(x[ind], y[ind], model.evalDistribution([x, y])[ind], value[ind]) 
    208208 
    209209 
     
    218218 
    219219    from DataLoader import Data2D 
    220     #for i in range(10): print i, 0.001 + i*0.008/9.0 
    221     #for i in range(100): print i, int(math.floor( (i/ (100/9.0)) )) 
     220    #for i in range(10): print(i, 0.001 + i*0.008/9.0) 
     221    #for i in range(100): print(i, int(math.floor( (i/ (100/9.0)) ))) 
    222222    out = Data2D() 
    223223    out.data = z 
     
    233233    value = Smearer2D(out,model,index).get_value() 
    234234    ## All data are ones, so the smeared values should also be ones. 
    235     print "Data length =",len(value), ", Data=",value 
    236 """ 
     235    print("Data length =",len(value), ", Data=",value) 
     236""" 
Note: See TracChangeset for help on using the changeset viewer.