Changeset 80d2872 in sasview for prview/perspectives/pr/pr.py


Ignore:
Timestamp:
Sep 11, 2009 7:05:01 PM (15 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
d9af1780
Parents:
72a05d0
Message:

prview: ensure that data selected for inversion are of the right class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • prview/perspectives/pr/pr.py

    rd7412e0 r80d2872  
    2323from sans.pr.invertor import Invertor 
    2424from DataLoader.loader import Loader 
     25import DataLoader 
    2526from sans.guiframe.data_loader import load_error  
    2627 
     
    594595                    #TODO: we might want to check that the units are consistent with I(q) 
    595596                    #      before allowing this menu item 
    596                 return [["Compute P(r)", "Compute P(r) from distribution", self._on_context_inversion]]       
     597                if issubclass(item.__class__, DataLoader.data_info.Data1D): 
     598                    return [["Compute P(r)", "Compute P(r) from distribution", self._on_context_inversion]]       
    597599                 
    598600        return [] 
Note: See TracChangeset for help on using the changeset viewer.