Changeset 71e5c11 in sasview for fittingview/src/sans


Ignore:
Timestamp:
Oct 14, 2011 10:20:26 AM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
62ffd8d
Parents:
ab8b880
Message:

theory title depending on data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/fitting.py

    re288ad0 r71e5c11  
    14821482            #the same id 
    14831483            theory_data = self.page_finder[page_id].get_theory_data(fid=data.id) 
    1484             new_plot.name = model.name + " ["+ str(data.name)+"]" 
     1484             
     1485            if data.is_data: 
     1486                data_name = str(data.name) 
     1487            else: 
     1488                data_name = str(model.__class__.__name__) 
     1489             
     1490            new_plot.name = model.name + " ["+ data_name +"]" 
    14851491            new_plot.xaxis(_xaxis, _xunit) 
    14861492            new_plot.yaxis(_yaxis, _yunit) 
     
    15631569        new_plot.xmax = data.xmax 
    15641570        title = data.title 
     1571         
     1572        new_plot.is_data = False 
     1573        if data.is_data: 
     1574            data_name = str(data.name) 
     1575        else: 
     1576            data_name = str(model.__class__.__name__) 
     1577 
    15651578        if len(title) > 1: 
    1566             new_plot.title = "Model2D for " + data.name 
    1567         new_plot.is_data = False 
     1579            new_plot.title = "Model2D for " + data_name 
    15681580        new_plot.name = model.name + " [" + \ 
    1569                                     str(data.name) + "-2D]" 
     1581                                    data_name + "-2D]" 
    15701582        theory_data = deepcopy(new_plot) 
    15711583        theory_data.name = "Unknown" 
Note: See TracChangeset for help on using the changeset viewer.