Skip to content
Snippets Groups Projects
Commit ca65fe28 authored by Mathieu Doucet's avatar Mathieu Doucet
Browse files

Fix pylint errors

parent 3a6ff7c4
No related branches found
No related tags found
No related merge requests found
#pylint: disable=no-init,invalid-name
import math
import time
import numpy as np
import mantid
from mantid.api import *
from mantid.simpleapi import *
from mantid.kernel import *
import logging
class CompareTwoNXSDataForSFcalculator(object):
"""
will return -1, 0 or 1 according to the position of the nexusToPosition in relation to the
will return -1, 0 or 1 according to the position of the nexusToPosition in relation to the
nexusToCompareWith based on the following criteria
#1: number of attenuators (ascending order)
#2: lambda requested (descending order)
......@@ -58,9 +54,9 @@ class CompareTwoNXSDataForSFcalculator(object):
resultLessThan = 1
resultMoreThan = -1
if (_paramNexusToPosition < _paramNexusToCompareWith):
if _paramNexusToPosition < _paramNexusToCompareWith:
return resultLessThan
elif (_paramNexusToPosition > _paramNexusToCompareWith):
elif _paramNexusToPosition > _paramNexusToCompareWith:
return resultMoreThan
else:
return 0
......@@ -74,7 +70,7 @@ def sorter_function(r1, r2):
"""
return CompareTwoNXSDataForSFcalculator(r2, r1).result()
class LRDirectBeamSort(PythonAlgorithm):
def category(self):
......@@ -140,7 +136,7 @@ class LRDirectBeamSort(PythonAlgorithm):
def _compute_scaling_factors(self, lr_data_sorted):
"""
If we need to compute the scaling factors, group the runs by their wavelength request
If we need to compute the scaling factors, group the runs by their wavelength request
@param lr_data_sorted: ordered list of workspaces
"""
group_list = []
......@@ -155,7 +151,7 @@ class LRDirectBeamSort(PythonAlgorithm):
if len(current_group)>0:
group_list.append(current_group)
current_group = []
current_group.append(r)
# Add in the last group
......@@ -169,7 +165,6 @@ class LRDirectBeamSort(PythonAlgorithm):
for g in group_list:
if len(g) == 0:
continue
runs = [r.getRunNumber() for r in g]
direct_beam_runs = []
peak_ranges = []
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment