Changeset d3966c2 in sasview


Ignore:
Timestamp:
Mar 23, 2009 4:28:28 PM (16 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:
6859338
Parents:
3f43b18
Message:

made it more flexible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DataLoader/readers/cansas_reader.py

    r72b524b rd3966c2  
    153153                        exec "storage.%s = %g" % (variable, conv(value, units=local_unit)) 
    154154                    except: 
    155                         raise ValueError, "CanSAS reader: could not convert %s unit [%s]; expecting [%s]\n  %s" \ 
    156                         % (variable, attr['unit'], local_unit, sys.exc_value) 
     155                        #Below three lines were added for the unit = 1/A. local unit is defined in 'mm'. Need to check!!! 
     156                        if variable == 'slit_length' and attr['unit'] !=local_unit: 
     157                            pass 
     158                        else: 
     159                            raise ValueError, "CanSAS reader: could not convert %s unit [%s]; expecting [%s]\n  %s" \ 
     160                            % (variable, attr['unit'], local_unit, sys.exc_value) 
    157161                else: 
    158162                    raise ValueError, "CanSAS reader: unrecognized %s unit [%s]; expecting [%s]" \ 
Note: See TracChangeset for help on using the changeset viewer.