Changeset 3b8efec in sasview for src/sas/sasgui/perspectives/corfunc/corfunc.py
- Timestamp:
- Jul 11, 2016 4:36:55 AM (8 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/corfunc/corfunc.py
r9c90cf3 r3b8efec 5 5 import sys 6 6 import logging 7 import copy 7 8 from sas.sasgui.guiframe.plugin_base import PluginBase 8 9 from sas.sasgui.guiframe.gui_manager import MDIFrame … … 18 19 19 20 20 GROUP_ID_IQ_DATA = r"$I _{obs}(q)$"21 GROUP_ID_IQ_DATA = r"$I(q)$" 21 22 IQ_DATA_LABEL = r"$I_{obs}(q)$" 23 IQ_EXTRAPOLATED_DATA_LABEL = r"$I_{extrap}(q)$" 22 24 23 25 … … 117 119 info='error')) 118 120 119 def show_data(self, path=None, data=None, reset=False):121 def show_data(self, data, label, path=None, reset=False): 120 122 """ 121 123 Show data read from a file … … 125 127 :param reset: If True, all other plottables will be cleared 126 128 """ 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 131 135 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 135 138 new_plot.interactive = True 136 139 new_plot.group_id = GROUP_ID_IQ_DATA 137 new_plot.id = self.data_id138 140 new_plot.title = "I(q)" 139 141 # Show data on a linear scale
Note: See TracChangeset
for help on using the changeset viewer.