Skip to content

Commit be2330f

Browse files
authored
Merge pull request #130 from Image-X-Institute/full_path_to_generator
Full path to generator
2 parents fc601b4 + c02aabe commit be2330f

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

TopasOpt/Optimisers.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,14 @@ def _GenerateTopasModel(self, x):
285285
Generates a topas model with the latest parameters as well as a shell script called RunAllFiles.sh to run it.
286286
"""
287287

288-
self.TopasScripts, self.TopasScriptNames = self.TopasScriptGenerator(self.BaseDirectory, self.Itteration, **self.VariableDict)
288+
self.TopasScripts, self.TopasScriptNames = self.TopasScriptGenerator(Path(self.BaseDirectory) / self.SimulationName,
289+
self.Itteration, **self.VariableDict,)
290+
'''
291+
^ Note: in most cases, the first passed variable (base directory) will not be used in TopasScriptGenerator.
292+
I'm leaving it here for backwards compatability, and in certain scenarious it's handy to have a hacky way
293+
to pass an extra argument. I just want everyone to know, i'm not proud of myself for this.
294+
'''
295+
289296
self.ScriptsToRun = []
290297
for i, script_name in enumerate(self.TopasScriptNames):
291298
script_name = script_name + '_itt_' + str(self.Itteration) + '.tps'

TopasOpt/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
https://acrf-image-x-institute.github.io/TopasOpt/
55
"""
66
__author__ = 'Brendan Whelan'
7-
__version__ = '0.4.4'
7+
__version__ = '0.4.5'
88

99

0 commit comments

Comments
 (0)