Ignore:
Timestamp:
Aug 28, 2007 4:30:34 PM (15 years ago)
Author:
srkline
Message:

(1) - cursors can now be used to select a subrange of USANS data to fit. This is done by th fit wrapper, assigning a subrange of resW to the struct

(2) all of the smeared model functions are now in the latest form of Smear_Model_N() that is NOT a pointwise calculation anymore, since the USANS matrix smearing in inherently not so.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Analysis/branches/ajj_23APR07/IGOR_Package_Files/Put in User Procedures/SANS_Models_v3.00/Packages/Wrapper.ipf

    r147 r151  
    311311        endif 
    312312 
    313 //      if(useCursors) 
    314 //              Print "pcsr(A) = ",pcsr(A) 
    315 //              Print "pcsr(B) = ",pcsr(B) 
    316 //      endif 
     313        //if useCursors, and the data is USANS, need to feed a trimmed matrix to the fit 
     314        if(useCursors && (dimsize(resW,1) > 4) ) 
     315                Variable pt1,pt2,newN 
     316                if(pcsr(A) > pcsr(B)) 
     317                        pt1 = pcsr(B) 
     318                        pt2 = pcsr(A) 
     319                else 
     320                        pt1 = pcsr(A) 
     321                        pt2 = pcsr(B) 
     322                endif 
     323                newN = pt2 - pt1 + 1            // +1 includes both cursors in the fit 
     324                Make/O/D/N=(newN,newN) $(DF+"crsrResW") 
     325                WAVE crsrResW = $(DF+"crsrResW") 
     326                crsrResW = resW[p+pt1][q+pt1] 
     327                //assign to the struct 
     328                WAVE fs.resW =  crsrResW                 
     329        endif 
    317330//// 
    318331 
Note: See TracChangeset for help on using the changeset viewer.