Changeset 2b2d431 in sasmodels


Ignore:
Timestamp:
May 22, 2018 8:01:54 AM (5 months ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, F1F2models_grethe, beta_approx, cuda-test, py3, ticket-1074-gammainc, ticket-1084, ticket-1102-pinhole, ticket-1142-plugin-reload, ticket-1155BE_PolyElectrolyte, ticket-1157, ticket-608-user-defined-weights, ticket_1156
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.