Ignore:
Timestamp:
Jul 11, 2016 4:36:55 AM (8 years ago)
Author:
lewis
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:
77e9ac6
Parents:
b564ea2
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/07/16 07:29:10)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:36:55)
Message:

Add extrapolation functionality

File:
1 edited

Legend:

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

    r9c90cf3 r3b8efec  
    55import sys 
    66import logging 
     7import copy 
    78from sas.sasgui.guiframe.plugin_base import PluginBase 
    89from sas.sasgui.guiframe.gui_manager import MDIFrame 
     
    1819 
    1920 
    20 GROUP_ID_IQ_DATA = r"$I_{obs}(q)$" 
     21GROUP_ID_IQ_DATA = r"$I(q)$" 
    2122IQ_DATA_LABEL = r"$I_{obs}(q)$" 
     23IQ_EXTRAPOLATED_DATA_LABEL = r"$I_{extrap}(q)$" 
    2224 
    2325 
     
    117119                        info='error')) 
    118120 
    119     def show_data(self, path=None, data=None, reset=False): 
     121    def show_data(self, data, label, path=None, reset=False): 
    120122        """ 
    121123        Show data read from a file 
     
    125127        :param reset: If True, all other plottables will be cleared 
    126128        """ 
    127         if data.dy is not None: 
    128             new_plot = Data1D(data.x, data.y, dy=data.dy) 
    129         else: 
    130             new_plot = Data1D(data.x, data.y) 
     129        new_plot = Data1D(data.x, data.y, dy=data.dy) 
     130 
     131        if label == IQ_DATA_LABEL or label == IQ_EXTRAPOLATED_DATA_LABEL: 
     132            new_plot.xaxis("\\rm{Q}", 'A^{-1}') 
     133            new_plot.yaxis("\\rm{Intensity} ", "cm^{-1}") 
     134 
    131135        new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM 
    132         new_plot.name = IQ_DATA_LABEL 
    133         new_plot.xaxis("\\rm{Q}", 'A^{-1}') 
    134         new_plot.yaxis("\\rm{Intensity} ", "cm^{-1}") 
     136        new_plot.id = label 
     137        new_plot.name = label 
    135138        new_plot.interactive = True 
    136139        new_plot.group_id = GROUP_ID_IQ_DATA 
    137         new_plot.id = self.data_id 
    138140        new_plot.title = "I(q)" 
    139141        # Show data on a linear scale 
Note: See TracChangeset for help on using the changeset viewer.