Changeset dc72638 in sasview for src


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:
688d029
Parents:
6970e51
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/08/16 05:23:41)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:36:55)
Message:

Plot data with background subtracted

Location:
src/sas/sasgui/perspectives/corfunc
Files:
2 edited

Legend:

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

    r6970e51 rdc72638  
    122122                        info='error')) 
    123123 
    124     def show_data(self, data, label, path=None, reset=False): 
     124    def show_data(self, data, label, reset=False): 
    125125        """ 
    126126        Show data read from a file 
    127127 
    128         :param path: The path to the file 
    129128        :param data: The data to plot (Data1D) 
    130129        :param label: What to label the plot. Also used as the plot ID 
    131130        :param reset: If True, all other plottables will be cleared 
    132131        """ 
    133         new_plot = Data1D(data.x, data.y, dy=data.dy) 
    134  
     132        new_plot = Data1D(data.x, copy.deepcopy(data.y), dy=data.dy) 
    135133        group_id = "" 
    136134        if label == IQ_DATA_LABEL or label == IQ_EXTRAPOLATED_DATA_LABEL: 
    137135            new_plot.xaxis("\\rm{Q}", 'A^{-1}') 
    138136            new_plot.yaxis("\\rm{Intensity} ", "cm^{-1}") 
     137            new_plot.y -= self.corfunc_panel.background 
    139138            group_id = GROUP_ID_IQ_DATA 
    140139        elif label == TRANSFORM_LABEL: 
  • src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

    r6970e51 rdc72638  
    209209        self.background = bg 
    210210        self._background_input.SetValue(str(bg)) 
     211        self._calculator.background = bg 
    211212 
    212213    def _compute_background(self, event=None): 
Note: See TracChangeset for help on using the changeset viewer.