Changeset 2339249f in sasview for sansmodels/src/sans


Ignore:
Timestamp:
Apr 15, 2010 5:58:14 PM (15 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:
13eb1c4
Parents:
247cb58
Message:

Found and fixed an error on normalizing by the volume

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

Legend:

Unmodified
Added
Removed
  • sansmodels/src/sans/models/c_extensions/hollow_cylinder.c

    rf10063e r2339249f  
    9696        vol=acos(-1.0)*((pars->radius*pars->radius)-(pars->core_radius *pars->core_radius)) 
    9797                        *(pars->length); 
    98         answer *= vol; 
     98        answer /= vol; 
    9999 
    100100        //convert to [cm-1] 
  • sansmodels/src/sans/models/c_models/hollowcylinder.cpp

    rf10063e r2339249f  
    115115        if (vol != 0.0 && norm != 0.0) { 
    116116                //Re-normalize by avg volume 
    117                 sum = sum*(vol/norm);} 
     117                sum = sum/(vol/norm);} 
    118118 
    119119        return sum/norm + background(); 
     
    226226        if (vol != 0.0 && norm_vol != 0.0) { 
    227227                //Re-normalize by avg volume 
    228                 sum = sum*(vol/norm_vol);} 
     228                sum = sum/(vol/norm_vol);} 
    229229        return sum/norm + background(); 
    230230} 
Note: See TracChangeset for help on using the changeset viewer.