Ignore:
Timestamp:
May 28, 2010 1:24:47 PM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
25a2ee3
Parents:
2882fb5
Message:

working on documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • calculator/slit_length_calculator.py

    r0bf2c6f r14e9eb3  
    11""" 
    2 This software was developed by the University of Tennessee as part of the 
    3 Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 
    4 project funded by the US National Science Foundation.  
    5  
    6 See the license text in license.txt 
    7  
    8 copyright 2008, 2009, University of Tennessee 
     2This module is a small tool to allow user to quickly 
     3determine the slit length value of data. 
    94""" 
    105from numpy import * 
     
    127class SlitlengthCalculator(object): 
    138    """ 
    14         compute slit length from SAXSess beam profile (1st col. Q , 2nd col. I , and 3rd col. dI.: don't need the 3rd) 
    15         @object: data where are data.y and data.x 
     9    compute slit length from SAXSess beam profile (1st col. Q , 2nd col. I , 
     10    and 3rd col. dI.: don't need the 3rd) 
    1611    """ 
    1712    def __init__(self): 
     
    3126    def set_data(self, x=None, y=None): 
    3227        """ 
    33             set data 
    34             @ Param x, y: x array and y array 
     28        set data 
     29        :param x, y: x array and y array 
    3530        """ 
    3631        self.x = x 
    3732        self.y = y 
    3833         
    39          
    4034    def calculate_slit_length(self): 
    4135        """ 
    42             Calculate slit length using 10 max point 
    43             ToDo: Near future, it should be re-factored in better method. 
     36        Calculate slit length. 
    4437        """ 
    4538        # None data do nothing 
    4639        if self.y == None or self.x == None: 
    4740            return 
    48          
    4941        # set local variable 
    5042        y = self.y 
     
    9688        # set slit_length 
    9789        self.slit_length = slit_length 
    98     
    99     def get_slit_length(self):  
    100         """ 
    101             Calculate and return the slit length 
    102         """ 
    103         self.calculate_slit_length() 
    10490        return self.slit_length 
    105          
     91   
    10692    def get_slit_length_unit(self):  
    10793        """ 
    108             return the slit length unit 
     94        return the slit length unit. 
    10995        """ 
    11096        return self.slit_length_unit 
Note: See TracChangeset for help on using the changeset viewer.