Skip to content

Commit

Permalink
fix cache issue and memory issue
Browse files Browse the repository at this point in the history
  • Loading branch information
y8z committed Sep 27, 2024
1 parent 09390dd commit d1374e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions total_scattering/file_handling/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
AlignAndFocusPowderFromFiles, \
ApplyDiffCal, \
ConvertUnits, \
DeleteWorkspace, \
DiffractionFocussing, \
Divide, \
Load, \
Expand Down Expand Up @@ -268,6 +269,7 @@ def load(ws_name, input_files, group_wksp,
Plus(LHSWorkspace=ws_name,
RHSWorkspace="wksp_tmp_qrb",
OutputWorkspace=ws_name)
DeleteWorkspace(Workspace="wksp_tmp_qrb")

if absorption_wksp != '':
ConvertUnits(
Expand Down
5 changes: 2 additions & 3 deletions total_scattering/reduction/total_scattering_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def TotalScatteringReduction(config: dict = None):

# Grouping
grouping = merging.get('Grouping', None)
cache_dir = config.get("CacheDir", None)
cache_dir = config.get("CacheDirMTS", None)
OutputDir = config.get("OutputDir", os.path.abspath('.'))
manual_grouping = grouping
if manual_grouping:
Expand Down Expand Up @@ -976,8 +976,7 @@ def TotalScatteringReduction(config: dict = None):
pe_tmp = gen_config.config_params["PreserveEvents"]
alignAndFocusArgs['PreserveEvents'] = pe_tmp
qparams = gen_config.config_params["QParamsProcessing"]
if cache_dir is not None:
alignAndFocusArgs['CacheDir'] = os.path.abspath(cache_dir)

# add resonance filter related properties
# NOTE:
# the default behaivor is no filtering if not specified.
Expand Down

0 comments on commit d1374e2

Please sign in to comment.