Changeset d49c956 in sasview


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

Files:
2 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: 
  • sansmodels/src/c_models/cylinder.cpp

    re08bd5b rd49c956  
    137137 
    138138    // q vector 
    139     q_z = 0; 
     139    q_z = 0.0; 
    140140 
    141141    // Compute the angle btw vector q and the 
     
    145145    // The following test should always pass 
    146146    if (fabs(cos_val)>1.0) { 
    147       printf("cyl_ana_2D: Unexpected error: cos(alpha)>1\n"); 
    148       return 0; 
     147      printf("cyl_ana_2D: Unexpected error: |cos(alpha)=%g|>1\n", cos_val); 
     148      printf("cyl_ana_2D: at theta=%g and phi=%g.", theta, phi); 
     149      return 1.0; 
    149150    } 
    150151 
Note: See TracChangeset for help on using the changeset viewer.