Changeset c36c09f in sasview


Ignore:
Timestamp:
Feb 14, 2018 1:23:29 PM (6 years ago)
Author:
krzywon
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
3ee0451
Parents:
61bfd36
Message:

Show a dialog warning the user the data set may not load properly. All logic is stored within sascalc.dataloader.

File:
1 edited

Legend:

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

    ra58b5a0 rc36c09f  
    3131FIELDS_2D = ('data', 'qx_data', 'qy_data', 'q_data', 'err_data', 
    3232                 'dqx_data', 'dqy_data', 'mask') 
     33DEPRECATION_MESSAGE = ("\rThe extension of this file suggests the data set migh" 
     34                       "t not be fully reduced. Support for the reader associat" 
     35                       "ed with this file type has been removed. An attempt to " 
     36                       "load the file was made, but SasView cannot guarantee th" 
     37                       "e accuracy of the data.") 
    3338 
    3439 
     
    4045    # List of allowed extensions 
    4146    ext = ['.txt'] 
     47    # Deprecated extensions 
     48    deprecated_extensions = ['.asc', '.nxs'] 
    4249    # Bypass extension check and try to load anyway 
    4350    allow_all = False 
     
    8895                        self.f_open.close() 
    8996                    if len(self.output) > 0: 
     97                        if any(filepath.lower().endswith(ext) for ext in 
     98                               self.deprecated_extensions): 
     99                            self.handle_error_message(DEPRECATION_MESSAGE) 
    90100                        # Sort the data that's been loaded 
    91101                        self.sort_one_d_data() 
Note: See TracChangeset for help on using the changeset viewer.