Changeset fa3f081 in sasview


Ignore:
Timestamp:
Jul 31, 2012 12:30:19 PM (12 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:
8037f4b
Parents:
69ebe91
Message:

better handling at singularities when background >0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansmodels/src/c_models/masssurfacefractal.cpp

    re08bd5b rfa3f081  
    4949  // Not valid values => reject as 0.0 
    5050  if (mass_dim < 1e-16){ 
    51           return 0.0; 
     51          return background; 
    5252  } 
    5353  if (mass_dim > 6.0){ 
    54           return 0.0; 
     54          return background; 
    5555  } 
    5656  if (surface_dim < 1e-16){ 
    57           return 0.0; 
     57          return background; 
    5858  } 
    5959  if (surface_dim > 6.0){ 
    60           return 0.0; 
     60          return background; 
    6161  } 
    6262  tot_dim = 6.0 - surface_dim - mass_dim; 
    6363  //singulars 
    6464  if (tot_dim < 0.0){ 
    65           return 0.0; 
     65          return background; 
    6666  } 
    6767 
     
    8282 
    8383  //another singular 
    84   if (inv_form == 0.0) return 0.0; 
     84  if (inv_form == 0.0) return background; 
    8585 
    8686  form_factor = 1.0; 
Note: See TracChangeset for help on using the changeset viewer.