Changeset 7ad12e9f in sasview for src/sas/sascalc/fit


Ignore:
Timestamp:
Mar 26, 2019 3:24:25 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
ticket-1094-headless
Children:
3f89c0e
Parents:
9cc1f49
Message:

fix handling of user-defined data uncertainty in headless fits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/fit/fitstate.py

    r9cc1f49 r7ad12e9f  
    319319    weight = get_data_weight(state) 
    320320 
     321    # Note: wx GUI makes a copy of the data and assigns weight to 
     322    # data.err_data/data.dy instead of using the err_data/dy keywords 
     323    # when creating the Fit object. 
     324 
    321325    # Make fit data object and set the data weights 
    322326    # TODO: check 2D masked data 
    323327    if state.enable2D: 
    324328        fitdata = FitData2D(sas_data2d=data, data=data.data, 
    325                             err_data=data.err_data) 
    326         fitdata.err_data = weight 
     329                            err_data=weight) 
    327330    else: 
    328331        data.mask = (np.isnan(data.y) if data.y is not None 
    329332                        else np.zeros_like(data.x, dtype='bool')) 
    330333        fitdata = FitData1D(x=data.x, y=data.y, 
    331                             dx=data.dx, dy=data.dy, smearer=smearer) 
    332         fitdata.dy = weight 
     334                            dx=data.dx, dy=weight, smearer=smearer) 
    333335        fitdata.set_fit_range(qmin=state.qmin, qmax=state.qmax) 
    334336    fitdata.sas_data = data 
Note: See TracChangeset for help on using the changeset viewer.