Changeset afeb37a in sasview


Ignore:
Timestamp:
Sep 30, 2010 5:38:59 PM (14 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:
d267aed
Parents:
318e489
Message:

cleaned up some docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • calculator/slit_length_calculator.py

    r318e489 rafeb37a  
    7171        # find indices where it crosses y = y_half. 
    7272        while (True): 
    73             ind += 1                # no need to check when ind == 0 
    74             y_half_d = y[ind]       # y value and ind just after passed the spot of the half height  
    75             if y[ind] < y_half: break 
    76     
    77         y_half_u = y[ind-1]         # y value and ind just before passed the spot of the half height 
     73            # no need to check when ind == 0 
     74            ind += 1      
     75            # y value and ind just after passed the spot of the half height             
     76            y_half_d = y[ind]        
     77            if y[ind] < y_half:  
     78                break 
     79         
     80        # y value and ind just before passed the spot of the half height 
     81        y_half_u = y[ind-1]         
    7882         
    7983        # get corresponding x values 
     
    8589            x_half = (x_half_d + x_half_u)/2.0 
    8690        else: 
    87             x_half = (x_half_u * (y_half - y_half_d) + x_half_d*(y_half_u-y_half))/(y_half_u - y_half_d) 
     91            x_half = (x_half_u * (y_half - y_half_d) + x_half_d*(y_half_u-y_half))\ 
     92                        /(y_half_u - y_half_d) 
    8893         
    8994        # multiply by 2 due to the beam profile is for half beam 
Note: See TracChangeset for help on using the changeset viewer.