Changeset aae7a8d in sasview for sansmodels/src/sans/models/c_models


Ignore:
Timestamp:
Mar 11, 2011 10:55:53 AM (14 years ago)
Author:
Jae Cho <jhjcho@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
b2d9826
Parents:
ae4ade7
Message:

added constraint on leastsq/Scipy

Location:
sansmodels/src/sans/models/c_models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_models/refl.cpp

    r0164899a raae7a8d  
    145145 */ 
    146146double ReflModel :: operator()(double qx, double qy) { 
    147         double q = sqrt(qx*qx + qy*qy); 
     147        // For 2D set qy as q, ignoring qx. 
     148        double q = qy;//sqrt(qx*qx + qy*qy); 
     149        if (q < 0.0){ 
     150                return 0.0; 
     151        } 
    148152        return (*this).operator()(q); 
    149153} 
  • sansmodels/src/sans/models/c_models/refl_adv.cpp

    r96656e3 raae7a8d  
    197197 */ 
    198198double ReflAdvModel :: operator()(double qx, double qy) { 
    199         double q = sqrt(qx*qx + qy*qy); 
     199        // For 2D set qy as q, ignoring qx. 
     200        double q = qy;//sqrt(qx*qx + qy*qy); 
     201        if (q < 0.0){ 
     202                return 0.0; 
     203        } 
    200204        return (*this).operator()(q); 
    201205} 
Note: See TracChangeset for help on using the changeset viewer.