Changeset 2a7e20e in sasmodels for sasmodels/kernel_iq.c


Ignore:
Timestamp:
Jan 11, 2018 11:02:39 AM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
e077231
Parents:
2ab331f
Message:

update developer docs with current interpretation of orientation; describe the scripts in the explore directory

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/kernel_iq.c

    r108e70e r2a7e20e  
    479479#endif 
    480480 
    481 // Doing jitter projection code outside the previous if block so that we don't 
    482 // need to repeat the identical logic in the IQ_AC and IQ_ABC branches.  This 
    483 // will become more important if we implement more projections, or more 
    484 // complicated projections. 
    485 #if defined(CALL_IQ) || defined(CALL_IQ_A) 
     481// Define APPLY_PROJECTION depending on model symmetries. We do this outside 
     482// the previous if block so that we don't need to repeat the identical 
     483// logic in the IQ_AC and IQ_ABC branches.  This will become more important 
     484// if we implement more projections, or more complicated projections. 
     485#if defined(CALL_IQ) || defined(CALL_IQ_A)  // no orientation 
    486486  #define APPLY_PROJECTION() const double weight=weight0 
    487 #elif defined(CALL_IQ_XY) 
     487#elif defined(CALL_IQ_XY) // pass orientation to the model 
    488488  // CRUFT: support oriented model which define Iqxy rather than Iqac or Iqabc 
    489489  // Need to plug the values for the orientation angles back into parameter 
     
    515515    #define APPLY_PROJECTION() const double weight=weight0 
    516516  #endif 
    517 #else // !spherosymmetric projection 
     517#else // apply jitter and view before calling the model 
    518518  // Grab the "view" angles (theta, phi, psi) from the initial parameter table. 
    519519  const double theta = values[details->theta_par+2]; 
     
    526526  // we go through the mesh. 
    527527  double dtheta, dphi, weight; 
    528   #if PROJECTION == 1 
     528  #if PROJECTION == 1 // equirectangular 
    529529    #define APPLY_PROJECTION() do { \ 
    530530      dtheta = local_values.table.theta; \ 
     
    532532      weight = fabs(cos(dtheta*M_PI_180)) * weight0; \ 
    533533    } while (0) 
    534   #elif PROJECTION == 2 
     534  #elif PROJECTION == 2 // sinusoidal 
    535535    #define APPLY_PROJECTION() do { \ 
    536536      dtheta = local_values.table.theta; \ 
     
    542542    } while (0) 
    543543  #endif 
    544 #endif // !spherosymmetric projection 
     544#endif // done defining APPLY_PROJECTION 
    545545 
    546546// ** define looping macros ** 
Note: See TracChangeset for help on using the changeset viewer.