Opened 14 years ago
Closed 14 years ago
#148 closed bug (fixed)
USANS fitting crashes if the whole data set is chosen with cursors
Reported by: | srkline | Owned by: | ajj |
---|---|---|---|
Priority: | major | Milestone: | Analysis 4.0 Release |
Component: | Analysis | Keywords: | |
Cc: | Blocking: | ||
Task: |
Description
found by Andrew - check the logic as it decides what resolution matrix is there (P1,P2) and whether is needs to recalculate. With only a quick glance, it looks like either the logic is wrong (need a special case for the full data set) or we need to make a "copy" of the full resolution matrix as the data is loaded, so that the "trimmed" matrix exists.
Change History (1)
comment:1 Changed 14 years ago by srkline
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.
I think I've got it now... Here's the explanation from the comments in USANS_Slit_Smearing. The rest of the logic of determining whether or not to recalculate is in the FitWrapper?, as it's setting up the structure.
July 2008 SRK
For fitting withe cursors, the matrix must be recalculated for the exact range of the data
- but the inital dependency of the model (any number of them) was (were) set up to use the full matrix
-- so:
$_res is the resolution for the dependencies. It is always the full size of the data set. If cursors are used,
it is padded with zeroes at the edges to fill.
weights_save: is a pristine copy of the resolution matrix for the full data set, as when loaded
$_qt, $_qi, $_qs, $_rest: are "trimmed" sets that use the range specified by the cursors. They are created
at load time and are initially the full data range.
there is a wave note attached to $_res that has the current point range for the matrix. This is what the
$_rest matrix is expected to be too, so keep these two matrices in sync.
during fitting, $_rest is used in the structure if cursors are used, since the matrix must be the same dimension (N)
as the (trimmed) data range. It may be the full data range if the cursors are at the ends of the data set.
If no cursors are used, then the $_res wave is used in the structure