Changeset 37e7223 in sasview


Ignore:
Timestamp:
Jul 11, 2016 5:14:07 AM (6 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:
02a8779
Parents:
0bbebee
Message:

Refactor plot labels into separate file

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

Legend:

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

    r173ee3a r37e7223  
    1717from sas.sascalc.dataloader.loader import Loader 
    1818import sas.sascalc.dataloader 
    19  
    20  
    21 GROUP_ID_IQ_DATA = r"$I(q)$" 
    22 IQ_DATA_LABEL = r"$I_{obs}(q)$" 
    23 IQ_EXTRAPOLATED_DATA_LABEL = r"$I_{extrap}(q)$" 
    24  
    25 GROUP_ID_TRANSFORM = r"$\Gamma(x)$" 
    26 TRANSFORM_LABEL = r"$\Gamma(x)$" 
     19from plot_labels import * 
    2720 
    2821 
  • src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

    r0bbebee r37e7223  
    1313import sas.sasgui.perspectives.corfunc.corfunc 
    1414from sas.sascalc.corfunc.corfunc_calculator import CorfuncCalculator 
     15from plot_labels import * 
    1516 
    1617OUTPUT_STRINGS = { 
     
    152153        self.set_extracted_params(None) 
    153154        if self._manager is not None: 
    154             from sas.sasgui.perspectives.corfunc.corfunc import IQ_DATA_LABEL 
    155155            self._manager.clear_data() 
    156156            self._manager.show_data(self._data, IQ_DATA_LABEL, reset=True) 
     
    196196        plot_y = self._extrapolated_data.y[0:numpts] 
    197197        to_plot = Data1D(plot_x, plot_y) 
    198         from sas.sasgui.perspectives.corfunc.corfunc import\ 
    199             IQ_EXTRAPOLATED_DATA_LABEL 
    200198        self._manager.show_data(to_plot, IQ_EXTRAPOLATED_DATA_LABEL) 
    201199        self._transform_btn.Enable() 
     
    218216            return 
    219217        self._transformed_data = transformed_data 
    220         from sas.sasgui.perspectives.corfunc.corfunc import TRANSFORM_LABEL 
    221218        import numpy as np 
    222219        plot_x = transformed_data.x[np.where(transformed_data.x <= 200)] 
     
    298295        self.background = float(self._background_input.GetValue()) 
    299296        self._calculator.background = self.background 
    300         from sas.sasgui.perspectives.corfunc.corfunc import GROUP_ID_IQ_DATA,\ 
    301             IQ_DATA_LABEL 
    302297        if event is not None: 
    303298            active_ctrl = event.GetEventObject() 
     
    318313        is_click = event.LeftDown() 
    319314        if is_click: 
    320             from sas.sasgui.perspectives.corfunc.corfunc import GROUP_ID_IQ_DATA,\ 
    321                 IQ_DATA_LABEL 
    322315            wx.PostEvent(self._manager.parent, PlotQrangeEvent( 
    323316                ctrl=[self._qmin_input, self._qmax1_input, self._qmax2_input], 
Note: See TracChangeset for help on using the changeset viewer.