Changeset 2b2d431 in sasmodels


Ignore:
Timestamp:
May 22, 2018 6:01:54 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:
bbb887d
Parents:
65fbf7c
Message:

eliminate negative q values from the pinhole resolution distribution

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/resolution.py

    r87964ac r2b2d431  
    8686 
    8787        # Protect against models which are not defined for very low q.  Limit 
    88         # the smallest q value evaluated (in absolute) to 0.02*min 
     88        # the smallest q value evaluated to 0.02*min.  Note that negative q 
     89        # values are trimmed even for broad resolution.  Although not possible 
     90        # from the geometry, they may appear since we are using a truncated 
     91        # gaussian to represent resolution rather than a skew distribution. 
    8992        cutoff = MINIMUM_ABSOLUTE_Q*np.min(self.q) 
    90         self.q_calc = self.q_calc[abs(self.q_calc) >= cutoff] 
     93        self.q_calc = self.q_calc[self.q_calc >= cutoff] 
    9194 
    9295        # Build weight matrix from calculated q values 
     
    9497            self.q_calc, self.q, np.maximum(q_width, MINIMUM_RESOLUTION), 
    9598            nsigma=nsigma) 
    96         self.q_calc = abs(self.q_calc) 
    9799 
    98100    def apply(self, theory): 
Note: See TracChangeset for help on using the changeset viewer.