Opened 8 years ago
Closed 8 years ago
#816 closed defect (fixed)
Gracefully fail when given NaN values in sasview_model
Reported by: | pkienzle | Owned by: | pkienzle |
---|---|---|---|
Priority: | blocker | Milestone: | SasView 4.1.0 |
Component: | sasmodels | Keywords: | |
Cc: | Work Package: | SasView Bug Fixing |
Description
Model evaluation fails when there are NaN values in the model for possibly polydisperse parameters.
Inside weights.py, if center is NaN, then lb <= center <= ub fails and an empty distribution is returned.
Don't just test for NaN in the caller since the error will appear any time center+linspace(-nsig,nsig,npts) does not have any values within the bounds, which could happen if an non-bounds constrained optimizer is used.
Change History (4)
comment:1 Changed 8 years ago by pkienzle
- Component changed from SasView to sasmodels
comment:2 Changed 8 years ago by pkienzle
- Owner set to pkienzle
- Status changed from new to assigned
comment:3 Changed 8 years ago by pkienzle
comment:4 Changed 8 years ago by pkienzle
- Resolution set to fixed
- Status changed from assigned to closed
Note: See
TracTickets for help on using
tickets.
Model evaluation has been fixed, and errors are propagated back to sasview. Since the errors should never happen, don't worry too much for now about how they are reported.
A related issue is how to create a truncated distribution if the physical process has limits on the range of sizes that can be produced. This is best handled by a user-defined distribution, as specified in ticket #608.