Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 10, 2024
1 parent 6b50743 commit 87362a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/shiver/models/convert_dgs_to_single_mde.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,9 @@ def PyExec(self): # pylint: disable=too-many-branches

# do filtering
if units == "TOF" and len(CheckForSampleLogs(Workspace=data, LogNames="pause")) == 0:
data = FilterByLogValue(InputWorkspace=data,
LogName="pause",
MinimumValue=-1,
MaximumValue=0.5,
LogBoundary='Left')
data = FilterByLogValue(
InputWorkspace=data, LogName="pause", MinimumValue=-1, MaximumValue=0.5, LogBoundary="Left"
)
if units == "TOF" and bad_pulses_threshold > 0:
data = FilterBadPulses(InputWorkspace=data, LowerCutoff=bad_pulses_threshold)

Expand Down
4 changes: 2 additions & 2 deletions tests/models/test_generatemde.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def test_convert_dgs_to_single_pause():
raw_data_folder = os.path.join(os.path.dirname(__file__), "../data/raw")

data = LoadEventNexus(os.path.join(raw_data_folder, "HYS_178921.nxs.h5"))
AddTimeSeriesLog(Workspace=data, Name='pause', Time='2017-11-02T01:48:58.543570666', Value=1, Type='int')
AddTimeSeriesLog(Workspace=data, Name="pause", Time="2017-11-02T01:48:58.543570666", Value=1, Type="int")
md_p = ConvertDGSToSingleMDE(InputWorkspace=data, Ei=25.0, T0=112.0, TimeIndependentBackground="Default")
assert md_p.getNEvents() == 6140 # the original mde has 23682 events
assert md_p.getNEvents() == 6140 # the original mde has 23682 events


def test_convert_dgs_to_single_mde_single_qlab():
Expand Down

0 comments on commit 87362a8

Please sign in to comment.