Changeset fd5cfaf in sasview


Ignore:
Timestamp:
Jul 7, 2016 12:05:12 PM (8 years ago)
Author:
lewis
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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
72d2876
Parents:
c3e1dff
Message:

Add some docstrings

Location:
src/sas
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/corfunc/corfunc_calculator.py

    rbd9f10e rfd5cfaf  
    109109 
    110110    def compute_extrapolation(self): 
     111        """ 
     112        Extrapolate and interpolate scattering data 
     113 
     114        :return: The extrapolated data 
     115        """ 
    111116        q = self._data.x 
    112117        iq = self._data.y 
     
    123128        """ 
    124129        Transform an extrapolated scattering curve into a correlation function. 
     130 
     131        :param extrapolation: The extrapolated data 
     132        :param background: The background value (if not provided, previously 
     133            calculated value will be used) 
     134        :return: The transformed data 
    125135        """ 
    126136        qs = extrapolation.x 
     
    154164 
    155165    def _fit_data(self, q, iq): 
    156         """Given a data set, extrapolate out to large q with Porod 
    157         and to q=0 with Guinier""" 
     166        """ 
     167        Given a data set, extrapolate out to large q with Porod and 
     168        to q=0 with Guinier 
     169        """ 
    158170        mask = np.logical_and(q > self.upperq[0], q < self.upperq[1]) 
    159171 
  • src/sas/sasgui/perspectives/corfunc/corfunc.py

    rbd9f10e rfd5cfaf  
    128128        :param path: The path to the file 
    129129        :param data: The data to plot (Data1D) 
     130        :param label: What to label the plot. Also used as the plot ID 
    130131        :param reset: If True, all other plottables will be cleared 
    131132        """ 
  • src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

    rc3e1dff rfd5cfaf  
    134134 
    135135    def compute_extrapolation(self, event=None): 
     136        """ 
     137        Compute and plot the extrapolated data. 
     138        Called when Extrapolate button is pressed. 
     139        """ 
    136140        if self._data is None: 
    137141            msg = "Data must be loaded in order to perform an extrapolation." 
     
    160164 
    161165    def compute_transform(self, event=None): 
     166        """ 
     167        Compute and plot the transformed data. 
     168        Called when Transform button is pressed. 
     169        """ 
    162170        transformed_data = self._calculator.compute_transform( 
    163171            self._extrapolated_data, self.background) 
     
    446454 
    447455    def _disable_inputs(self): 
     456        """ 
     457        Disable all input fields 
     458        """ 
    448459        self._qmin_input.Disable() 
    449460        self._qmax1_input.Disable() 
     
    452463 
    453464    def _enable_inputs(self): 
     465        """ 
     466        Enable all input fields 
     467        """ 
    454468        self._qmin_input.Enable() 
    455469        self._qmax1_input.Enable() 
  • src/sas/sasgui/perspectives/corfunc/corfunc_state.py

    ra9b7a8f rfd5cfaf  
    6161 
    6262        :return: A string representing the state 
    63  
    6463        """ 
    6564        state = "File:         {}\n".format(self.file) 
Note: See TracChangeset for help on using the changeset viewer.