Changeset e090ba90 in sasview for src/sas/sascalc/calculator


Ignore:
Timestamp:
Oct 11, 2018 11:59:57 AM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1249
Children:
88d2e70
Parents:
67ed543
Message:

remove errors and warnings from py37 tests of sascalc

Location:
src/sas/sascalc/calculator
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/calculator/instrument.py

    rf4775563 re090ba90  
    128128            self.size = 0 
    129129        else: 
    130             self.size = size 
     130            # TODO: Make sure detector size is number of pixels 
     131            # Could be detector dimensions in e.g., mm, but 
     132            # the resolution calculator assumes it is pixels. 
     133            # Being pixels, it has to be integers rather than float 
     134            self.size = [int(s) for s in size] 
    131135            validate(size[0]) 
    132136 
  • src/sas/sascalc/calculator/resolution_calculator.py

    r574adc7 re090ba90  
    10071007        try: 
    10081008            detector_offset = self.sample2detector_distance[1] 
    1009         except: 
    1010             logger.error(sys.exc_value) 
     1009        except Exception as exc: 
     1010            logger.error(exc) 
    10111011 
    10121012        # detector size in [no of pix_x,no of pix_y] 
     
    10941094            output.qx_data = qx_value 
    10951095            output.qy_data = qy_value 
    1096         except: 
    1097             logger.error(sys.exc_value) 
     1096        except Exception as exc: 
     1097            logger.error(exc) 
    10981098 
    10991099        return output 
Note: See TracChangeset for help on using the changeset viewer.