def Stitch(data_list=None, q_min=None, q_max=None, output_workspace=None,
           scale=None, save_output=False):
    """
        Stitch a set of SANS data sets

        @param data_list: List of workspaces to stitch.
        @param q_min: Minimum Q-value of the overlap between two consecutive data sets.
                      The q_min argument must be an array when stitching more than two data sets.
                      The length of the array should be 1 less than the number of data sets.
        @param q_max: Maximum Q-value of the overlap between two consecutive data sets (must be an array for more than two data sets).
                      The q_max argument must be an array when stitching more than two data sets.
                      The length of the array should be 1 less than the number of data sets.
        @param output_workspace: Name of the output workspace containing the stitched data.
        @param scale: Scaling factor.
                      The scaling factor should either be a single number
                      or a list of length equal to the number of data sets.
                      The former will scale everything by the given factor, while the
                      latter will assign the given scaling factors to the data sets.
        @param save_output: If true, the output will be saved in the current working directory.
    """
    if data_list is None:
        data_list = []
    from LargeScaleStructures.data_stitching import stitch
    stitch(
        data_list,
        q_min=q_min,
        q_max=q_max,
        output_workspace=output_workspace,
        scale=scale,
        save_output=save_output)
Example #2
0
def Stitch(data_list=None,
           q_min=None,
           q_max=None,
           output_workspace=None,
           scale=None,
           save_output=False):
    """
        Stitch a set of SANS data sets

        @param data_list: List of workspaces to stitch.
        @param q_min: Minimum Q-value of the overlap between two consecutive data sets.
                      The q_min argument must be an array when stitching more than two data sets.
                      The length of the array should be 1 less than the number of data sets.
        @param q_max: Maximum Q-value of the overlap between two consecutive data sets (must be an array for more than two data sets).
                      The q_max argument must be an array when stitching more than two data sets.
                      The length of the array should be 1 less than the number of data sets.
        @param output_workspace: Name of the output workspace containing the stitched data.
        @param scale: Scaling factor.
                      The scaling factor should either be a single number
                      or a list of length equal to the number of data sets.
                      The former will scale everything by the given factor, while the
                      latter will assign the given scaling factors to the data sets.
        @param save_output: If true, the output will be saved in the current working directory.
    """
    if data_list is None:
        data_list = []
    from LargeScaleStructures.data_stitching import stitch
    stitch(data_list,
           q_min=q_min,
           q_max=q_max,
           output_workspace=output_workspace,
           scale=scale,
           save_output=save_output)
Example #3
0
 def test_stitch(self):
     """
         Test the stitching call
     """
     data_stitching.stitch(['ws1', 'ws2'], [70, ], [100], output_workspace='scaled_ws')
     x_out = mtd['scaled_ws'].dataY(0)
     # Stitching will scale ws2 to ws1, so the output workspace should line up
     # with ws1, which should have an average value of about 10.
     # Since both workspaces have very different ranges of values, we use a wide
     # acceptance range to allow for random fluctuations.
     self.assertTrue(np.average(x_out) < 13 and np.average(x_out) > 7)
Example #4
0
 def test_stitch(self):
     """
         Test the stitching call
     """
     data_stitching.stitch(['ws1', 'ws2'], [70,], [100], output_workspace='scaled_ws')
     x_out = mtd['scaled_ws'].dataY(0)
     # Stitching will scale ws2 to ws1, so the output workspace should line up
     # with ws1, which should have an average value of about 10.
     # Since both workspaces have very different ranges of values, we use a wide
     # acceptance range to allow for random fluctuations.
     self.assertTrue(np.average(x_out) < 13 and np.average(x_out) > 7)
def Stitch(data_list=[], q_min=None, q_max=None, output_workspace=None,
           scale=None, save_output=False):
    from LargeScaleStructures.data_stitching import stitch
    stitch(data_list, q_min=q_min, q_max=q_max, scale=scale, save_output=save_output)