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:
7a219e3e
Parents:
f2bbabf
git-author:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/07/16 11:30:07)
git-committer:
Lewis O'Driscoll <lewis.o'driscoll@…> (07/11/16 04:36:55)
Message:

Add transform functionality

File:
1 edited

Legend:

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

    r3b8efec r911dbe4  
    2222IQ_DATA_LABEL = r"$I_{obs}(q)$" 
    2323IQ_EXTRAPOLATED_DATA_LABEL = r"$I_{extrap}(q)$" 
     24 
     25GROUP_ID_TRANSFORM = r"$\Gamma(x)$" 
     26TRANSFORM_LABEL = r"$\Gamma(x)$" 
    2427 
    2528 
     
    129132        new_plot = Data1D(data.x, data.y, dy=data.dy) 
    130133 
     134        group_id = "" 
    131135        if label == IQ_DATA_LABEL or label == IQ_EXTRAPOLATED_DATA_LABEL: 
    132136            new_plot.xaxis("\\rm{Q}", 'A^{-1}') 
    133137            new_plot.yaxis("\\rm{Intensity} ", "cm^{-1}") 
    134  
     138            group_id = GROUP_ID_IQ_DATA 
     139        elif label == TRANSFORM_LABEL: 
     140            new_plot.xaxis("{x}", 'A') 
     141            new_plot.yaxis("{\\Gamma}", '') 
     142            group_id = GROUP_ID_TRANSFORM 
    135143        new_plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM 
    136144        new_plot.id = label 
    137145        new_plot.name = label 
     146        new_plot.group_id = group_id 
    138147        new_plot.interactive = True 
    139         new_plot.group_id = GROUP_ID_IQ_DATA 
    140         new_plot.title = "I(q)" 
     148        new_plot.title = group_id.replace('$', '').replace('\\', '') 
    141149        # Show data on a linear scale 
    142150        new_plot.xtransform = 'x' 
    143151        new_plot.ytransform = 'y' 
    144152        wx.PostEvent(self.parent, 
    145                      NewPlotEvent(plot=new_plot, title="I(q)", reset=reset)) 
     153                     NewPlotEvent(plot=new_plot, title=new_plot.title, 
     154                        reset=reset)) 
Note: See TracChangeset for help on using the changeset viewer.