Changeset d49c956 in sasview for fittingview/src/sans


Ignore:
Timestamp:
Jun 18, 2012 5:08:40 PM (12 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:
20efe7b
Parents:
b0eeabf1
Message:

fixed polydisp. array bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/basepage.py

    r480fe4f rd49c956  
    824824            if path == None: 
    825825                wx.PostEvent(self.parent.parent, 
    826         StatusEvent(status=" Selected Distribution was not loaded: %s" % path)) 
     826                            StatusEvent(status= \ 
     827                            " Selected Distribution was not loaded: %s" % path)) 
    827828                return None, None 
    828829            input_f = open(path, 'r') 
    829830            buff = input_f.read() 
    830831            lines = buff.split('\n') 
    831              
     832            input_f.close() 
    832833            angles = [] 
    833834            weights = [] 
     
    837838                    angle = float(toks[0]) 
    838839                    weight = float(toks[1]) 
     840                    angles.append(angle) 
     841                    weights.append(weight) 
    839842                except: 
    840843                    # Skip non-data lines 
    841844                    pass 
    842                 angles.append(angle) 
    843                 weights.append(weight) 
    844845            return numpy.array(angles), numpy.array(weights) 
    845846        except: 
Note: See TracChangeset for help on using the changeset viewer.