Changeset 1edf610 in sasmodels


Ignore:
Timestamp:
Mar 21, 2016 12:54:55 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:
a4e2ae5, afda63c
Parents:
839283a
Message:

debug checkin

Location:
sasmodels
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    r303d8d6 r1edf610  
    452452    """ 
    453453    # initialize the code so time is more accurate 
    454     value = calculator(**suppress_pd(pars)) 
     454    #value = calculator(**suppress_pd(pars)) 
    455455    toc = tic() 
    456456    for _ in range(max(Nevals, 1)):  # make sure there is at least one eval 
  • sasmodels/core.py

    r0880966 r1edf610  
    225225        weights = [1.0]*len(values) 
    226226    else: 
    227         wv_pairs = [get_weights(p, pars) for p in kernel.info['parameters']] 
    228         weights, values = [v for v in zip(*wv_pairs)] 
     227        vw_pairs = [get_weights(p, pars) for p in kernel.info['parameters']] 
     228        values, weights = zip(*vw_pairs) 
    229229 
    230230    #TODO: This is what we thought to do if max([len(w) for w in weights]) > 1: 
    231     if max([w for w in weights]) > 1: 
     231    print("from") 
     232    import pprint; pprint.pprint(weights) 
     233    print("to") 
     234    if max([len(w) for w in weights]) > 1: 
    232235        details = generate.poly_details(kernel.info, weights) 
    233236    else: 
  • sasmodels/generate.py

    r839283a r1edf610  
    684684 
    685685def poly_details(model_info, weights): 
     686    print("entering poly",weights) 
    686687    pars = model_info['parameters'][2:]  # skip scale and background 
    687688    max_pd = model_info['max_pd'] 
    688689    npars = len(pars) # scale and background already removed 
    689     p = 5*max_pd 
    690     constants_offset = p + 3*npars 
     690    par_offset = 5*max_pd 
     691    constants_offset = par_offset + 3*npars 
    691692 
    692693    # Decreasing list of polydispersity lengths 
     
    707708            theta_par = -1 
    708709 
     710    print("p","max_pd","constants_offset",par_offset,max_pd,constants_offset,npars) 
     711    print(idx) 
     712    print(pd_length[idx]) 
     713    print(pd_offset[idx]) 
     714    print(pd_stride) 
     715    print(pd_isvol[idx]) 
     716 
    709717    details = np.empty(constants_offset + 2, 'int32') 
    710718    details[0*max_pd:1*max_pd] = idx             # pd_par 
     
    713721    details[3*max_pd:4*max_pd] = pd_stride 
    714722    details[4*max_pd:5*max_pd] = pd_isvol[idx] 
    715     details[p+0*npars:p+1*npars] = par_offsets 
    716     details[p+1*npars:p+2*npars] = 0  # no coordination for most 
    717     details[p+2*npars:p+3*npars] = 0  # no fast coord with 0 
    718     coord_offset = p+1*pars 
     723    details[par_offset+0*npars:par_offset+1*npars] = par_offsets 
     724    details[par_offset+1*npars:par_offset+2*npars] = 0  # no coordination for most 
     725    details[par_offset+2*npars:par_offset+3*npars] = 0  # no fast coord with 0 
     726    coord_offset = par_offset+1*pars 
    719727    for k,parameter_num in enumerate(idx): 
    720728        details[coord_offset+parameter_num] = 2**k 
    721729    details[constants_offset]   = 1   # fast_coord_count: one fast index 
    722730    details[constants_offset+1] = theta_par 
     731    print ("details",details) 
    723732    return details 
    724733 
Note: See TracChangeset for help on using the changeset viewer.