Changeset e6c1491 in sasmodels


Ignore:
Timestamp:
Mar 21, 2016 4:45:31 PM (9 years ago)
Author:
wojciech
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:
ea1f14d
Parents:
5462ffb (diff), 25b30fd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'polydisp' of https://github.com/SasView/sasmodels into polydisp

Location:
sasmodels
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernelcl.py

    r48fbd50 r25b30fd  
    244244            #print("compiling",name) 
    245245            dtype = np.dtype(dtype) 
    246             program = compile_model(self.get_context(dtype), source, dtype, fast) 
     246            program = compile_model(self.get_context(dtype), str(source), dtype, fast) 
    247247            self.compiled[key] = program 
    248248        return self.compiled[key] 
  • sasmodels/generate.py

    r48fbd50 re8d2276  
    687687    print([p.name for p in model_info['parameters']]) 
    688688    pars = model_info['parameters'][2:]  # skip scale and background 
     689    weights = weights[2:] 
    689690    max_pd = model_info['max_pd'] 
    690691    npars = len(pars) # scale and background already removed 
     
    696697    pd_length = np.array([len(w) for w in weights]) 
    697698    print (pd_length) 
     699    print (weights) 
    698700    pd_offset = np.cumsum(np.hstack((0, pd_length))) 
    699701    pd_isvol = np.array([p.type=='volume' for p in pars]) 
     
    708710        if theta_par >= 0 and pd_length[theta_par] <= 1: 
    709711            theta_par = -1 
    710  
    711     print("p","max_pd","constants_offset",par_offset,max_pd,constants_offset,npars) 
    712     print(idx) 
    713     print(pd_length[idx]) 
    714     print(pd_offset[idx]) 
    715     print(pd_stride) 
    716     print(pd_isvol[idx]) 
    717712 
    718713    details = np.empty(constants_offset + 2, 'int32') 
     
    725720    details[par_offset+1*npars:par_offset+2*npars] = 0  # no coordination for most 
    726721    details[par_offset+2*npars:par_offset+3*npars] = 0  # no fast coord with 0 
    727     coord_offset = par_offset+1*pars 
     722    coord_offset = par_offset+1*npars 
    728723    for k,parameter_num in enumerate(idx): 
    729724        details[coord_offset+parameter_num] = 2**k 
    730     details[constants_offset]   = 1   # fast_coord_count: one fast index 
     725    details[constants_offset] = 1   # fast_coord_count: one fast index 
    731726    details[constants_offset+1] = theta_par 
    732727    print ("details",details) 
  • sasmodels/kernel_iq.c

    r0a7e5eb4 r5462ffb  
    5656  local int offset[NPARS];  // NPARS excludes scale/background 
    5757 
    58 #if 1 // defined(USE_SHORTCUT_OPTIMIZATION) 
     58#if 0 // defined(USE_SHORTCUT_OPTIMIZATION) 
    5959  if (problem->pd_length[0] == 1) { 
    6060    // Shouldn't need to copy!! 
     
    7777#endif 
    7878 
    79  
     79  printf("Entering polydispersity\n"); 
    8080  // Since we are no longer looping over the entire polydispersity hypercube 
    8181  // for each q, we need to track the normalization values for each q in a 
     
    193193    } 
    194194  } 
     195   
    195196  //Makes a normalization avialable for the next round 
    196197  result[nq] = norm; 
Note: See TracChangeset for help on using the changeset viewer.