Changeset 6a0c75d1 in sasview for src/sas/sasgui/perspectives


Ignore:
Timestamp:
Oct 5, 2016 1:15:31 PM (8 years ago)
Author:
Mathieu Doucet <doucetm@…>
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
edbe974
Parents:
804fefa
Message:

Make sure dy is always filled (re #687)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/fitting.py

    r804fefa r6a0c75d1  
    16801680        """ 
    16811681        new_plot = Data1D(x=x, y=y) 
    1682         new_plot.is_data = dy is not None 
     1682        if dy is None: 
     1683            new_plot.is_data = False 
     1684            new_plot.dy = numpy.zeros(len(y)) 
     1685            # If this is a theory curve, pick the proper symbol to make it a curve 
     1686            new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM 
     1687        else: 
     1688            new_plot.is_data = True 
     1689            new_plot.dy = dy 
    16831690        new_plot.interactive = True 
    1684         new_plot.dy = dy 
    16851691        new_plot.dx = None 
    16861692        new_plot.dxl = None 
    16871693        new_plot.dxw = None 
    1688         # If this is a theory curve, pick the proper symbol to make it a curve 
    1689         if not new_plot.is_data: 
    1690             new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM 
    16911694        _yaxis, _yunit = data.get_yaxis() 
    16921695        _xaxis, _xunit = data.get_xaxis() 
Note: See TracChangeset for help on using the changeset viewer.