Changeset a8a7f08 in sasmodels


Ignore:
Timestamp:
Apr 7, 2016 2:25:44 PM (9 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:
3707eee
Parents:
3543141
Message:

fix python model polydispersity

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernelpy.py

    r6e7ff6d ra8a7f08  
    104104        # will use views into this vector, relying on the fact that a 
    105105        # an array of no dimensions acts like a scalar. 
    106         parameter_vector = np.empty(len(partable.call_parameters), 'd') 
     106        parameter_vector = np.empty(len(partable.call_parameters)-2, 'd') 
    107107 
    108108        # Create views into the array to hold the arguments 
    109         offset = 2 
     109        offset = 0 
    110110        kernel_args, volume_args = [], [] 
    111111        for p in partable.kernel_parameters: 
     
    120120                kernel_args.append(v) 
    121121            if p in volume_parameters: 
    122                 volume_args.append(p) 
     122                volume_args.append(v) 
    123123 
    124124        # Hold on to the parameter vector so we can use it to call kernel later. 
     
    172172    #                                                              # 
    173173    ################################################################ 
    174     parameters[2:] = values[details.par_offset] 
     174    parameters[:] = values[details.par_offset] 
    175175    scale, background = values[0], values[1] 
    176176    if details.num_active == 0: 
     
    215215        for k in range(details.num_coord): 
    216216            if details.pd_coord[k]&1: 
    217                 par = details.par_coord[k] 
     217                #par = details.par_coord[k] 
    218218                parameters[par] = values[offset[par]] 
     219                #print "par",par,offset[par],parameters[par+2] 
    219220                offset[par] += 1 
    220221                if par == theta: 
Note: See TracChangeset for help on using the changeset viewer.