Skip to content

Commit

Permalink
Merge pull request #1765 from willend/fix-issue-1763
Browse files Browse the repository at this point in the history
Fix for issue 1763 and related issue propagating --no-output-files
  • Loading branch information
willend authored Nov 19, 2024
2 parents 68aba44 + 0e8a6d0 commit 8275901
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions tools/Python/mcgui/mcgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,9 @@ def run(self, fixed_params, params, inspect=None):
self.__dataDir = output_dir
elif simtrace == 1: # trace (mcdisplay)
if inspect:
runstr = mccode_config.configuration["MCDISPLAY"] + ' ' + os.path.basename(self.__instrFile) + ' --no-output-files' + ' --inspect=' + inspect
runstr = mccode_config.configuration["MCDISPLAY"] + ' ' + os.path.basename(self.__instrFile) + ' --inspect=' + inspect
else:
runstr = mccode_config.configuration["MCDISPLAY"] + ' ' + os.path.basename(self.__instrFile) + ' --no-output-files'
runstr = mccode_config.configuration["MCDISPLAY"] + ' ' + os.path.basename(self.__instrFile)
else:
raise Exception('mcgui.run: invalid execution mode (simulate/trace/optimize).')

Expand Down Expand Up @@ -725,9 +725,13 @@ def handlePlotOtherResults(self):
self.emitter.status('Running plotter ...')

def handleMcDisplayWeb(self):
self.emitter.status('Running mcdisplay-webgl...')
if mccode_config.configuration["MCCODE"]=="mcstas":
DISPLAY="mcdisplay"
else:
DISPLAY="mxdisplay"
self.emitter.status('Running ' + DISPLAY + '-webgl...')
try:
cmd = 'mcdisplay-webgl --default --no-output-files -n100 ' + os.path.basename(self.state.getInstrumentFile()) + '&'
cmd = DISPLAY+'-webgl --default -n100 ' + os.path.basename(self.state.getInstrumentFile()) + '&'
self.emitter.message(cmd, gui=True)
self.emitter.message('', gui=True)

Expand All @@ -738,9 +742,13 @@ def messg_err(s): self.emitter.message(s, err_msg=True)
self.emitter.status('')

def handleMcDisplay2D(self):
self.emitter.status('Running mcdisplay-webgl...')
if mccode_config.configuration["MCCODE"]=="mcstas":
DISPLAY="mcdisplay"
else:
DISPLAY="mxdisplay"
self.emitter.status('Running ' + DISPLAY + '-pyqtgraph...')
try:
cmd = 'mcdisplay-pyqtgraph --default --no-output-files -n100 ' + os.path.basename(self.state.getInstrumentFile()) + '&'
cmd = DISPLAY+'-pyqtgraph --default -n100 ' + os.path.basename(self.state.getInstrumentFile()) + '&'
self.emitter.message(cmd, gui=True)
self.emitter.message('', gui=True)

Expand Down

0 comments on commit 8275901

Please sign in to comment.