Changeset cd54205 in sasview


Ignore:
Timestamp:
May 11, 2016 11:38:48 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
e04f87b, 26d6e045
Parents:
a9946e9
Message:

don't fail even when transformed data is empty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/plottools/plottables.py

    rd7bb526 rcd54205  
    704704            else: 
    705705                self.dy = None 
    706             tempx = [] 
    707             tempy = [] 
    708706            if not has_err_x: 
    709707                dx = numpy.zeros(len(x)) 
     
    724722                    if has_err_y: 
    725723                        self.dy.append(tempdy) 
    726                 except: 
    727                     tempx = x[i] 
    728                     tempy = y[i] 
    729                     tempdy = dy[i] 
     724                except Exception: 
     725                    pass 
    730726            # Sanity check 
    731727            if not len(self.x) == len(self.y): 
     
    733729                msg += "and y are not of the same length" 
    734730                raise ValueError, msg 
    735             if has_err_x and not (len(self.x) and len(self.dx)): 
     731            if has_err_x and not (len(self.x) == len(self.dx)): 
    736732                msg = "Plottable.View: transformed x and dx" 
    737733                msg += " are not of the same length" 
    738734                raise ValueError, msg 
    739             if has_err_y and not (len(self.y) and len(self.dy)): 
     735            if has_err_y and not (len(self.y) == len(self.dy)): 
    740736                msg = "Plottable.View: transformed y" 
    741737                msg += " and dy are not of the same length" 
Note: See TracChangeset for help on using the changeset viewer.