Changeset 18501795 in sasview for src/sas/sascalc/dataloader


Ignore:
Timestamp:
Jan 30, 2017 10:43:36 AM (8 years ago)
Author:
krzywon
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:
2a2b43a
Parents:
20522e1
Message:

Set the x_unit and y_unit in Data1D to class variables instead of instance variables to fix failing unit tests.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/data_info.py

    r20522e1 r18501795  
    705705        try: 
    706706            if self.isSesans: # the data is SESANS 
    707                 x_unit = 'A' 
    708                 y_unit = 'pol' 
     707                self.x_unit = 'A' 
     708                self.y_unit = 'pol' 
    709709            elif not self.isSesans: # the data is SANS 
    710                 x_unit = '1/A' 
    711                 y_unit = '1/cm' 
     710                self.x_unit = '1/A' 
     711                self.y_unit = '1/cm' 
    712712        except: # the data is not recognized/supported, and the user is notified 
    713713            raise(TypeError, 'data not recognized, check documentation for supported 1D data formats') 
Note: See TracChangeset for help on using the changeset viewer.