Changeset 07eb396 in sasview for sansinvariant/src/sans
- Timestamp:
- Jul 19, 2012 11:07:32 AM (12 years ago)
- 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:
- 3df5ecf
- Parents:
- 80ff71e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansinvariant/src/sans/invariant/invariant.py
r3fc01c5 r07eb396 132 132 """ 133 133 self.scale = math.exp(constant) 134 if slope > 0: 135 slope = 0.0 134 136 self.radius = math.sqrt(-3 * slope) 135 136 137 # Errors 137 138 self.dscale = math.exp(constant)*dconstant 138 self.dradius = -3.0/2.0/math.sqrt(-3 * slope)*dslope 139 if slope == 0.0: 140 n_zero = -1.0e-24 141 self.dradius = -3.0/2.0/math.sqrt(-3 * n_zero)*dslope 142 else: 143 self.dradius = -3.0/2.0/math.sqrt(-3 * slope)*dslope 139 144 140 145 return [self.radius, self.scale], [self.dradius, self.dscale]
Note: See TracChangeset
for help on using the changeset viewer.