Skip to content

Commit

Permalink
tweak defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
mdoucet committed Mar 26, 2024
1 parent e39b267 commit 338fa3b
Show file tree
Hide file tree
Showing 6 changed files with 221 additions and 102 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Reduction scripts for the Liquids Reflectometer. This includes both automated re


## Release notes:
- reduction v2.0.20 [03/2024] Add error events to dead time correction
- reduction v2.0.19 [03/2024] Add dead time correction and clean up functional background option
- reduction v2.0.14 [02/2024] Add functional background
- reduction v2.0.13 [08/2023] Get correct angle with free liquids
Expand Down
2 changes: 1 addition & 1 deletion reduction/lr_reduction/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.0.19'
__version__ = '2.0.20'
6 changes: 3 additions & 3 deletions reduction/lr_reduction/event_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def __init__(self, scattering_workspace, direct_workspace,
q_min=None, q_step=-0.02, q_max=None,
tof_range=None, theta=1.0, instrument=None,
functional_background=False, dead_time=False,
paralyzable=False):
paralyzable=True):
"""
Pixel ranges include the min and max pixels.
Expand Down Expand Up @@ -245,7 +245,7 @@ def get_dead_time_correction(self):
tof_max = self._ws_sc.getTofMax()

run_number = self._ws_sc.getRun().getProperty("run_number").value
error_ws = api.LoadErrorEventsNexus(run_number)
error_ws = api.LoadErrorEventsNexus("REF_L_%s" % run_number)
corr_ws = DeadTimeCorrection.call(InputWorkspace=self._ws_sc,
InputErrorEventsWorkspace=error_ws,
DeadTime=self.DEAD_TIME,
Expand All @@ -258,7 +258,7 @@ def get_dead_time_correction(self):

# Direct beam workspace
run_number = self._ws_db.getRun().getProperty("run_number").value
error_ws = api.LoadErrorEventsNexus(run_number)
error_ws = api.LoadErrorEventsNexus("REF_L_%s" % run_number)
corr_ws = DeadTimeCorrection.call(InputWorkspace=self._ws_db,
InputErrorEventsWorkspace=error_ws,
DeadTime=self.DEAD_TIME,
Expand Down
2 changes: 1 addition & 1 deletion reduction/lr_reduction/reduction_template_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self):

# Dead time correction
self.dead_time:bool = False
self.paralyzable:bool = False
self.paralyzable:bool = True

def from_dict(self, data_dict, permissible=True):
r"""
Expand Down
301 changes: 209 additions & 92 deletions reduction/notebooks/workflow.ipynb

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions scripts/test/test_sf.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import sys
sys.path.append('../autoreduce')
import os
sys.path.append(os.path.expanduser('~/git/LiquidsReflectometer/reduction'))

from sf_calculator import ScalingFactor
from lr_reduction.sf_calculator import ScalingFactor

sf = ScalingFactor(run_list=range(184975, 184990),
sf_file="/tmp/sf_184975_air.cfg",
medium='air')
sf = ScalingFactor(run_list=range(197912, 197932),
sf_file="/tmp/sf_197912_si.cfg",
medium='Si')

sf.execute()

0 comments on commit 338fa3b

Please sign in to comment.